diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/documentation/additional-documentation/concepts.html b/documentation/additional-documentation/concepts.html new file mode 100644 index 0000000000..cd2efbb6f2 --- /dev/null +++ b/documentation/additional-documentation/concepts.html @@ -0,0 +1,180 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + +

Concepts & Architecture

+

This section provides some deeper insights and background about the project's architecture.

+

Please use the menu on the left to jump to the relevant section.

+ +
+
+

results matching ""

+
    +
    +
    +

    No results matching ""

    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/configuration.html b/documentation/additional-documentation/concepts/configuration.html new file mode 100644 index 0000000000..f4eccaf4a1 --- /dev/null +++ b/documentation/additional-documentation/concepts/configuration.html @@ -0,0 +1,597 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +

    Configuration System

    +

    The config is a json object containing information about how the user interface for a specific project is displayed. +The config is stored in the database and can be updated for a user without changing the code base. +The default config is part of the repository in the config-fix.json file.

    +

    Config data is loaded by the ConfigService and then distributed to the relevant modules. +This document aims to explain how cofiguration defines the rest of the application and all options that can be changed through the config.

    +
    + + + +

    +

    Config Service

    +

    +

    The ConfigService is an Angular service that you can inject anywhere in the code if you need to access configuration values. +It loads the configuration from the database (or the default file if no entry is available) first thing when starting the application.

    +

    Some core services use the ConfigService to dynamically set up parts of the application on startup. +For example the NavigationItemsService creates the menu items as configured +and the RouterService sets up Angular routing defining what components users see. +The config service provides a behavior subject which will notify all subscribers when a new configuration was uploaded. +This can be used for core tasks like setting up the routes or creating the navigation bar.

    +

    Top-level "view" components (i.e. components that are used to define a whole page, not just some building block for a part or section) +receive their config data automatically assigned as @Input() properties mapped from config object property name to an identical component class property. +This is handled by the RoutedViewComponent internally. +(If needed for special cases, you can also access it through the standard Angular router and can access it by injecting ActivatedRoute.)

    +

    Storing config in DB

    +

    Config is currently stored in the normal app database with the fixed _id "_id": "Config:CONFIG_ENTITY". +This document in the database has to contain a single property data that holds the config object whose parts are described here.

    +

    Example:

    +Example :
    {
    +  "_id": "Config:CONFIG_ENTITY",
    +  "data": {
    +    "navigationMenu": {
    +      "items": [ ...],
    +    }
    +    ...
    +  }
    +}

    Uploading and downloading the configuration can be done by admins inside the admin view.

    +
    +

    Config File

    +

    The config file is a json object containing information about what and how things are displayed in the application. +On the top level of the config file, there are four different kinds of entries:

    +
      +
    1. The main navigation menu (navigationMenu)
    2. +
    3. Views defining the UI of each page (view:<path>)
    4. +
    5. Lists of select options for dropdown fields (enum:<category-id>, including available Note categories, etc.)
    6. +
    7. Entity configuration to define [schemas](./entity-schema.html (entity:<entity-id>)
    8. +
    +

    also see User Roles & Permissions

    +

    Navigation Menu

    +

    The top level entry navigationMenu builds the visible and clickable items for the navigation menu on the left hand side of the app. Right now, the navigationMenu has the only subentry items. items contains an array of objects, each object representing one item within the navigation menu. The order of the entries reflects how the navigation menu items are shown in the app.

    +

    Each navigation menu item object has to have the three properties name, icon and link. name hold the inscription of the item in the navigation menu in the app, icon indicates the little icon picture that is shown before the textual inscription of the item in the navigation menu and link contains the URL or view that the user is directed to when clicking on the navigation menu item. For every link given, there necessarily has to be a corresponding view-entry on the top level of the config file.

    +

    Example:

    +Example :
      "navigationMenu": {
    +    "items": [
    +      {
    +        "name": "Dashboard",
    +        "icon": "home",
    +        "link": "/"
    +      },
    +      {
    +        "name": "Children",
    +        "icon": "child",
    +        "link": "/child"
    +      },
    +      ...
    +      {
    +        "name": "Help",
    +        "icon": "question-circle",
    +        "link": "/help"
    +      }
    +    ]
    +  },

    Views

    +

    The largest part of the config file are the views. Each view entry starts with view:. +The part that comes after the colon is what comes after the top level / in the URL of the app. +There has to be one view entry with nothing after the colon, thus directing to the root path that is used as a default one when the user opens the app. +Paths can have multiple parts, e.g. view:admin/conflicts. +If we append :id, then this is used as a parameter directly from the app, e.g. view:child/:id is the path for the child details view where the app provides the child entity id to be viewed to the component.

    +

    The only mandatory field for each view is "component": telling the app which component to use for the respective view. +The component part has to refer to an existing angular component within the app. Components that are valid and may +be used for the view have the @DynamicComponent decorator present

    +

    The two optional fields of each view are "config": and "permittedUserRoles":. +"permittedUserRoles" expects an array of user role strings. +If one or more roles are specified, only users with these roles are able to see this menu item and visit this page in the app.

    +

    What comes within the "config": object depends on the component being used. +The Dashboard-Component for example takes as "widgets:" an array of subcomponents, where every entry has to have a "component:" and may have an own "config:" object. +(This "config" is passed to the component, which receives and handles it by implementing the OnInitDynamicComponent interface)

    +

    Example:

    +Example :
    "view:": {
    +  "component": "Dashboard",
    +  "config": {
    +    "widgets": [
    +      {
    +        "component": "ChildrenCountDashboard"
    +      },
    +      {
    +        "component": "RecentNotesDashboard"
    +      },
    +      {
    +        "component": "NoRecentNotesDashboard",
    +        "config": {
    +          "sinceDays": 28,
    +          "fromBeginningOfWeek": false
    +      }
    +      },
    +      ...

    List components

    +

    List components showing data in a table (such as ChildrenList oder SchoolsList) usually have the four config objects "title", "columns", "columnGroup" (optional) and "filters" (optional). +(These are implemented by the EntityListComponent.)

    +

    The "title" is the text shown in the heading of the component.

    +

    "columns" contains an array of the columns to be displayed. +The configuration for the columns happens with the FormFieldConfiguration interface. +If all the information is available on the schema or through the datatype of a property, it is sufficient to put a string with the name of the property into the columns array.

    +

    Example:

    +Example :
    "view:child": {
    +  "component": "ChildrenList",
    +  "config": {
    +    "title": "Children List",
    +    "columns": [
    +      "projectNumber",
    +      {
    +        "viewComponent": "ChildBlock",
    +        "label": "Name",
    +        "id": "name"
    +      },
    +        ...

    The "columnGroup" object holds the three properties "default", "mobile" and "groups". +"default" and "mobile" hold the names of the group of columns being displayed by default or on a mobile device. +If the "columnGroup" property is not defined, all columns will be displayed. +If "default" or "mobile" is not defined, the first entry of "groups" will be used. +"groups" consists of an array of groups of columns, where every entry has a "name" and an array of column ids within "columns". +Properties that are listed in any of the groups arrays and don't require further configurations, can be omitted from the columns array, the EntityListComponent will automatically add them.

    +

    Example:

    +Example :
    "columnGroup": {
    +  "default": "School Info",
    +  "mobile": "Mobile",
    +  "groups": [
    +  {
    +    "name": "Basic Info",
    +    "columns": [
    +      "projectNumber",
    +      "name",
    +      ...
    +      "status"
    +    ]
    +  },
    +  {
    +    "name": "School Info",
    +    "columns": [
    +      "projectNumber",
    +      "name",
    +      ...
    +    ]
    +  },
    +

    The object "filters" within the config of a list component can be used to create filter options for the list data. +The type of filter will be automatically determined by the datatype of that property. +The filters allow to filter the table by the possible values of a property. +This will create a filter for boolean values with three buttons (all, true, false). +The names of these buttons can be specified using the "true", "false" and "all" option. +The prebuilt option is used to enable or disable filters that contain more logic and are implemented inside the component which is displayed. +This option requires the fields "type" and "id", where "id" matched the id of a prebuilt filter inside a component.

    +

    Example:

    +Example :
    "filters": [
    +  {
    +    "id": "language"
    +  },
    +  {
    +    "id": "privateSchool",
    +    "default": "all",
    +    "true": "Private School",
    +    "false": "Government School",
    +    "all": "All"
    +  },
    +  {
    +    "id": "date",
    +    "type": "prebuilt"
    +  },
    +]

    Detail components

    +

    Detail components can show data of a single entity presented in multiple sections and forms. +(These are implemented by the EntityDetailsModule, in particular the EntityDetailsComponent.)

    +

    You can find details on the config format and its sub-sections from API reference section: EntityDetailsConfig

    +

    The detail component requires three attributes: "icon", "entity" and "panels". +"icon" indicates a little icon that will be rendered on the top of the page. +"entity" expects the name of an entity for which the details page should be created. +This has to match exactly the name of the entity defined by the @DatabaseEntity() annotation. +The entity will then be loaded using the entity name and the id which is read from the URL. +The "panels" field expects an array of panel definitions. +Each panel has a "title" and an array of "components". +The component configuration requires another "title", the "component" that should be rendered (the component has to be defined here OnInitDynamicComponent) and a configuration ("config") which is passed to this component.

    +Example :
        "config": {
    +      "icon": "child",
    +      "entity": "Child",
    +      "panels": [
    +        {
    +          "title": "Basic Information",
    +          "components": [
    +            {
    +              "title": "",
    +              "component": "Form",
    +              "config": { }
    +            }
    +          ]
    +        },
    +        {
    +          "title": "Education",
    +          "components": [
    +            {
    +              "title": "School History",
    +              "component": "PreviousSchools"
    +            },
    +            {
    +              "title": "Literacy Test Results",
    +              "component": "RelatedEntities",
    +              "config": {}
    +            }
    +          ]
    +        }
    +      ]
    +    }

    The Form Component

    +

    The form component is a flexible component that can be used inside the details component. +It allows to dynamically create a form through configuration. +The configuration for this component expects a single field, the "fieldGroups".

    +

    The fieldGroups should be an array of logically related fields and optionally a header displayed above the group of fields. +Each field group is rendered next to each other (as columns). +You can also define only a single field in each fieldGroups entry, to display them next to each other instead of one field taking up full width. +The definitions for the fields is defined by the FormFieldConfiguration +However, the schema definitions of the entity should be sufficient so that only the names of the properties which should be editable in the form have to be provided. +This means instead of placing an object in the fields array, simple strings do the same job.

    +Example :
      "config": {
    +    "fieldGroups": [
    +      { "fields": ["photo"] },
    +      { "fields": ["name", "projectNumber"] }
    +      {
    +        "fields": ["dateOfBirth"],
    +        "header": "Demographics"
    +      }
    +    ]
    +  }

    The PreviousSchools Component

    +

    This component shows a list of ChildSchoolRelations of a child in table. +It can be configured which attributes of the ChildSchoolRelation are shown in the table and how the columns are named. +Possible configurations are single and columns which are both optional. +single is a boolean and if is set to true the component will show which (if any) school the child is currently attending. +This should only be set to true, when the use-case only allows one active school per child. +columns is an object and determines which columns of the ChildSchoolRelation are shown. +The configuration is according to the EntitySubrecordComponent;

    +

    Example:

    +Example :
      "config": {
    +    "single": true,
    +    "columns": [
    +      "schoolId",
    +      "schoolClass",
    +      "start",
    +      "end",
    +      "result",
    +    ],
    +  }

    Entity

    +

    The entity object within the config file can be used to extend and configure existing entities. +The name of the entity to which this config refers comes after the colon in this case "child".

    +

    Attributes

    +

    The attribute field allows to add attributes to an entity: +Configure this as a key-value object with the property name as key and the schema as value, which refers to the entity schemas.

    +

    Example:

    +Example :
    "entity:Child": {
    +    "attributes": {
    +        "address": { "dataType": "string", "label": "Address" },
    +        "phone": { "dataType": "string", "label": "Phone number" },
    +        ...
    +        "health_lastDeworming": { "dataType": "Date", "label": "Last deworming" }
    +    }
    +}
    +

    String representation

    +

    It is possible to overwrite, how an entity is converted to a string using the optional toStringAttributes key. +This expects an array of strings referring to properties of that child which should be printed out. +The order of these strings is also the order in which the property values are printed.

    +

    E.g. while some projects use a name property on a child, others might use firstname and lastname. +In this case they probably want to show both the first and the last name in the app. +To achieve this, the configuration of the Child entity can be extended like this:

    +Example :
    "entity:Child": {
    +    "toStringAttributes": ["firstname", "lastname"],
    +    "attributes": {
    +        "firstname": { ... },
    +        "lastname": { ... },
    +        ...
    +    ]
    +}
    +

    Icons and labels

    +

    For different organisations, entities might refer to different real life objects. +In other words, it is not always suitable to call the entities Child or School and the icon might also be +misleading. +Therefore, the names and icons of entities can be changed through the config. +This allows to change a text like Participants with unhealthy BMI to Patients with unhealthy BMI. +To achieve this a label and labelPlural can be defined in the entity config. +Additionally, the icon property allows to exchange the icon to another one from +the FontAwesome Icon Library.

    +

    This also has to be adjusted when configuring in a different language.

    +

    E.g.

    +Example :
    "entity:Child": {
    +  "label": "Patient",
    +  "labelPlural": "Patients",
    +  "icon": "bed",
    +  ...
    +}

    Option Lists

    +

    Option lists or ConfigurableEnumValues can provide a pre-set list of options for a field +to allow users to easily select an option from a dropdown and ensure that users are not entering random, invalid values.

    +

    Config entries for this purpose have a prefix enum: followed by an id you can freely define (e.g. enum:project-status).

    +

    The value is an array of objects defining the options. Mandatory fields for each option are "id" and "label". +"id" should be written in uppercase letters without spaces (user underscore _ instead). +The "id" should always stay the same as it is written to the database and identifies the value even if you rename the label shown to users. +"label" holds the human-readable text for the dropdown entry or wherever the value is shown to the user. +This text may be changed without any negative effect to data consistency and the change will instantly be visible in all saved entries of this type.

    +

    Example:

    +Example :
    "enum:project-status": [
    +    {
    +        "id": "ACTIVE",
    +        "label": "active"
    +    },
    +    {
    +        "id": "COMPLETED",
    +        "label": "completed the programme"
    +    },
    +    {
    +        "id": "DROPPED",
    +        "label": "dropped out of the programme"
    +    }
    +]

    Defining configurable enum properties

    +

    In order to use such an "enum" in entity fields, you need to set the schema datatype and the form type in the according config objects:

    +

    In the entity, set the dataType to "configurable-enum" and the "additional" to the id of the enum config:

    +Example :
    "entity:Child": {
    +  "attritubtes": { "status": { "dataType": "configurable-enum", "additional": "project-status"  } }
    +  ...

    Display a configurable enum property in the list view

    +

    In the List View columns config, use the "DisplayConfigurableEnum" component for the field:

    +Example :
    "columns": [
    +  {
    +    "component": "DisplayConfigurableEnum",
    +    "title": "Status",
    +    "id": "status"
    +  },
    +  ...
    +]

    Allowing multi select

    +

    A property can also be defined in a way that multiple values can be selected. +To allow multiple selection, additionally isArray should be true. +The following example creates a property materials where multiple values from the materials configurable enum can be selected.

    +Example :
    {
    +  "name": "materials",
    +  "schema": {
    +    "dataType": "configurable-enum",
    +    "isArray": true,
    +    "additional": "materials",
    +    "label": "Materials"
    +  }
    +}

    Defining Note interaction types

    +

    There are a few specially built-in types of enums. +The interaction types available for Notes are configured as the enum:interaction-type.

    +

    In addition to id and label for the interaction types you can optionally also configure "color"and "isMeeting". +"color"can contain a background color for the entry in the form of the hexadecimal code, e.g. #E1F5FE. +"isMeeting" is of the type boolean and tells whether the interaction type refers to a meeting or not.

    +

    Example:

    +Example :
    "enum:interaction-type": [
    +    {
    +        "id": "",
    +        "label": ""
    +    },
    +    {
    +        "id": "HOME_VISIT",
    +        "label": "Home Visit"
    +    },
    +    {
    +        "id": "ANNUAL_SURVEY",
    +        "label": "Annual Survey",
    +        "color": "#FFFDE7"
    +    },
    +    {
    +        "id": "RATION_DISTRIBUTION",
    +        "label": "Ration Distribution",
    +        "color": "#E1F5FE",
    +        "isMeeting": true
    +    }
    +}

    Defining attendance status types

    +

    Another specially built-in type of enums is the attendance status options that can be tracked. +These are configured as the enum:attendance-type.

    +

    Apart from to id and label attendance status types have to also define a few additional properties:

    +
      +
    • shortName: a one letter representation to display to the user
    • +
    • label: a longer, human-readable name of the status
    • +
    • style: string defining a css class to style this attendance status (especially the background-color)
    • +
    • countAs: the logical type of this status for analysis, there are three categories for this: "PRESENT", "ABSENT" and "IGNORE"
    • +
    +

    Example:

    +Example :
    "enum:attendance-status": [
    +
    +    {
    +      "id": "PRESENT",
    +      "shortName": "P",
    +      "label": "Present",
    +      "style": "attendance-P",
    +      "countAs": "PRESENT"
    +    },
    +    {
    +      "id": "ABSENT",
    +      "shortName": "A",
    +      "label": "Absent",
    +      "style": "attendance-A",
    +      "countAs": "ABSENT"
    +    },
    +    {
    +      "id": "EXCUSED",
    +      "shortName": "E",
    +      "label": "Excused",
    +      "style": "attendance-E",
    +      "countAs": "IGNORE"
    +    }
    +
    +
    +

    results matching ""

    +
      +
      +
      +

      No results matching ""

      +
      +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/documentation-structure.html b/documentation/additional-documentation/concepts/documentation-structure.html new file mode 100644 index 0000000000..f5eaad76d7 --- /dev/null +++ b/documentation/additional-documentation/concepts/documentation-structure.html @@ -0,0 +1,212 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
      +
      + + +
      +
      + + + + + + + + + + + + + + + + + + + + + +

      Documentation Structure

      +

      Our documentation is structured into four different approaches, +following the concept laid out at www.divio.com/blog/documentation:

      +
        +
      1. TUTORIALS
          +
        • learning-oriented
        • +
        • allow the newcomer to get started
        • +
        • are lessons
        • +
        • Analogy: teaching a small child how to cook
        • +
        +
      2. +
      3. HOW-TO GUIDES
          +
        • goal-oriented
        • +
        • show how to solve a specific problem
        • +
        • are a series of steps
        • +
        • Analogy: a recipe in a cookery book
        • +
        +
      4. +
      5. CONCEPTS
          +
        • understanding-oriented
        • +
        • explain
        • +
        • provide background and context
        • +
        • Analogy: an article on culinary social history
        • +
        +
      6. +
      7. REFERENCE
          +
        • information-oriented
        • +
        • describe the machinery
        • +
        • accurate and complete
        • +
        • Analogy: a reference encyclopaedia article
        • +
        +
      8. +
      +

      A good reference and repository of documentation templates also is +The Good Docs Project.

      + +
      +
      +

      results matching ""

      +
        +
        +
        +

        No results matching ""

        +
        +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/entity-system.html b/documentation/additional-documentation/concepts/entity-system.html new file mode 100644 index 0000000000..72617ada24 --- /dev/null +++ b/documentation/additional-documentation/concepts/entity-system.html @@ -0,0 +1,185 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
        +
        + + +
        +
        + + + + + + + + + + + + + + + + + + + + + +

        Entities & Entity Schema

        +
        +

        For us, an "Entity" is an object in the database (and a representation of something in the user's real world, e.g. a "Child" or "School"). +Entities are at the core of the Aam Digital platform and the primary way to customize the system is to adapt and add new entity types.

        +

        The Entity Schema defines the data structure as well as how it is displayed in the UI. +Entity instances also have some generic functionality inherited from the Entity base class.

        +
        +

        see the sub-pages here for details of the various concepts related to the Entity system

        + +
        +
        +

        results matching ""

        +
          +
          +
          +

          No results matching ""

          +
          +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/entity-system/archiving,-anonymizing-and-deleting-entities.html b/documentation/additional-documentation/concepts/entity-system/archiving,-anonymizing-and-deleting-entities.html new file mode 100644 index 0000000000..486c2979a8 --- /dev/null +++ b/documentation/additional-documentation/concepts/entity-system/archiving,-anonymizing-and-deleting-entities.html @@ -0,0 +1,214 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
          +
          + + +
          +
          + + + + + + + + + + + + + + + + + + + + + +

          Archive / Anonymize Entities

          +
          +

          Any entity can be archived (i.e. marked as inactive and hidden from UI by default) or anonymized (i.e. discarding most data and keeping a few selected properties for statistical reports). +This is often preferable to deleting a record completely. Deleting data also affects statistical reports, even for previous time periods. +By anonymizing records, all personal identifiable data can be removed and the remaining stub record can be stored indefinitely, as it is not subject to data protection regulations like GDPR anymore.

          +

          Anonymization is configured as part of the entity schema. +Data of fields that are not explicitly marked to be retained during anonymization is always deleted (anonymization by default).

          +

          To keep some data even after the user "anonymized" a record, configure the anonymize property of the @DatabaseField decorator:

          +
            +
          • anonymize: "retain" will keep this field unchanged and prevent it from being deleted
          • +
          • anonymize: "retain-anonymized" will trigger a special "partial" deletion that depends on the dataType (e.g. date types will be changed to 1st July of the given year, thereby largely removing details but keeping data to calculate a rough age)
          • +
          +

          Cascading anonymization / deletion

          +

          Relationships between entities are automatically handled when the user anonymizes or deletes an entity. +Any related entities that reference the anonymized/deleted entity are checked +and - depending on their configured role - may be updated or anonymized as well.

          +

          The logic follows the scenarios shown below: +

          +

          Data Protection & GDPR regarding anonymization / pseudonomyzation

          +

          The "anonymize" function is implemented specifically for data protection rules requiring to delete personal data. +According to the EU's "General Data Protection Regulation" (GDPR) "anonymous" data does not fall under its regulations:

          +
            +
          • GDPR is not applicable to anonymous data: "The principles of data protection should therefore not apply to [...] personal data rendered anonymous in such a manner that the data subject is not or no longer identifiable." GDPR Recital 26
              +
            • "To determine whether a natural person is identifiable, account should be taken of all the means reasonably likely to be used, such as singling out, either by the controller or by another person to identify the natural person directly or indirectly."
            • +
            • "To ascertain whether means are reasonably likely to be used to identify the natural person, account should be taken of all objective factors, such as the costs of and the amount of time required for identification, taking into consideration the available technology at the time of the processing and technological developments."
            • +
            +
          • +
          • "Pseudonymisation enables the personal data to become unidentifiable unless more information is available whereas anonymization allows the processing of personal data to irreversibly prevent re-identification." source
          • +
          • also see this good overview of anonymization misunderstandings and considerations
          • +
          +

          In the case of records being retained "anonymized" in Aam Digital, we provide a context that makes re-identification even harder:

          +
            +
          • only authorized users of the system can access even the anonymized record (where only a few properties have been retained). Unless the organisation actively shares the data, it remains as securely protected as the personal data managed in Aam Digital.
          • +
          • those authorized users with access to the anonymized records (and therefor a theoretical chance to attempt re-identification) are team members of an organization. They have been screened to be responsible persons and are usually legally bound to keep information confidential.
          • +
          • by default only a few, explicitly selected properties in anonymized records are retained (data minimization by default). As such, both re-identification likelihood and the impact in case of re-identification are reduced as far as possible.
          • +
          +

          --> If our anonymization process is configured thoughfully on a case by case basis to only retain a few data fields that are not easy indirect identifiers, it seems reasonably unlikely that the person can be identified after the anonymization process. Therefore, GDPR should not apply to these records and it is legitimate to retain these for statistical reporting.

          + +
          +
          +

          results matching ""

          +
            +
            +
            +

            No results matching ""

            +
            +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/entity-system/entity-schema.html b/documentation/additional-documentation/concepts/entity-system/entity-schema.html new file mode 100644 index 0000000000..a18cf9a847 --- /dev/null +++ b/documentation/additional-documentation/concepts/entity-system/entity-schema.html @@ -0,0 +1,218 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
            +
            + + +
            +
            + + + + + + + + + + + + + + + + + + + + + +

            Entity Schema

            +
            +

            The Entity Schema defines details of the properties of an entity type. +We define an entity type and its schema in code through a plain TypeScript class and some custom annotations. +Read more on the background and practical considerations in How to create a new Entity Type.

            +

            An example of a schema definition:

            +Example :
            @DatabaseEntity('Child') // configures the database prefix to be used by the Schema system
            +class Note extends Entity {
            +  @DatabaseField() children: Child[];
            +  @DatabaseField() text: string = 'default text';
            +  @DatabaseField() date: Date; // dataType is inferred from the Typescript type
            +  @DatabaseField({dataType: 'month'}) reportingMonth: Date; // sets a specific dataType how this value will be written to the database
            +}

            +

            The logical flow looks something like this:

            +
              +
            1. Entities are requested through the EntityMapperService (entityMapper.load(...))
            2. +
            3. The EntitySchemaService functions as a helper to the EntityMapperService +and takes care of data transformations based on the schema of that entity type.
            4. +
            5. Data from the database is "loaded" into an entity instance to combine the raw data +with its entity class by the EntityMapperService together with the EntitySchemaService.
            6. +
            7. The entity classes themselves only define the schema through the @DatabaseEntity and @DatabaseField decorators +and are otherwise simple Typescript objects.
            8. +
            +

            The process of saving an entity to the database works similarly with EntitySchemaService +supporting the EntityMapperService and transforming the entity object into the desired format to be persisted into the database.

            +
            +

            EntitySchemaService manages a registry of "data types", +i.e. transformation functions that will be called for a specific schema field's dataType.

            +

            Basic data transformations for string, number, date and month are supported by default. +You can register your own types by implementing services extending DefaultDatatype and +providing these through Angular dependency injection using multi: true.

            +

            Also see: How to create a new Datatype.

            +

            Schema options

            +

            The schema definitions contains information regarding the schema transformation as well as how a property can be displayed. +The EntitySchemaField interface shows all configuration options. +If the editComponent and the viewComponent are not set, the default components of this property's datatype will be used. +The description field allows adding further explanation which will be displayed as a tooltip.

            +

            Generic Entity functionalities

            +

            Metadata (created, updated)

            +

            Each record automatically holds basic data of timestamp and user who created and last updated the record. +(see Entity class)

            + +
            +
            +

            results matching ""

            +
              +
              +
              +

              No results matching ""

              +
              +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/extendability-and-plugin-approach.html b/documentation/additional-documentation/concepts/extendability-and-plugin-approach.html new file mode 100644 index 0000000000..fdb1848929 --- /dev/null +++ b/documentation/additional-documentation/concepts/extendability-and-plugin-approach.html @@ -0,0 +1,229 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
              +
              + + +
              +
              + + + + + + + + + + + + + + + + + + + + + +

              Extendability and Plugin Approach

              +

              Aam Digital is designed to be an extendable platform. +We try to define core interfaces that can be implemented in additional feature modules +to implement further functionality in a modular way.

              +

              The following aspects are specifically designed to be extended:

              +
                +
              • DataTypes
                  +
                • transformation functions how data is stored in / read from database
                • +
                • editComponent how data is displayed and edited in forms
                • +
                • viewComponent how data is displayed in tables
                • +
                • importValueMapping to support smart import into the data type
                • +
                • also see How to create a new Datatype
                • +
                +
              • +
              • Entity Types
                  +
                • pre-define a data structure with various fields and custom logic that may be interconnected. This mostly is useful if you implement very specialized UI components for a specific data structure.
                • +
                • any entity type can be extended through config for individual clients (e.g. adding further properties at runtime)
                • +
                • demo data generator to automatically provide useful sample records
                • +
                • also see How to create a new Entity Type
                • +
                +
              • +
              • Views
                  +
                • defining a screen completely, including data loaded, etc. and hook it into the platforms navigation and overall layout
                • +
                +
              • +
              • Sub-Views
                  +
                • defining a screen to display custom details for the entity currently loaded in the active route. The core platform takes care of passing the current entity and config details to the view as inputs.
                • +
                • also see How to create an Entity Details Panel
                • +
                +
              • +
              • Dashboard Widgets
                  +
                • filling the given card template with custom data and visualization
                • +
                +
              • +
              • Filters
                  +
                • specialized logic and UIs to filter list data
                • +
                +
              • +
              • Technical "Backend" Implementations
                  +
                • less common to change, but possible to implement integrations with different technical systems are
                    +
                  • Authentication Services (e.g. switch between native CouchDB users and more advance Keycloak)
                  • +
                  • Database / Local Storage (e.g. switch between PouchDB using IndexedDB and purely in-memory, discardable data storage - or possibly implement an integration with a different system)
                  • +
                  +
                • +
                +
              • +
              +

              The folder structure of the code base (while containing some intertwined legacy structures) also reflects this architecture:

              +
                +
              • src/app/core: generic structures and platform code
              • +
              • src/app/features: more specialized, modular features that plug into the core code (e.g. a location / map integration type)
              • +
              + +
              +
              +

              results matching ""

              +
                +
                +
                +

                No results matching ""

                +
                +
                +
                + +
                +
                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/infrastructure.html b/documentation/additional-documentation/concepts/infrastructure.html new file mode 100644 index 0000000000..8917a86d2e --- /dev/null +++ b/documentation/additional-documentation/concepts/infrastructure.html @@ -0,0 +1,212 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                +
                + + +
                +
                + + + + + + + + + + + + + + + + + + + + + +

                Infrastructure

                +

                Aam Digital is an Angular application and can be deployed on a simple webserver. +To do so we are using Docker and some other tools.

                +

                The following diagram show the actions that are performed when new code changes are published.

                +

                CI/CD Flow

                +

                Dockerfile

                +

                The Dockerfile can be found in /build/Dockerfile. +It provides a stable environment where the application is build, tested and packaged. +It consists of two stages. +The first stage is build on top of a node image and builds the application for production usage and optionally runs tests and uploads the test coverage. +The second stage is build on top of a nginx image and only copies the files from the previous stage, which are necessary for deploying the application. +This process makes the final image as small as possible. +nginx is used to run a lightweight webserver. +The configuration for nginx can be found in /build/default.conf.

                +

                Pull Requests

                +

                Whenever a new pull request is created, GitHub creates a new app on Heroku and posts the link to this app in the PR. +For each new commit of a PR, GitHub then builds the Docker image for this branch. +This includes building the application in production mode, linting the sourcecode and running the tests. +If all these stages pass, GitHub will upload the newly created image to Heroku. +Once this is done, a version of Aam Digital with the new changes included can be visited through the posted link.

                +

                Master Updates

                +

                After approving a PR and merging it into the master, semantic release automatically creates a new tag for this change. +For each new tag a tagged Docker image is uploaded to DockerHub.

                +

                Deploying Aam Digital

                +

                The Docker image from DockerHub can then be downloaded and run via Docker using the following command:

                +
                +

                docker pull aamdigital/ndb-server && docker run -p=80:80 aamdigital/ndb-server

                +
                +

                However, this will only run Aam Digital in demo-mode. +To run Aam Digital with a real database, a new config.json file has to be mounted into the image. +This should have a structure equal to config.default.json (/src/assets/config.default.json). +It holds the information about where to find the remote database, what the name of the app is and in which mode the app is being run.

                +

                The ndb-setup project provides a clear workflow for how to deploy a new instance of Aam Digital and CouchDB. +It extends the Docker image with a docker-compose.yml file which handles all the dependencies. +For further information checkout the README.

                + +
                +
                +

                results matching ""

                +
                  +
                  +
                  +

                  No results matching ""

                  +
                  +
                  +
                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/overall-architecture.html b/documentation/additional-documentation/concepts/overall-architecture.html new file mode 100644 index 0000000000..b3a2945dcc --- /dev/null +++ b/documentation/additional-documentation/concepts/overall-architecture.html @@ -0,0 +1,186 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                  +
                  + + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + +

                  Overall Structure

                  +

                  This is a rough sketch of the architecture of the core system under discussion. The modules and classes shown here are included in the ndb-core repository. +

                  +

                  An actual, specific software system to be used will be based on the core and extend it: +

                  +

                  Folder Structure

                  +

                  The application code is split within the src/app/ directory into modules providing +general features and abstract components (core) and +concrete feature modules for users' use cases (currently only child-dev-project).

                  + +
                  +
                  +

                  results matching ""

                  +
                    +
                    +
                    +

                    No results matching ""

                    +
                    +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/security.html b/documentation/additional-documentation/concepts/security.html new file mode 100644 index 0000000000..1926144718 --- /dev/null +++ b/documentation/additional-documentation/concepts/security.html @@ -0,0 +1,202 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                    +
                    + + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + +

                    Security

                    +

                    We have made both technical and design choices to develop a secure platform. +The Angular framework itself has some in-built protection against common security issues like cross-site scripting attacks (see Angular > Security). +Beyond this, the following measures are implemented:

                    +
                      +
                    • If deployed including our "replication-backend", that server-side API also ensures authenticated users can only access and sync data their account has permissions for.
                    • +
                    • Password policy enforces users to set a strong password including special characters (either via Keycloak or the platforms user profile form)
                    • +
                    • Content Security Policy (CSP) headers restrict connections to and execution of code from sources that are not whitelisted.
                    • +
                    +

                    Content Security Policy (CSP)

                    +

                    CSP headers are set in the nginx server being built from the code base to serve the Angular app. +The whitelisted CSP sources can be overwritten and adapted using a docker environment variable CSP (the default whitelist is defined in the Dockerfile).

                    +
                    +

                    CSP is currently running in "report-only" mode for testing. +Scripts and connections are not yet blocked by default.

                    +
                    +

                    Allowing PouchDB to function under CSP

                    +

                    The browser-side database system PouchDB uses map-reduce functions for indexing which are defined as strings. +It is therefore requiring 'unsafe-eval' in the CSP.

                    +

                    Whitelisting the index.html

                    +

                    To whitelist a specific script section (currently only in the index.html) a CSP hash can be used. +Updating the hash should be necessary only rarely, when that script section changes.

                    +

                    The easiest and most reliable way to get the correct hash is to deploy a production build image and check the browser console. +It states something like "Refused to execute inline script because it violates the following Content Security Policy directive: "...". Either the 'unsafe-inline' keyword, a hash ('sha256-<RELEVANT HASH>')" or a nonce is required." from where you can copy the given hash and include/update it in the CSP headers. +Generating the hash by pasting the script into an online generator does not seem to work, probably because code is minified during the build process.

                    + +
                    +
                    +

                    results matching ""

                    +
                      +
                      +
                      +

                      No results matching ""

                      +
                      +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/session-and-authentication-system.html b/documentation/additional-documentation/concepts/session-and-authentication-system.html new file mode 100644 index 0000000000..f7e052ca2f --- /dev/null +++ b/documentation/additional-documentation/concepts/session-and-authentication-system.html @@ -0,0 +1,319 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                      +
                      + + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + +

                      Session Handling, Authentication & Synchronisation

                      +

                      This document aims at describing the architecture of the offline-first session handling, focussing on the (Synced)SessionService.

                      + + + + + +

                      Components

                      +

                      The following diagram show which components are involved in managing the session.

                      +

                      class diagram.

                      +

                      There are three implementations of the SessionService interface: LocalSession, RemoteSession and the SyncedSession. +They are described in more detail in the SessionServices section.

                      +

                      State

                      +

                      Lets talk about state for a second. With an offline-first synced session, there is lots of state involved needing to be synced. The following enums are used to define the possible states.

                      +
                        +
                      • LoginState At the beginning or after logout the state is LOGGED_OUT. After successful login, the state changes to LOGGED_IN. Entering wrong credentials will result in LOGIN_FAILED. If login is not possible at the moment (due to bad or no internet) the state is UNAVAILABLE.
                      • +
                      • SyncState At the beginning or without internet the state is UNSYNCED. Once the user logs in the state changes to STARTED. If no problems occur, the state will change to COMPLETED, once all data is synced. If an error occurs the state changes to FAILED.
                      • +
                      +

                      Database User

                      +

                      The DatabaseUser interface mirrors parts of the user documents as it is used by CouchDB (see here). +The most important properties are the name which is equivalent to the username and the roles which is an array of roles the user has. +The name can be used to assign e.g. notes to a user or find the User entity in the database. +The roles are used to check whether the user has permissions to visit certain pages or edit certain entities.

                      +

                      Local User

                      +

                      The LocalUser interface is used by the LocalSession to store user information in the local storage. +Additionally to the fields of the DatabaseUser interface it holds the encrypted password together with information how the password is encrypted. +This can be used to verify the password later on.

                      +

                      Session Services

                      +

                      The SessionService interface provides methods for login, logout and user access. +These methods need to be implemented to create a working session.

                      +

                      Local Session

                      +

                      The LocalSession manages a session without internet. It can be used for demo purposes or when no network connection is available. +The session loads LocalUser objects from the local storage and uses the encrypted password to validate login credentials. +It provides an additional method to save DatabaseUser objects together with the password to the local storage. +If the password matches, it returns LoginState.LOGGED_IN. +If the username matches an existing username but the password is wrong, it returns LoginState.LOGIN_FAILED. +If the username does not match any saved users, it returns LoginState.UNAVAILABLE.

                      +

                      Remote Session

                      +

                      The RemoteSession directly authenticates against a CouchDB instance. +It uses the _session endpoint of the CouchDB API for cookie-authentication. +Once successfully logged in, a cookie is stored and sent with any further request to CouchDB. +This cookie is valid for 10 minutes and renewed by CouchDB if regular requests occur. +If the password matches, it returns LoginState.LOGGED_IN. +If CouchDB returns are 401 error (unauthorized), it returns LoginState.LOGIN_FAILED. +If the requests fails with an error message other thatn 401, it returns LoginState.UNAVAILABLE.

                      +

                      Synced Session

                      +

                      The SyncedSession combines the LocalSession and the RemoteSession. +It starts the login workflow of both the RemoteSession and the LocalSession at the same time. +It first only waits for the LocalSession because this is faster and also works without internet. +Only if the local login fails the SyncedSession waits for the remote login. +If the remote login succeeds, the returned user object is saved through the LocalSession to allow a local login next time.

                      +

                      The following table shows all possible return values of the local and the remote session and the handling of the synced session. +The error message is shown in the LoginComponent

                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                      Remote LoginLocal LoginSynced LoginError Message
                      LOGGED_INLOGGED_INlogin + sync-
                      LOGGED_INLOGIN_FAILEDsync + login-
                      LOGGED_INUNAVAILABLEsync + login-
                      LOGIN_FAILEDLOGGED_INlogin -> logout-
                      LOGIN_FAILEDLOGIN_FAILEDLOGIN_FAILEDUsername and/or password incorrect
                      LOGIN_FAILEDUNAVAILABLELOGIN_FAILEDUsername and/or password incorrect
                      UNAVAILABLELOGGED_INlogin + retry-
                      UNAVAILABLELOGIN_FAILEDLOGIN_FAILEDUsername and/or password incorrect
                      UNAVAILABLEUNAVAILABLEUNAVAILABLEPlease connect to the internet and try again
                      +

                      To illustrate this table, the following flow-diagram shows what happens in the case RemoteLogin: LOGGED_IN and LocalLogin: LoginFailed. +This case happens when the password of a user has been changed on the server, but not locally and the users logs in with the new password.

                      +

                      class diagram.

                      +

                      The flow starts by the user entering a username and a password in the LoginComponent. +First the user credentials are validated against the local session. +This fails possible because the saved password does not match the user-entered one. +Then the synced session waits for the remote login to finish. +In this case the remote login succeeds and the DatabaseUser object can be retrieved from the remote session. +The synced session then stores the DatabaseUser in the local session and after that tries to log in against the local session. +Now that the DatabaseUser has been saved with the new password the local log in succeeds and returns LoginState.LOGGED_IN.

                      + +
                      +
                      +

                      results matching ""

                      +
                        +
                        +
                        +

                        No results matching ""

                        +
                        +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/user-roles-and-permissions.html b/documentation/additional-documentation/concepts/user-roles-and-permissions.html new file mode 100644 index 0000000000..8d90efa369 --- /dev/null +++ b/documentation/additional-documentation/concepts/user-roles-and-permissions.html @@ -0,0 +1,357 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                        +
                        + + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + +

                        User Roles and Permissions

                        +

                        User Roles

                        +

                        User roles are used to restrict what components a user can see and what data a user can access and edit. +These roles are stored in the backend and are available in the frontend after a successful login. +At the moment there are two places, depending on your system setup, where the roles can be defined.

                        +

                        CouchDB

                        +

                        When using CouchDB as authenticator, then the roles are directly stored on the org.couchdb.user document of a user. +A new role can be added to a user by simply adding the name of the role to the user document. +After the next login, the role will be available in the frontend.

                        +

                        Keycloak

                        +

                        When using Keycloak as an authenticator, the roles are assigned through so called Role-Mappings. +To assign a new role to a user, this role first has to be created in the realm. +To do this go to the Keycloak admin console, select the realm for which you want to create a role and go to the Realm +roles menu item. +Here a new role can be created and also a description can be provided for it. +This description should explain non-technical users, what this role is there for. +Default roles that are always available are user_app, admin_app and account_manager. +After a role has been created, the role can be assigned to a user. +This can either be done in the frontend using the UserSecurityComponent or via the Keycloak admin console under _ +Users_ +-> <select user> -> Role mapping -> Assign role.

                        +

                        Permissions

                        +

                        Aam Digital allows to specify permissions to restrict access of certain user roles to the various entity types. +Permissions are defined using the CASL JSON syntax +. +The permissions are stored in a config object which is persisted together with other +entities in the database.

                        +

                        Permission structure

                        +

                        As an example, we will define a permission object which allows users with the role user_app not to create, read +, update and delete HealthCheck entities and not create and delete School and Child entities. +Besides that, the role is allowed to do everything. +A second role admin_app is allowed to do everything. +Additionally, we add a default rule which allows each user (independent of role) to read the Config entities. +Default rules are prepended to the rules of any user and allow to configure user-agnostic permissions. +The default rules can be overwritten in the role-specific rules.

                        +Example :
                        {
                        +  "_id": "Config:Permissions",
                        +  "data": {
                        +    "default": [
                        +      {
                        +        "subject": "Config",
                        +        "action": "read"
                        +      }
                        +    ],
                        +    "user_app": [
                        +      {
                        +        "subject": "all",
                        +        "action": "manage"
                        +      },
                        +      {
                        +        "subject": "HealthCheck",
                        +        "action": "manage",
                        +        "inverted": true
                        +      },
                        +      {
                        +        "subject": [
                        +          "School",
                        +          "Child"
                        +        ],
                        +        "action": [
                        +          "create",
                        +          "delete"
                        +        ],
                        +        "inverted": true
                        +      }
                        +    ],
                        +    "admin_app": [
                        +      {
                        +        "subject": "all",
                        +        "action": "manage"
                        +      }
                        +    ]
                        +  }
                        +}

                        The _id property needs to be exactly as displayed here, as there is only one permission object allowed in a single +database. +In data, the permissions for each of the user role are defined. +In this example we have permissions defined for two roles: user_app and admin_app. +The permissions for a given role consist of an array of rules.

                        +

                        In case of the user_app, we first define that the user is allowed to do everything. +subject refers to the type of entity and all is a wildcard, that matches any entity. +action refers to the operation that is allowed or permitted on the given subject. +In this case manage is also a wildcard which means any operation is allowed. +So the first rule states any operation is allowed on any entity.

                        +

                        The second and third rule for user_app restrict this through the "inverted": true keyword. +While the first rule defined what this role is allowed to do, when "inverted": true is specified, this rule +defines what the role is not allowed to do. +This allows us to easily take permissions away from a certain role. +In this case we don't allow users with this role to perform any operation on the HealhCheck entity and no create +and update on Child and School entities. +Other possible actions are read and update following the CRUD concept.

                        +

                        The admin_app role simpy allows user with this role to do everything, without restrictions.

                        +

                        To learn more about how to define rules, have a look at +the CASL documentation.

                        +

                        It is also possible to access information of the user sending the request. E.g.:

                        +Example :
                        {
                        +  "subject": "org.couchdb.user",
                        +  "action": "update",
                        +  "fields": [
                        +    "password"
                        +  ],
                        +  "conditions": {
                        +    "name": "${user.name}",
                        +    "projects": {
                        +      "$in": "${user.projects}"
                        +    }
                        +  }
                        +}

                        This allows users to update the password property of their own document in the _users database. +Placeholders can currently access properties that the replication-backend explicitly adds to the auth user object. +Other available values are ${user.roles} (array of roles of the user) and ${user.projects} (the "projects" attribute of the user's entity that is linked to the account through the "exact_username" in Keycloak).

                        +

                        For more information on how to write rules have a look at the CASL documentation.

                        +

                        Implementing components with permissions

                        +

                        This section is about code using permissions to read and edit entities. +If you want to change the menu items which are shown in the navigation bar have a look at the views section in +the Configuration Guide.

                        +

                        The permission object is automatically fetched whenever a user logs in. +The permissions disable certain buttons based on the users overall permissions. +This is done in the app through +the DisableEntityOperationDirective, which connects certain +buttons with their operation.

                        +

                        As an example lets say we have a class variable called note which holds an object of the Note entity. +We want to create a button which allows to edit this note. +In the HTML template we could write the following in order to automatically connect it to the permission system:

                        +Example :
                        
                        +<button
                        +  *appDisabledEntityOperation="{
                        +        entity: note,
                        +        operation: 'update'
                        +    }"
                        +>
                        +  Edit Note
                        +</button>

                        This will automatically disable the button if the user is not allowed to update this specific note.

                        +

                        To check permissions inside a *.ts file, you can inject the EntityAbility:

                        +Example :
                        import { Note } from "./note";
                        +import { Injectable } from "@angular/core";
                        +import { EntityAbility } from "./permission-types";
                        +
                        +@Injectable()
                        +export class SomeService {
                        +  constructor(private ability: EntityAbility) {
                        +    if (this.ability.can("create", Note)) {
                        +      // I have permissions to create notes
                        +      const note = new Note();
                        +    } else {
                        +      // I don't have permissions to create notes
                        +      throw Error("Missing permissions");
                        +    }
                        +  }
                        +}

                        In this example the EntityAbility service is used to check whether the currently logged in user is allowed to create +new objects of the Note entity. +In this case a constructor is provided to check for the permissions, +in other cases it might make more sense to use an instance of an object like this.ability.can('read', new Note()).

                        +

                        Permissions in production

                        +

                        As permissions cannot directly be created and edited from within the app at the moment, you can use the following steps +to define permissions for a deployed system:

                        +
                          +
                        1. using CouchDB Fauxton GUI to edit database documents directly: +Look for or create the document with "_id": "Config:Permissions" and define the permissions as described above.
                        2. +
                        3. After saving the new permissions document, update the replication backend about the updated permissions: +Visit https://<your-system-domain>/db/api/ to use the OpenAPI interface for this.
                        4. +
                        5. There in Servers select /db deployed.
                        6. +
                        7. Click on Authorize enter valid user credentials and click Login.
                        8. +
                        9. Make a request to the POST /rules/{db}/reload endpoint, where {db} is the active database, e.g. app. If +successful, the response will show the newly fetched rules.
                        10. +
                        11. In case some users might have gained access to documents to which they did not have access before, +also trigger the POST /{db}/clear_local endpoint, where {db} again is the active database. +The /{db}/clear_local endpoint will ensure that each client re-checks whether new objects are available for +synchronization. +This should also be used in case an existing user has gotten a new, more powerful role. +In case a user lost permissions for objects that were already synced, this users local DB will automatically be +destroyed and the user has to synchronize all data again.
                        12. +
                        +

                        The roles assigned to users are specified in the user documents in the _users database of CouchDB.

                        +

                        Permissions in development

                        +

                        When trying to test out things with the permissions, +the DemoPermissionGeneratorService can be modified to change the +permission object which is created in the demo data. +These changes should not be committed however, as this demo data is also used in the publicly available demo.

                        +

                        The demo data comes with two user: demo and demo-admin. +The demo user has the role user_app, the demo-admin has the roles user_app and admin_app. +The permissions of the latter overwrite the permissions of the former.

                        + +
                        +
                        +

                        results matching ""

                        +
                          +
                          +
                          +

                          No results matching ""

                          +
                          +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/concepts/ux-guidelines.html b/documentation/additional-documentation/concepts/ux-guidelines.html new file mode 100644 index 0000000000..115b1442e5 --- /dev/null +++ b/documentation/additional-documentation/concepts/ux-guidelines.html @@ -0,0 +1,187 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                          +
                          + + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + +

                          UX Guidelines

                          +

                          The user should have a consistent experience across all areas of the app +(i.e. whether editing needs to be enabled, how changes can be undone, how and how long notifications are displayed). +More and more these actions will be generalized by components and services that we will use for our implementation of a specific form or page. +Until then, our UX "policy" is loosely documented below:

                          +
                            +
                          • Deleting an entity is always possible to undo by a simple SnackBar Action in the related SnackBar notification, shown for 8 seconds.
                          • +
                          • Views/Forms are by default not editable and have to be enabled through an "Edit" button.
                          • +
                          • Changes in forms are not saved automatically and have to be confirmed through a "Save" button.
                          • +
                          + +
                          +
                          +

                          results matching ""

                          +
                            +
                            +
                            +

                            No results matching ""

                            +
                            +
                            +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides.html b/documentation/additional-documentation/how-to-guides.html new file mode 100644 index 0000000000..57bc1b4ba6 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides.html @@ -0,0 +1,180 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                            +
                            + + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + +

                            How-To Guides

                            +

                            This section gives you concrete step-by-step manuals to implement common requirements.

                            +

                            Please use the menu on the left to jump to the relevant section.

                            + +
                            +
                            +

                            results matching ""

                            +
                              +
                              +
                              +

                              No results matching ""

                              +
                              +
                              +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui.html b/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui.html new file mode 100644 index 0000000000..b4fbfba6c5 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui.html @@ -0,0 +1,355 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                              +
                              + + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + +

                              How to build components that can be localized

                              +

                              Short Answer

                              +
                                +
                              1. In your html-components, mark any text that should be translated +using the i18n directive:

                                +Example :
                                <button i18n-title="<meaning>|<description>" title="I am a button" i18n="<meaning>|<description>">Click me!</button>
                              2. +
                              3. In your other components, mark strings that may be translated +using the localize function:

                                +Example :
                                const notification = $localize`I have eaten all ${number} Muffins`;
                              4. +
                              +

                              Elaborate Answer

                              +

                              The i18n-directive

                              +

                              The i18n directive allows up to three optional arguments. The first two - +meaning and description - are used to aid translators while analyzing the +texts. The third one is an optional ID. This ID is generated by angular and +does not have to be provided.

                              +

                              If different components have the same content and the same meaning, they will +be merged automatically, it is therefore not required (and will, in fact, +generate a warning) to assign a custom id to components that should be +translated in the same way. To enable this behavior, the same content and +meaning should be provided.

                              +

                              The meaning of a text message is important so that translators can understand +what the text should represent, even without having to see the actual website. +Take this example:

                              +Example :
                              <span i18n>Address of {{user}}: {{user.address}}</span>

                              Without further knowledge, what does address refer to? The physical address +of the user, or his internet-address? +It is therefore always good practice including a meaning and further description +like so:

                              +Example :
                              <span i18n="Address field|The address that a user lives at"> Address of {{user}} </span>

                              The i18n directive can also be used to translate tooltips, titles and other +attributes of the element. This is done by writing i18n-title, +i18n-matTooltip, e.t.c. The rules are the same as for the regular directive.

                              +

                              The localize-function

                              +

                              While html-elements can be marked for translation using the i18n directive, +the same is not true for strings in non-html components. To enable localization +here, the function $localize() is used. It is comparable to the directive, +however some small changes have to be taken into account:

                              +
                                +
                              1. Meaning and description of the string to translate are in front of the actual +string and are marked using two colons (:).
                              2. +
                              3. The translate-function is special in that it conceptually does not have +parameters. Instead, the string is directly written after the identifier
                              4. +
                              +

                              Example:

                              +Example :
                              alertService.warn($localize`:Illegal input warning:Please provide the correct input for ${field}`);

                              Variables inside the string can be of arbitrary complexity and are escaped using the +${} syntax.

                              +

                              Generate translation files

                              +

                              This is just a quick overiew.For more information, refer to the +How to add another language guide +and the How to edit, update and work with XLF files guide.

                              +

                              Once content with the process of marking fields as translatable and providing +good and understandable meaning to these fields, translation-files can be +generated. This is done using the extract-i18n-script (Can be found in the +file package.json). This script will generate one +"Base file" and will also generate and update existing translation files +for all locales given in the script. These will be located in the +locale directory. +XLF files are standardized and can be read using standard tools such as +the Online XLIFF Editor

                              +

                              The translation files are in xml-format. After some preambles, there are +characteristic blocks that follow all the same schema; blocks like this:

                              +Example :
                              <trans-unit id="947fb7a14ab3d88dbe2ab508622f33bfcae44ad5" datatype="html">
                              +  <source> Change Password </source>
                              +  <context-group purpose="location">
                              +    <context context-type="sourcefile">src/app/core/user/user-account/user-account.component.html</context>
                              +    <context context-type="linenumber">126,127</context>
                              +  </context-group>
                              +  <note priority="1" from="description">Change password button</note>
                              +</trans-unit>

                              The <source> section is this the original string that we defined in code or html. +If you are not in the messages.xlf file but in any other messages.<locale>.xlf file, +you can provide translations. for the locale. For a list of common and standardized locales, +see the ISO-639-2 standard.

                              +

                              To provide a translation, add the <target> tag inside the <trans-unit> +tag (assuming we are inside messages.de.xlf and therefore looking for a +german translation):

                              +Example :
                              <trans-unit id="947fb7a14ab3d88dbe2ab508622f33bfcae44ad5" datatype="html">
                              +  <source> Change Password </source>
                              +  <target> Passwort ändern </target>
                              +  <context-group purpose="location">
                              +    <context context-type="sourcefile">src/app/core/user/user-account/user-account.component.html</context>
                              +    <context context-type="linenumber">126,127</context>
                              +  </context-group>
                              +  <note priority="1" from="description">Change password button</note>
                              +</trans-unit>

                              If all source tags are processed, the translation-process is done!

                              +

                              The building process

                              +

                              To build the app for a specific locale, enter that locale inside +angular.json at

                              +Example :
                              {
                              +  ...
                              +  "options": {
                              +    "localize": ["<your locale>"]
                              +  }
                              +}

                              For the German version for example, just add

                              +Example :
                              {
                              +  "localize": ["de"]
                              +}

                              at the end of "projects" --> "ndb-core" --> "architect" --> "build" before the "configuration"-section starts.

                              +

                              Since the build process is fairly complex, only one locale is allowed during +development. The locale must be inside the locale-folder and be of type +messages.<your locale>.xlf

                              +

                              Angular will not translate the components on the fly. Instead, it will +generate a separate app for each and every component provided in the +localize array.

                              +

                              Other types of localization

                              +

                              Texts are not the only thing characterizing an international app. Other data +has a different expression in different cultures. To enable this, several pipes +can be used to transform that data automatically. For example:

                              +Example :
                              <span>It's a nice day {{today | date}}</span>

                              Will transform the date to different locales. +Pre-built pipes are

                              +
                                +
                              • DatePipe: Formats a date
                              • +
                              • CurrencyPipe: Transforms a number to a currency string
                              • +
                              • DecimalPipe: Transforms a number into a decimal string with given accuracy
                              • +
                              • PercentPipe: Transforms a number to a percent-string
                              • +
                              +

                              ICU-Components

                              +

                              ICU is another standard that Angular uses to localize strings. There +are two ICU-standards of interest: Pluralization and Selection

                              +

                              Pluralization

                              +

                              Some phrases contain plurals, such as

                              +Example :
                              <span>The game starts in {{minutesTillStart}} minutes</span>

                              This can produce the incorrect result of "The game starts in 1 minutes". To +improve this, one should use plural forms. These have the following syntax:

                              +Example :
                              { amount, plural, =0 {none} =1 {one} other {other cases} }

                              amount is the selector - how much actually exists. Following this, +the plural selector follows, indicating that this is a pluralized form. +Finally, the different values that one can pluralize are described. Legal +values are

                              +
                                +
                              • =x matches, when the amount is exactly that value
                              • +
                              • one
                              • +
                              • two
                              • +
                              • few
                              • +
                              • many
                              • +
                              • others
                              • +
                              +

                              others matches all amounts that cannot be matched by anything else. So the +text above could be pluralized like this:

                              +Example :
                              <span>The game starts { minutesTillStart, plural,
                              +  =0 {right now}
                              +  one {in one minute}
                              +  others {in {{minutesTillStart}} minutes} }
                              +</span>

                              Selection

                              +

                              Selection selects one option of a set of selections. A suitable example +for this is the gender of a person:

                              +Example :
                              This is {{person}}. {gender, select, male {He} female {She}} is a nice person.

                              Can be translated to the variants "This is Tom. He is a nice person" as well as +"This is Nancy. She is a nice person". The syntax is:

                              +Example :
                              {variable, select optionA {value_optionA} optionB {value_optionB} ...}

                              The variable's type is arbitrary, however the options have to make sense. +Types that are known to work well are the standard types of strings, numbers +and booleans.

                              +

                              Do's and dont's

                              +
                                +
                              • Try to keep your translatable texts as simple as possible concerning the +amount of string-interpolation or computation inside the {{}}-Blocks. This +makes it easier for translators

                                +
                              • +
                              • It may be tempting sometimes to do a 'string-in string' interpolation like so:

                                +Example :
                                <div>
                                +My cat likes milk {{catLikesCheese ? "and cheese" : ""}}
                                +</div>

                                This must not be done. It is hard for translators to understand what's +going on inside the interpolation, and the translated text might not +be accepted by Angular's localize-package. Instead, you could use a +custom getter:

                                +Example :
                                get catYumYum(): string {
                                +  return $localize`My cat likes milk${andMore}`;
                                +}
                                +get andMore(): string {
                                +  return catLikesCheese ? " " + $localize`and cheese` : "";
                                +}
                                Example :
                                <div>{{catYumYum}}</div>

                                where both parts can be localized individually. It is important +to provide a good description here.

                                +

                                Another possibility is to use the ICU selection syntax:

                                +Example :
                                <div>
                                +My cat likes milk { catLikesCheese, select, true {And Cheese} false {} }
                                +</div>
                              • +
                              • Using the $localize function, the placeholders can accept id's that +might simplify the translation process:

                                +Example :
                                $localize`Hello, ${v123}:HELLO_VAR:`;

                                In this example, HELLO_VAR is the id for the variable-substitution +v123. A descriptive id might aid in the translation process.

                                +

                                This is not possible using the i18n tag. In this case, the id +will implicitly be INTERPOLATION and cannot be changed

                                +
                              • +
                              + +
                              +
                              +

                              results matching ""

                              +
                                +
                                +
                                +

                                No results matching ""

                                +
                                +
                                +
                                + +
                                +
                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui/add-another-language.html b/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui/add-another-language.html new file mode 100644 index 0000000000..173887fafe --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui/add-another-language.html @@ -0,0 +1,252 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                +
                                + + +
                                +
                                + + + + + + + + + + + + + + + + + + + + + +

                                How to add another language to the project

                                +

                                Abstract

                                +

                                This guide depicts the workflow one needs to go through to add another language +(such as hindi, bengali, french e.t.c.) to the project

                                +

                                1) Find the correct language code

                                +

                                You first need the correct ISO-639-2 Language-Code. To find this code for a given +language, go to their website +and find the code that corresponds to your language (look in the ISO 639-1 Code column). +For example, for french, this would be fr, for hindi, this would be hi

                                +

                                In addition to a language code, you might consider specifying a country if the spoken language can +differ based on where the app should be shipped to. For example, English is spoken differently +in the US (en-US), Great-Britain (en-GB) or Australia (en-AU). +A list of available country codes can be found here. +Once you have the language and country code, the resulting code is language code-country code.

                                +

                                2) Let xliffmerge know about the new language

                                +

                                xliffmerge is a tool that helps in the translation process. Especially, it is needed to +update the language files while retaining old translations.

                                +

                                Go to xliffmerge.json and add your language code to the languages section. +Again, for french, this could look like this:

                                +Example :
                                {
                                +  ...
                                +  "languages": [
                                +    // other languages
                                +    "fr"
                                +  ]
                                +}

                                3) Create a localization-file

                                +

                                In order to allow the actual translation process to take place, you need to create a +standardized file that translators can work with. The standard that we use is xlf.

                                +

                                To generate a file, simply use the script extract-i18n located inside the package.json +file. This will automatically generate the needed file if none exists

                                +

                                4) Add language icon

                                +

                                Go to the LanguageService and add the language to the list of availableLocales. +This allows the app to show the langauge icon in the language select component.

                                +

                                5) Include language in bundle

                                +

                                To reduce the bundle size, only supported languages are shipped with the production build. +To support a language by Angular (dates, units etc.) add the language to the webpack include in the main.ts +file:

                                +Example :
                                const localeModule = await import(
                                +  /* webpackInclude: /(fr|de)\.mjs/ <-- add language between the brackets sepreated by a pipe symbol */
                                +  `../node_modules/@angular/common/locales/${locale}`
                                +);

                                6) Test your build

                                +

                                Run the app. +You can change the language in the top right corner. +If you have not added translations, the app will be in english. +Try to translate some units.

                                +

                                In order to do this, go to the newly created src/locale/messages.<locale>.xlf file. +Inside this file, you will find a lot of"trans-units". These mark single texts that +you can translate. Translate one or more of these units by replacing the content of +the target. For example:

                                +Example :
                                
                                +<trans-unit id="08c74dc9762957593b91f6eb5d65efdfc975bf48" datatype="html">
                                +  <source>Username</source>
                                +  <target state="translated">Nom d'utilisateur</target>
                                +  <context-group purpose="location">
                                +    <context context-type="sourcefile">src/app/core/admin/user-list/user-list.component.html</context>
                                +    <context context-type="linenumber">7,8</context>
                                +  </context-group>
                                +  <context-group purpose="location">
                                +    <context context-type="sourcefile">src/app/core/session/login/login.component.html</context>
                                +    <context context-type="linenumber">32</context>
                                +  </context-group>
                                +  <context-group purpose="location">
                                +    <context context-type="sourcefile">src/app/core/user/user-account/user-account.component.html</context>
                                +    <context context-type="linenumber">26</context>
                                +  </context-group>
                                +</trans-unit>

                                You can change the state to "translated" as shown in the picture (but this is not required). +Leave everything else as it is and test the app again. Translations should appear for each +trans-unit that you have translated.

                                +

                                A more detailed overview can be found in Guide +How to edit, update and work with XLF files.

                                +

                                Conclusion

                                +

                                You have now successfully added the capability to translate the app into the target +language. You can now take the translation file ("src/locale/messages.<your locale>.xlf") and +send it to a translator to have it translated. Once this process is done, replace the +preliminary translation file with the one that comes back from a translator.

                                + +
                                +
                                +

                                results matching ""

                                +
                                  +
                                  +
                                  +

                                  No results matching ""

                                  +
                                  +
                                  +
                                  + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui/work-with-xlf.html b/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui/work-with-xlf.html new file mode 100644 index 0000000000..2ba78aa84d --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/build-localizable-(translatable)-ui/work-with-xlf.html @@ -0,0 +1,259 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                  +
                                  + + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + +

                                  How to edit, update and work with XLF files

                                  +

                                  "xlf-files" are the files generated by the extract-i18n script. They conform to the +XLIFF Standard (Version 1.2)

                                  +

                                  How to create XLF files

                                  +

                                  You create XLF files automatically when you specify a new language. For details on how +this works, have a look at the Add another Language guide.

                                  +

                                  How to update XLF files

                                  +

                                  Angular does not natively support updating old files. To do this, +xliffmerge is used. This process takes into account old translations and +merges them with new translations so that the number of items to translate +stays at a minimum. Various configuration-options can be found at +xliffmerge.json with the most interesting being

                                  +
                                    +
                                  • allowIdChange - whether the tool is allowed to merge translation-units +with different ID's. This can be desired if two units have the same meaning and +text, but differ in - for example - the amount of leading whitespaces.

                                    +
                                  • +
                                  • autotranslate - experimental feature, can automatically translate the english +file using Google Translate

                                    +
                                  • +
                                  • beautifyOutput - makes the output more human-readable

                                    +
                                  • +
                                  +

                                  Updating language files has several implications:

                                  +
                                    +
                                  • When a message is obsolete (you deleted the message from the code) it gets removed
                                  • +
                                  • Multiple messages (messages with the same description and meaning) are merged +automatically
                                  • +
                                  • New messages will be added to the list automatically. These will have the state new
                                  • +
                                  +
                                  +

                                  Hint: If you added new texts to translate and used xliffmerge, you can find those by +searching for the string "new"

                                  +
                                  +

                                  Available Tools

                                  +

                                  There are several tools that can be used to translated in a graphically appealing way. +This is an incomplete list of some of these tools:

                                  +
                                    +
                                  • Online XLIFF Editor: A free editor that has limited +capabilities
                                  • +
                                  • PO Editor: A capable editor that you need an +acount for but is limited to 1000 strings with a free account
                                  • +
                                  • Lokalize: +A tool that highlights <x .../> tags which prevents a user to accidentally delete them +but lacks other features. Limited free version
                                  • +
                                  • OmegaT: A free tool for Windows, Mac and Linux with limited +capabilities
                                  • +
                                  +

                                  Manual Translation

                                  +

                                  You can also do this manually in the XLF Document. The process is as follows:

                                  +
                                    +
                                  1. Find the file for your locale, named messages.<locale>.xlf. They can be found +in the locale folder. This file consists of several 'trans-unit's. +Each of them consists of several sections. Here is an example of such a trans unit for german (de)Example :
                                    <trans-unit id="2c2620b14c4290b8f8c0c90abc6b6b17bff06ec6" datatype="html">
                                    +  <source>class <x id="INTERPOLATION" equiv-text="{{ entity?.schoolClass }}"/></source>
                                    +  <target state="translated">Klasse <x id="INTERPOLATION" equiv-text="{{ entity?.schoolClass }}"/></target>
                                    +  <context-group purpose="location">
                                    +    <context context-type="sourcefile">src/app/child-dev-project/children/child-block/child-block.component.html</context>
                                    +    <context context-type="linenumber">34</context>
                                    +  </context-group>
                                    +  <note priority="1" from="description">e.g. 'class 8'</note>
                                    +  <note priority="1" from="meaning">The class a child is attending</note>
                                    +</trans-unit>
                                      +
                                    • Inside the trans-unit we see the two tags id and datatype. The id is a unique id +that belongs to this trans unit. It can also be a custom, more descriptive id. In most +cases, this is a generated id that you should pay no attention to when translating.
                                    • +
                                    • The datatype is always html, disregarding regardless of whether this actually came +from an html file.
                                    • +
                                    • The source is the text that should be translated. This may not be altered.
                                    • +
                                    • The target is the translation. Any special elements, such as <x ... /> must not be +changed. The content of them can be ignored. Additionally, a state can be associated +with a translation. There are two common states: new and translated indicating that +a new message has been added and has not been translated resp. that a message has already +been translated. Additional states can be found at the website of the standard.
                                    • +
                                    • The context-group contains information where the text got extracted from. It can be +ignored and must not be changed.
                                    • +
                                    • Further notes are attached to trans units in order to ease the translation process. +You should also not change them, but they will be helpful.
                                    • +
                                    +
                                  2. +
                                  3. Translate the target of all trans units.
                                  4. +
                                  + +
                                  +
                                  +

                                  results matching ""

                                  +
                                    +
                                    +
                                    +

                                    No results matching ""

                                    +
                                    +
                                    +
                                    + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/configure-and-customize-a-system.html b/documentation/additional-documentation/how-to-guides/configure-and-customize-a-system.html new file mode 100644 index 0000000000..e9dd1e35be --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/configure-and-customize-a-system.html @@ -0,0 +1,184 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                    +
                                    + + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + +

                                    Configure and Customize a System

                                    +

                                    The platform allows very flexible customization of the user interface and data structures to different use cases. +This is usually possible without changes to the code base, using the configuration system.

                                    +
                                    +

                                    This guide is currently only a "stub".

                                    +

                                    For the time being, please refer to the documentation about the Configuration.

                                    +
                                    + +
                                    +
                                    +

                                    results matching ""

                                    +
                                      +
                                      +
                                      +

                                      No results matching ""

                                      +
                                      +
                                      +
                                      + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/create-a-custom-view-component.html b/documentation/additional-documentation/how-to-guides/create-a-custom-view-component.html new file mode 100644 index 0000000000..ca576e0670 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/create-a-custom-view-component.html @@ -0,0 +1,224 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                      +
                                      + + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + +

                                      How to create a custom View Component

                                      +

                                      We aim to build flexible, reusable components. +If you implement a custom component using the building blocks of Aam Digital's platform, this can seamlessly be displayed both in modal forms and as a fullscreen view.

                                      +

                                      Architecture & Generic wrapper components

                                      +

                                      The following architecture allows you to implement components that only have @Input properties +and do not access either Route or Dialog data directly. +Instead, the platform always uses RoutedViewComponent or DialogViewComponent to parse such context and pass it into your component as simple Angular @Inputs.

                                      +

                                      +

                                      If you implement a special view to display a single entities' details, you should also extend AbstractEntityDetailsComponent with your component. +This takes care of loading the entity from the database, in case it is passed in as an id from the URL.

                                      +

                                      Implementing a custom view Component

                                      +
                                        +
                                      1. Create a new component class
                                      2. +
                                      3. Add any @Input() properties for values that are provided from the config.
                                      4. +
                                      5. For EntityDetails views, you get access to an @Input() entity and @Input() entityConstructor via the AbstractEntityDetailsComponent automatically. Otherwise, you do not have to extend from this.
                                      6. +
                                      7. Use <app-view-title> and <app-view-actions> in your template to wrap the elements (if any) that you want to display as a header and action buttons. +These parts are automatically placed differently in the layout depending on whether your component is display as a fullscreen, routed view (actions displayed top right) or as a dialog/modal (actions displayed fixed at bottom).
                                      8. +
                                      9. Register your component under a name (string) with the ComponentRegistry (usually we do this in one of the modules), so that it can be referenced under this string form the config.
                                      10. +
                                      11. You can then use it in config, as shown below.
                                      12. +
                                      +

                                      Example template for a custom view component:

                                      +Example :
                                      <app-view-title>
                                      +  <!-- the title is specially fixed and receives a back button or dialog close -->
                                      +  My Entity {{ entity.name }}
                                      +</app-view-title>
                                      +
                                      +<!-- anything in the template not specially marked/wrapped is used as main content -->
                                      +<div>My Custom View Content</div>
                                      +
                                      +<app-view-actions>
                                      +  <!-- some action buttons, e.g. using the app-dialog-buttons or anything else -->
                                      +  <app-dialog-buttons [form]="form" [entity]="entity"></app-dialog-buttons>
                                      +</app-view-actions>

                                      An example config for the above:

                                      +Example :
                                      {
                                      +  "component": "MyView",
                                      +  "config": { "showDescription": true }
                                      +}

                                      Use the ComponentRegistry to register your component, +e.g. in its Module:

                                      +Example :
                                      export class MyModule {
                                      +  constructor(components: ComponentRegistry) {
                                      +    components.addAll([
                                      +      [
                                      +        "MyView", // this is the name to use in the config document
                                      +        () => import("./my-view/my-view.component").then((c) => c.MyViewComponent),
                                      +      ],
                                      +    ]);
                                      +  }
                                      +}
                                      +
                                      +
                                      +

                                      results matching ""

                                      +
                                        +
                                        +
                                        +

                                        No results matching ""

                                        +
                                        +
                                        +
                                        + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/create-a-new-datatype.html b/documentation/additional-documentation/how-to-guides/create-a-new-datatype.html new file mode 100644 index 0000000000..e9697bf17a --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/create-a-new-datatype.html @@ -0,0 +1,228 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                        +
                                        + + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + +

                                        How to create a new Datatype

                                        +

                                        "Datatypes" define how a single field (i.e. entity property) is stored and displayed. +They are core building blocks for all entities and can enable advanced functionality, like displaying a streetmap for an address.

                                        +

                                        The Aam Digital core defines most commonly known datatypes already (see CoreModule). +The architecture of datatypes is designed for extension however, so you can easily add further types.

                                        +

                                        The base: DefaultDatatype and Angular Service

                                        +

                                        DefaultDatatype is the base class for all implementations of custom datatypes. +It implements default logic for all the required aspects so that you can override only those parts that are relevant for your new type.

                                        +

                                        Implementations of datatypes are normal Angular Services. +This allows you to inject and use any other service that you may need to do sophisticated data transformations.

                                        +

                                        Defining a new Datatype

                                        +
                                          +
                                        • Create a new Angular Service class (according to our file name convention it should follow the pattern my-custom.datatype.ts)
                                        • +
                                        • Use inheritance to extend the DefaultDatatype class
                                        • +
                                        • Define your datatype identifier (which is used in @DatabaseField annotations in their EntitySchemaField definitions) by setting the static dataType = "my-custom" property of your class
                                        • +
                                        • Override any of the other aspects if you want to customize them
                                        • +
                                        +

                                        This could result in a Datatype class like this:

                                        +Example :
                                        @Injectable()
                                        +export class MyCustomDatatype extends DefaultDatatype<SpecialObject, string> {
                                        +  static dataType = "my-custom";
                                        +
                                        +  constructor() {
                                        +    super();
                                        +    // use constructor to simply inject other services you need
                                        +  }
                                        +
                                        +  editComponent = "EditMyCustomFormField";
                                        +  viewComponent = "DisplayText";
                                        +  // make sure to register your new components in the ComponentRegistry
                                        +
                                        +  transformToDatabaseFormat(value: SpecialObject): string {
                                        +    // storing as string in the database for whatever reason
                                        +    return value.toString();
                                        +  }
                                        +
                                        +  transformToObjectFormat(value: string): SpecialObject {
                                        +    return transformToSpecialObject(value);
                                        +  }
                                        +
                                        +  importConfigComponent = "SpecialImportValueMapping";
                                        +
                                        +  importMapFunction(value: any, schemaField: EntitySchemaField, additional?: any) {
                                        +    return SpecialValueParserForDifferentImportFormats(value);
                                        +  }
                                        +}

                                        Please also refer to the extensive JsDoc code comments in the DefaultDatatype class.

                                        +

                                        Registering the new Datatype

                                        +

                                        Provide your datatype service using Angular dependency injection: +{ provide: DefaultDatatype, useClass: MyCustomDatatype, multi: true },

                                        +

                                        The EntitySchemaService, that handles all data transformations, and other platform modules automatically pick up your datatype +and use it for any entity properties that use the dataType identifier of your implementation.

                                        + +
                                        +
                                        +

                                        results matching ""

                                        +
                                          +
                                          +
                                          +

                                          No results matching ""

                                          +
                                          +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/create-a-new-entity-type.html b/documentation/additional-documentation/how-to-guides/create-a-new-entity-type.html new file mode 100644 index 0000000000..54ec9e025a --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/create-a-new-entity-type.html @@ -0,0 +1,248 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                          +
                                          + + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + +

                                          How to create a new Entity Type

                                          +

                                          "Entities" are the objects around which our whole system is built. +Entity types specify a data structure for records in the case management system, +defining both the data object as well as some details how the records are displayed in the UI to users. +There may for example be User, Child or School classes representing the types of objects the users can view in lists and detail forms and interact with.

                                          +

                                          To adapt the platform to a certain use case, you usually want to adapt entity types or create new ones. +This defines what fields users can see and edit in forms, among other things.

                                          +

                                          There are two approaches to define entity types:

                                          + +

                                          Unless you have special requirements and write further code specifically for your entity type, +you usually should rely on the more flexible and easy approach defining them in the config.

                                          +

                                          This guide talks about the advance topic of implementing an entity type via code.

                                          +
                                          +

                                          Creating a custom Entity type in code

                                          +

                                          To extend the system with types, you can create a new module and extend the existing base class of the Entity system. +This is something you would only do if you are also implementing special components or services in the code base to handle this entity type. +Otherwise, it is easier and more flexible to define an entity type through the config system only, as shown above.

                                          +

                                          The EntityModule specifies the base class and generic features, specific entity types can extend upon it. +For an example, have a look at the User class that extends Entity.

                                          +

                                          The Entity class

                                          +

                                          Entity and any class extending it are only plain TypeScript classes defining the attributes (and possibly some "business logic" methods).

                                          +

                                          The classes should never contain code for saving/deleting or other database related code because we are keeping this separate in an EntityMapper class (see Data Mapper Pattern).

                                          +

                                          To keep them easy to understand and extend the Entity (sub-)classes also shouldn't depend on other components or services - Entity classes are not by themselves part of the Angular system and do not have dependency injection!

                                          +

                                          The EntitySchema

                                          +

                                          The EntitySchema object is defining which attributes of the class will be saved to the database. +Attributes not explicitly defined in the Entity sub-type's schema are ignored when an instance is saved.

                                          +

                                          You must annotate your Entity class with the @DatabaseEntity('ENTITY_TYPE') decorator +thereby defining a database prefix for your Entity type.

                                          +

                                          Any properties that you want to be persisted in the database when saving entities of this type +must have the @DatabaseField() decorator. +Any other properties are ignored and will be lost after saving and loading an entity of this type. +As an example look at this class' schema definition:

                                          +Example :
                                          @DatabaseEntity('Dummy')
                                          +class Dummy extends Entity {
                                          +  @DatabaseField() name: string;
                                          +  @DatabaseField() size: number = 1;
                                          +  @DatabaseField({dataType: 'month'}) month: Date;
                                          +  temp: string = 'foo';
                                          +}

                                          Only dummy.name, dummy.size and dummy.month of a Dummy class instance are saved to the database. +The dummy.temp property is available for internal processing but will be ignored when saving the entity to the database.

                                          +

                                          You can also set additional options for DatabaseFields and implement your own data transformations. +For more details see the concept of the EntitySchema System.

                                          +

                                          Other components to be implemented for a new sub-type

                                          +

                                          The following components are related to display an Entity sub-type and currently implemented for each new sub-type as Angular components:

                                          +
                                            +
                                          • EntityDetailsComponent: displays all attributes of one of the Entity's objects to the user
                                          • +
                                          • EntityListComponent: displays a list of all the Entity's objects
                                          • +
                                          • EntityBlockComponent: displays a small, inline representation of one of the Entity's objects for use in other components
                                          • +
                                          +

                                          Example: Creating a new Entity sub-type

                                          +Example :
                                          import { Entity } from '../entity/entity';
                                          +import { Gender} from './Gender';
                                          +
                                          +@DatabaseEntity('Child')
                                          +export class Child extends Entity {
                                          +  @DatabaseField() name: string;
                                          +  @DatabaseField({dataType: 'string'}) gender: Gender;
                                          +  @DatabaseField() dateOfBirth: Date;
                                          +  @DatabaseField() marks: [];
                                          +
                                          +  age(): number {
                                          +     // calculate from this.dateOfBirth
                                          +  }
                                          +
                                          +  // Override this to define a human-readable, textual summary of the instance
                                          +  toString(): string {
                                          +    return this.name + ' (' + this.age() + ')';
                                          +  }
                                          +}
                                          +
                                          +
                                          +

                                          results matching ""

                                          +
                                            +
                                            +
                                            +

                                            No results matching ""

                                            +
                                            +
                                            +
                                            + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/create-a-report.html b/documentation/additional-documentation/how-to-guides/create-a-report.html new file mode 100644 index 0000000000..ef55db4f19 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/create-a-report.html @@ -0,0 +1,279 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                            +
                                            + + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + +

                                            Reports

                                            +

                                            The reporting module allows organizations to automatically create reports of aggregated data for a given timespan. +This can be used to track indicators and export anonymous data.

                                            +

                                            There are currently two systems available to generate reports, both using the same config documents (ReportConfig:*):

                                            +
                                              +
                                            • SQL-based queries executed server-side using the SQS server
                                            • +
                                            • (legacy) client-side generator using the aggregation & query syntax below
                                            • +
                                            +

                                            SQL Reports

                                            +

                                            For this feature, we have integrated the (optional) structured-query-service (SQS) +(this creates a read-only copy of the data in the CouchDB and allows to run Sqlite queries against it). +SQS enables the possibility to create SQL based queries in reports.

                                            +

                                            The SQS image is not available as open source and needs a licence. It is pulled from a private container registry.

                                            +

                                            Deployment

                                            +

                                            To activate it for an application, simply activate "aam-backend-service" profile (COMPOSE_PROFILES=aam-backend-service) in the applications .env file and run docker compose up -d.

                                            +

                                            Configuration

                                            +

                                            The reports can be defined as ReportConfig:* entities.

                                            +

                                            There are different modes for ReportConfig:

                                            +

                                            sql

                                            +

                                            Requirements: SQS

                                            +

                                            Simple SQL Report

                                            +Example :
                                            // app/ReportConfig:test-report
                                            +{
                                            +  "_id": "ReportConfig:test-report",
                                            +  "title": "Test Report",
                                            +  "mode": "sql",
                                            +  "aggregationDefinition": "SELECT c.name as name, c.dateOfBirth as dateOfBirth FROM Child c",
                                            +  "neededArgs": []
                                            +}

                                            SQL Report With Arguments

                                            +

                                            Additional arguments for the query (like a from and to date parameter) can be used in the SQL query directly using "?". The "neededArgs" array defines what arguments are filled for the "?" placeholders in the given order.

                                            +Example :
                                            // app/ReportConfig:test-report
                                            +{
                                            +  "_id": "ReportConfig:test-report",
                                            +  "title": "Test Report",
                                            +  "mode": "sql",
                                            +  "aggregationDefinition": "SELECT c.name as name, c.dateOfBirth as dateOfBirth FROM Child c WHERE created_at BETWEEN ? AND ?",
                                            +  "neededArgs": [
                                            +    "from",
                                            +    "to"
                                            +  ]
                                            +}

                                            JSON-Query Reports (legacy)

                                            +

                                            Aggregation structure

                                            +

                                            Inside the aggregationDefinitions an array of aggregations can be added. +The following example shows the structure of an aggregation.

                                            +Example :
                                            {
                                            +  "label": "Events",
                                            +  "query": "EventNote:toArray[*date >= ? & date <= ?]",
                                            +  "groupBy": ["category"],
                                            +  "aggregations": [
                                            +    {
                                            +      "query": ":getParticipantsWithAttendance(PRESENT):unique:addPrefix(Child):toEntities",
                                            +      "groupBy": ["gender", "religion"],
                                            +      "label": "Participants"
                                            +    }
                                            +  ]
                                            +}
                                              +
                                            • The label will be used to display the length of the query result in the final report.
                                            • +
                                            • The query defines a valid JSON-Query.
                                            • +
                                            • groupBy defines an array of properties by which the results of the query are grouped, +these results will be nested in the top-level query.
                                            • +
                                            • The aggregations array can be filled with further aggregations with the same structure. +They will be executed on the result of the query as well as on each groupBy result.
                                            • +
                                            +

                                            query syntax

                                            +

                                            A full documentation can be found here. +The most top-level aggregation has to start with the entity which should be queried. +This can be done by selecting the entity type and chaining it with :toArray: e.g. Child:toArray. +Now the array of all children is ready to be aggregated. +You could for example be interested in all the children older than 10: Child:toArray[* age > 10]. +The * tells the query language to select all the children and not just one. +The simple age call refers to the get age() function of the child entity. +If you are interested in all female children older than 10 the call would look like Child:toArray[* age>10 & gender=F]. +If you are only interested in the names of these children Child:toArray[* age>10 & gender=M].name will transform the +array of children into an array of strings.

                                            +

                                            To navigate between different entities a set of functions extends the query syntax. +The full documentation for all the available functions can be found and extended in the +QueryService. +The first function you already know :toArray which creates an object into an array of values of this object. +The following functions also exist:

                                            +
                                              +
                                            • :unique removes all duplicates from an array
                                            • +
                                            • :addPrefix(<ENTITY_TYPE>) adds the prefix <ENTITY_TYPE> to all strings in the input array. +This is necessary to use the :toEntities function. +The prefix will only be added if it is not set yet.
                                            • +
                                            • :toEntities transforms an array of entity-ids into an array of entities. +The IDs need to have the full format e.g. Child:1234-5678. +Therefore :addPrefix should always be used to add the correct entity before calling :toEntities.
                                            • +
                                            • :getRelated(<ENTITY_TYPE>, <PROPERTY_NAME>) is used to get the entity or entities which are mentioned through ids +on a property of another entity e.g., to get all children that are part of a set of notes write Note:toArray:getRelated(Child, children)
                                            • +
                                            • :getIds(<PROPERTY_NAME>) works similar to :getRelated but does not transform the ids into entities.
                                            • +
                                            • :filterByObjectAttribute(<PROPERTY_NAME>, <KEY>, <VALUE>) is used to filter by an attribute which is a complex +object like a configurable-enum. <PROPERTY_NAME> refers to the name of the property of the parent attribute, +<KEY> refers to a key of this property and <VALUE> refers to the value(s) for which should be filtered. +<VALUE> can be a string of multiple matches which are separated by |. +E.g., to get all notes which are home visits or guardian talks write: +Note:toArray:filterByObjectAttribute(category, id, HOME_VISIT|GUARDIAN_TALK)
                                            • +
                                            • :getParticipantsWithAttendance(<ATTENDANCE_STATUS>) only returns the children with the given attendance for a set +of notes. The attendance refers to the :countAs attribute. To get all present children write +Note:toArray:getParticipantsWithAttendance(PRESENT)
                                            • +
                                            • :addEntities(<ENTITY_TYPE>) can be used to create an array holding multiple entity types. +E.g., to create an array holding notes and event notes write Note:toArray:addEntities(EventNote).
                                            • +
                                            + +
                                            +
                                            +

                                            results matching ""

                                            +
                                              +
                                              +
                                              +

                                              No results matching ""

                                              +
                                              +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/create-an-entity-details-panel.html b/documentation/additional-documentation/how-to-guides/create-an-entity-details-panel.html new file mode 100644 index 0000000000..32266a481b --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/create-an-entity-details-panel.html @@ -0,0 +1,202 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                              +
                                              + + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + + +

                                              How to create an Entity Details Panel Component

                                              +

                                              Aam Digital as a platform takes care of loading the relevant entity and configs for an "Entity Details View", +which displays the information about a single entity (e.g. one specific student). +The EntityDetailsComponent handles this initialization from the route. +To display some details in a customized way, you can create "panel components" that receive a reference to the current entity and their config parameters as @Input() automatically.

                                              +

                                              +The tabs (in the config called "panels") within the Entity Details view can display one or more "panel components", as shown above.

                                              +

                                              To make these components as re-usable and simple as possible, we do not load config from the route here. +Instead, the components are initialized from config by the DynamicComponentDirective. +This automatically sets @Input() properties to the value with the same name in the config object.

                                              +

                                              Those background details aside, what that means for your implementation is:

                                              +

                                              Implementing a new Panel Component

                                              +
                                                +
                                              1. Create a new component class
                                              2. +
                                              3. Add an @Input() entity: Entity;. This will always contain the entity object, whose Details View is currently being displayed. You should not load this yourself from the database.
                                              4. +
                                              5. (If needed) Add more inputs for aspects that should be configurable about your component. +(e.g. @Input() showDescription: boolean;, which you can use in your template or code to adapt the component.) +These values are automatically set to whatever value is specified in the config object for your component at runtime in the database.
                                              6. +
                                              7. Register the new component in its parent module, so that it can be loaded under its name through the config. +(for details see Create a custom View Component)
                                              8. +
                                              +

                                              An example config for the above:

                                              +Example :
                                              {
                                              +  "component": "MySubView",
                                              +  "config": { "showDescription": true }
                                              +}
                                              +
                                              +
                                              +

                                              results matching ""

                                              +
                                                +
                                                +
                                                +

                                                No results matching ""

                                                +
                                                +
                                                +
                                                + +
                                                +
                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/development-processes.html b/documentation/additional-documentation/how-to-guides/development-processes.html new file mode 100644 index 0000000000..d6803b1d2e --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/development-processes.html @@ -0,0 +1,208 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                +
                                                + + +
                                                +
                                                + + + + + + + + + + + + + + + + + + + + + +

                                                How to contribute code to the project

                                                +

                                                Workflow

                                                +

                                                We are following the "GitHub Flow", using feature branches for development. +Please read through the following short guide before you get started: +Understanding the GitHub Flow.

                                                +

                                                In summary, this means each feature will be implemented on it's own branch, which will then merged back onto the master branch. If you participate in the development, either by fixing a bug or implementing a new feature, follow these steps:

                                                +
                                                  +
                                                1. Analyze the bug or feature in a GitHub issue. +Discuss possible approaches to solve it in the issue.
                                                2. +
                                                3. Create a new branch (from the current master!) for each issue/feature you are working on. Use a descriptive branch name.
                                                4. +
                                                5. Make commits on this branch. Use descriptive commit messages. If things are complex make multiple, logical commits. +Do not use the same branch for implementing multiple features or bug fixes +(instead create a separate branch from the master branch for each).
                                                6. +
                                                7. Run ng test to see if all unit tests are passed. +If possible/necessary add more unit tests related to your new code. All tests must be passed before your contribution can be accepted.
                                                8. +
                                                9. Run ng lint to see if your code passes our project's code formatting standards. +All problems must be resolved before your contribution can be accepted.
                                                10. +
                                                11. Once you have finished your work or want some feedback/discussion about it, open a new pull request (PR) on GitHub. +Any reviews, feedback and discussions about your code will take place in this PR on GitHub. Please follow it and explain or adapt your code if necessary.
                                                12. +
                                                13. A different developer will merge your PR back onto the master branch. This makes sure there was a code review and manual testing.
                                                14. +
                                                15. After merging, delete your feature branch and make sure the corresponding issue(s) and pull request are closed.
                                                16. +
                                                +

                                                Remarks

                                                +
                                                  +
                                                • Reference an issue on GitHub in your commits or comments by writing the issue number (e.g. #15 to reference issue #15)
                                                • +
                                                • Add [WIP] to the beginning of the PR title if this is still "work in progress" and should not be merged yet.
                                                • +
                                                • If you have a lot of trivial commits in your working feature branch (such as fixed typos, fixed codestyle warnings, ...) you may squash some commits for better readability of the git history. +This can be done with a git rebase on your feature branch (please never rebase the master branch). +Further information can be found in the Git Book.
                                                • +
                                                • The Angular Style Guide provides helpful principles for Angular development.
                                                • +
                                                + +
                                                +
                                                +

                                                results matching ""

                                                +
                                                  +
                                                  +
                                                  +

                                                  No results matching ""

                                                  +
                                                  +
                                                  +
                                                  + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/development-processes/document-code.html b/documentation/additional-documentation/how-to-guides/development-processes/document-code.html new file mode 100644 index 0000000000..d025a2eeac --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/development-processes/document-code.html @@ -0,0 +1,199 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                  +
                                                  + + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + + + +

                                                  How to document code

                                                  +

                                                  Our Developer Documentation (which you are also currently reading here) is generated using compodoc.

                                                  +

                                                  While the How-To Guides and Concepts are explicitly written +the API Reference (what you see in the sections Modules, Classes etc.) is generated from JsDoc code comments.

                                                  +

                                                  Therefore, whenever you write new code, please also document it with appropriate code comments.

                                                  +
                                                  +

                                                  also read about our overall Documentation Structure & Approach

                                                  +
                                                  +

                                                  Instructions

                                                  +
                                                    +
                                                  • With every push to the master, travis generates this documentation of the project automatically. +All you have to do is to Comment your code with basic JSDoc! * For the correct comment format read https://compodoc.app/guides/comments.html
                                                  • +
                                                  • New code should always be documented as soon as you write or edit it. +Your Pull Request should include documentation.
                                                  • +
                                                  • If you want to add or edit separate additional documentation like this page, work on branch compodoc and edit the markdown files under doc/compodoc_sources. +If you add a new markdown file you also have to add it to summary.json.
                                                  • +
                                                  +

                                                  Additional Information

                                                  +
                                                    +
                                                  • npm run compodoc (see package.json) is used by Travis CI to generate the documentation.
                                                  • +
                                                  • You can also run npm run compodoc manually. You should better use the documentation provided online, however.
                                                  • +
                                                  + +
                                                  +
                                                  +

                                                  results matching ""

                                                  +
                                                    +
                                                    +
                                                    +

                                                    No results matching ""

                                                    +
                                                    +
                                                    +
                                                    + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/development-processes/review-a-pull-request.html b/documentation/additional-documentation/how-to-guides/development-processes/review-a-pull-request.html new file mode 100644 index 0000000000..a22136717f --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/development-processes/review-a-pull-request.html @@ -0,0 +1,268 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                    +
                                                    + + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + +

                                                    How to review a pull request

                                                    +

                                                    Every regular team member is encouraged to review other pull requests (PRs). +You don't have to be a senior programmer or an expert in that particular part of the code +to help by reviewing PRs (and possibly learn something along the way).

                                                    +

                                                    To establish best practices for our project and make reviews easier for you +we are documenting guidelines for reviews here.

                                                    +

                                                    Goals: Why do we have reviews?

                                                    +

                                                    Why do we bother to spend time on code reviews / PR reviews? +The main goals are:

                                                    +
                                                      +
                                                    1. Prevent bugs from getting into the master branch - and thereby onto users' devices.
                                                    2. +
                                                    3. Improve code quality - especially ensuring that the code is easy to understand.
                                                    4. +
                                                    +

                                                    Everybody has blind spots +and sometimes we are also tempted to take short cuts (and forget to clean them up later). +So it's essential to have a second set of eyes looking at code +regardless of whether it was written by a long contributing, experienced developer +or someone submitting their first PR.

                                                    +

                                                    Reviews are not about criticizing someone. +They are about jointly discussing how things can be improved +or even just what parts have room for improvement.

                                                    +

                                                    Definition of Done: When to accept a PR?

                                                    +

                                                    As far as possible we try to automate the must-have criteria to accept and merge a PR +with the help of GitHub and Travis CI tools. +But one of these required steps is also that the PR must have an "approving" review of another developer.

                                                    +

                                                    The following aspects are required for a PR to be merged. +These are our expectations of quality that we have set ourselves:

                                                    +

                                                    The PR's changes must be:

                                                    +
                                                      +
                                                    1. working for the user as expected
                                                    2. +
                                                    3. tested by automated unit tests
                                                    4. +
                                                    5. easy to understand in code
                                                    6. +
                                                    +

                                                    The following sections specify more details of these high-level aspects +and give you concrete steps for how you can review them.

                                                    +

                                                    (1.) Is the app working?

                                                    +

                                                    The most essential thing about any change: It should work for users running the app.

                                                    +

                                                    As a reviewer that means for you:

                                                    +
                                                      +
                                                    1. Check out the branch of the PR on your machine.
                                                    2. +
                                                    3. Run npm install to make sure you have all the right dependencies installed.
                                                    4. +
                                                    5. Run the app locally. +Put yourself in the shoes of a user and click around, testing the app: 1. Does the new feature / bugfix function as discussed and expected? 2. How are edge cases and errors handled? +_ This depends on the kind of change. If you can't think of any, just go on. 3. Does the user get feedback about what is going on in a way that is understandable for people with no technical knowledge? +(That is in case of success as well as failure.) 4. Do related features that might have been affected by the changes of this PR still work? +_ Again, this depends on the kind of PR. If you don't see anything else to test, that's absolutely okay. 5. If the change affects UI elements: How do they look in a smaller browser window?
                                                    6. +
                                                    7. Write a comment in the PR on GitHub about what any problems or ideas you encountered.
                                                    8. +
                                                    +

                                                    (2.) Is the code tested with unit tests?

                                                    +

                                                    The unit testing is checked automatically and concerns two aspects:

                                                    +
                                                      +
                                                    • Are all tests passing?
                                                        +
                                                      • That is new tests for this PR as well as all other tests to ensure no previously working function was broken.
                                                      • +
                                                      +
                                                    • +
                                                    • Are the changes of this PR covered by unit tests?
                                                        +
                                                      • We aim for a "test coverage" of at least 80% and PRs should contain new unit tests for the changes they are making.
                                                      • +
                                                      +
                                                    • +
                                                    +

                                                    The CI system reports the status of these conditions automatically and displays them in the GitHub PR.

                                                    +

                                                    You don't have to do any specific reviewing regarding this. +If some tests fail, you may want to wait with your review until the author has fixed them so that you can review a final, working state of the code. +Also, if you notice some important edge cases that are not tested by unit tests yet, do suggest these to be added.

                                                    +

                                                    (3.) Is the code understandable and well structured?

                                                    +

                                                    Reviewing a PR means reviewing code. +If you spot a logical error or have a suggestion how to rewrite some code to improve performance that's awesome. +But even more important is asking the right questions and pointing out all the parts that are hard (or impossible) to understand.

                                                    +

                                                    Rather sooner than later even the author of the code will have forgotten the hidden logic of that super complex function. +And she/he will thank your for requesting a simpler code structure or a better documentation during your review.

                                                    +

                                                    You can review the PR's code changes easily on GitHub:

                                                    +
                                                      +
                                                    1. In the GitHub PR switch to the "Files changed" tab.
                                                    2. +
                                                    3. Go through the code changes and comment on specific lines:
                                                        +
                                                      1. If you don't understand what a block of code does. +It should be possible to understand everything. +Be ruthless and ask about everything that's unclear - +code structure and/or documentation should be improved for everybody in this case.
                                                      2. +
                                                      3. If you have a suggestion to improve the code. +Whether you have an idea to structure things in a clearer way +or to solve it differently - share your suggestions.
                                                      4. +
                                                      5. You can also suggest code changes from within the GitHub UI that can be merged - without having the checkout and commit to the branch on you local machine. See Suggesting Changes on GitHub
                                                      6. +
                                                      +
                                                    4. +
                                                    5. "Finish your review" in GitHub. +If there are issues or questions remaining, set the review status "Comment" or "Request Changes" instead of "Approve".
                                                    6. +
                                                    +

                                                    Finish up

                                                    +

                                                    That's it - thank you for improving the project with your feedback through your PR review!

                                                    +

                                                    If you commented with questions or suggestions, please try to follow up quickly when you receive replies. +Otherwise, finishing and merging the PR gets delayed.

                                                    + +
                                                    +
                                                    +

                                                    results matching ""

                                                    +
                                                      +
                                                      +
                                                      +

                                                      No results matching ""

                                                      +
                                                      +
                                                      +
                                                      + +
                                                      +
                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/development-processes/write-automated-unit-tests.html b/documentation/additional-documentation/how-to-guides/development-processes/write-automated-unit-tests.html new file mode 100644 index 0000000000..bf36869ca0 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/development-processes/write-automated-unit-tests.html @@ -0,0 +1,194 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                      +
                                                      + + +
                                                      +
                                                      + + + + + + + + + + + + + + + + + + + + + +

                                                      How to write automated unit tests

                                                      +

                                                      We are trying to cover all functionality with unit tests.

                                                      +

                                                      The approach is not specific to our project so please refer the available general documentation and tutorials about testing of Angular applications.

                                                      +

                                                      The following resources may be helpful:

                                                      + +
                                                      +

                                                      Our project runs all existing tests whenever you create or update a PR on GitHub +and checks test coverage (i.e. how much of your code is actually run by the tests you have written).

                                                      +
                                                      +

                                                      Tips & Guidelines

                                                      +

                                                      Mock all dependencies

                                                      +

                                                      Unit tests for a class should usually cover that "unit" of code, +i.e. your implementation of that class but not of all the referenced other services.

                                                      +

                                                      Try to "mock" all services that your implementation depends on, e.g. using jasmine.createSpyObj.

                                                      + +
                                                      +
                                                      +

                                                      results matching ""

                                                      +
                                                        +
                                                        +
                                                        +

                                                        No results matching ""

                                                        +
                                                        +
                                                        +
                                                        + +
                                                        +
                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/development-processes/write-e2e-tests.html b/documentation/additional-documentation/how-to-guides/development-processes/write-e2e-tests.html new file mode 100644 index 0000000000..ca4bb47325 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/development-processes/write-e2e-tests.html @@ -0,0 +1,299 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                        +
                                                        + + +
                                                        +
                                                        + + + + + + + + + + + + + + + + + + + + + +

                                                        How to write an End-to-End (E2E) test

                                                        +

                                                        Resources and How-Tos

                                                        + +

                                                        Instructions

                                                        +

                                                        1. Create a file

                                                        +

                                                        Manually

                                                        +

                                                        All tests are located under ndb-core/e2e/integration directory. +Create a file with the ending .spec.ts or just .ts

                                                        +

                                                        With command

                                                        +

                                                        Cypress offers a command line tool that automatically creates a test file with a minimal setup for you. +In order to create a test called loging run:

                                                        +
                                                        +

                                                        ng generate @cypress/schematic:e2e --name=login --path=e2e/integration

                                                        +
                                                        +

                                                        Organizing tests

                                                        +

                                                        If you have tests that fit together, create a separate folder inside for them. +This grouping will help you navigate through them better, e.g. /../integration/child-tests/

                                                        +

                                                        2. Gherkin Template

                                                        +

                                                        What is Gherkin and how does it help writing E2E tests

                                                        +

                                                        Gherkin is a formal language that primarily serves as a communication language in agile teams for describing system behaviour based on the concrete examples and thus supports the following goals:

                                                        +
                                                          +
                                                        • Creation of understandable and executable specification for all stakeholders in agile teams.
                                                        • +
                                                        • Starting point for the automation of tests
                                                        • +
                                                        • Documentation of the system behaviour
                                                        • +
                                                        +

                                                        More about Gherkin: Gherkin

                                                        +

                                                        Example of a test description:

                                                        +Example :
                                                        Scenario: Linking a child to a school
                                                        +Given I am on the details page of a child
                                                        +When I add an entry in the 'Previous Schools' section with a specific school
                                                        +Then I can see that child in the 'Children Overview' of the details page of this school

                                                        Gherkin uses a set of special keywords to give structure and meaning to executable specifications.

                                                        +

                                                        The primary keywords are:

                                                        +
                                                          +
                                                        • Given
                                                        • +
                                                        • When
                                                        • +
                                                        • Then
                                                        • +
                                                        • And
                                                        • +
                                                        • But
                                                        • +
                                                        +

                                                        More info here: Keywords

                                                        +

                                                        Each action from Gherkin is written in the test description (e.g. it("<description>", function{})).

                                                        +

                                                        3. Write an E2E-Test

                                                        +

                                                        Some useful links

                                                        + +

                                                        Example

                                                        +Example :
                                                        describe("Scenario of the Test", () => {
                                                        +  before("Given I am at login page", function () {
                                                        +  // In the before() function we can describe our start Point and specific variables
                                                        +  //e.g.
                                                        +    cy.visit("http://localhost:4200");
                                                        +    cy.wrap("Something").as("VariableName");
                                                        +    ...
                                                        +  });
                                                        +
                                                        +  // In the it() function the single tests of the test scenario can be written
                                                        +  it("When I add an entry in the Previous School section", function () {
                                                        +    // get the specific button and click on it
                                                        +    cy.get("buttonElement")
                                                        +      .should("contain", "ButtonName")
                                                        +      .click();
                                                        +    // choose object from Dropdown menu type our Variable and click on it
                                                        +    cy.get('DropdownMenu')
                                                        +      .type(this.VariableName)
                                                        +      .click();
                                                        +      ...
                                                        +  });
                                                        +
                                                        +  //Write more test cases here by adding aditional it functions tags
                                                        +});
                                                        +

                                                        A solid test generally covers 3 phases:

                                                        +
                                                          +
                                                        1. Set up the application state.
                                                        2. +
                                                        3. Take an action.
                                                        4. +
                                                        5. Make an assertion about the resulting application state.
                                                        6. +
                                                        + +

                                                        What role does Gherkin play?

                                                        +

                                                        We take the previous Scenario as example:

                                                        +Example :
                                                        Scenario: Linking a child to a school
                                                        +Given I am on the details page of a child
                                                        +When I add an entry in the 'Previous Schools' section with a specific school
                                                        +Then I can see that child in the 'Children Overview' of the details page of this school

                                                        We can translate this into the following template:

                                                        +Example :
                                                        describe("Scenario: Linking a child to a school", () => {
                                                        +  before("Given I am on the details page of a child", function() {
                                                        +
                                                        +  });
                                                        +
                                                        +  it("When I add an entry in the 'Previous Schools' section with a specific school", function () {
                                                        +
                                                        +  });
                                                        +
                                                        +  it("Then I can see that child in the 'Children Overview' of the details page of this school", function () {
                                                        +
                                                        +  });
                                                        +
                                                        +});

                                                        Now the before(...) and it(...) blocks should be filled with the code that corresponds to the according description.

                                                        +

                                                        4. Run the E2E-Tests

                                                        +

                                                        To open Cypress in the "Open-Mode" run the following command from the project root.

                                                        +
                                                        +

                                                        npm run e2e-open

                                                        +
                                                        +

                                                        This will start the browser with the Cypress Interface. +This Interface is called Test Runner where you can select the tests to be executed and interactively follow and debug the test execution.

                                                        +

                                                        The Selector Playground is also available in the interface, which is a useful tool to write new tests by selecting items in the DOM.

                                                        +

                                                        The tests are also executed in each pull-request. +The check with the name Pipeline / run-e2e-tests (pull_request) indicates whether the E2E tests were successful.

                                                        +

                                                        Aam Digital specific best practices

                                                        +

                                                        TBD.

                                                        +

                                                        Outlook: Better Gherkin integration

                                                        +

                                                        The specification of the scenarios with Gherkin is normally stored in so-called Feature Files. +These files are human-readable text files. +It makes sense to use cypress-cucumber-preprocessor in the future. +This or a similar framework can speed up test creation because it allows Feature Files to be interpreted into Cypress code

                                                        + +
                                                        +
                                                        +

                                                        results matching ""

                                                        +
                                                          +
                                                          +
                                                          +

                                                          No results matching ""

                                                          +
                                                          +
                                                          +
                                                          + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/display-dialogs-and-notifications.html b/documentation/additional-documentation/how-to-guides/display-dialogs-and-notifications.html new file mode 100644 index 0000000000..2412041103 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/display-dialogs-and-notifications.html @@ -0,0 +1,210 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                          +
                                                          + + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + + + +

                                                          How to display dialogs, notifications and log errors

                                                          +

                                                          To give users a consistent look & feel and make things easier to implement +we have generic services to help with these tasks. +You should always inject and use these rather than implement your own variant of such functionalities.

                                                          +

                                                          Display a confirmation dialog

                                                          +

                                                          Before executing an action with far-reaching consequences (e.g. deleting an entity) +you should request explicit confirmation from the user through a confirmation dialog box. +To reduce boiler-plate code for this, you can use the ConfirmationDialogService:

                                                          +Example :
                                                          constructor(private confirmationDialog: ConfirmationDialogService) {}

                                                          The service is a wrapper for MatDialog. +Use it to open a dialog box with your text:

                                                          +Example :
                                                          const confirmed = await this.confirmationDialog.getConfirmation("Delete?", "Are you sure you want to delete this Child?");

                                                          You can then react to the user action (whether "Yes" or "No" was clicked):

                                                          +Example :
                                                          if (confirmed) {
                                                          +  // do something
                                                          +}

                                                          You can also display dialogs with only one "OK" button rather than the yes/no option +by setting the optional 'buttons' parameter:

                                                          +Example :
                                                          this.confirmationDialog.getConfirmation("Info", "No options here, just some text.", OkButton);

                                                          In this case also consider whether you really want to use a "blocking" dialog box +or if a simple "alert" notification may be the better choice.

                                                          +

                                                          Check the definitions of those button presets in confirmation-dialog.component.ts to see +how you can also create fully custom choices of buttons.

                                                          +

                                                          Display a notification

                                                          +

                                                          You can display a short notification text to the user in an non-disrupting way using the AlertService. +This will show a small hovering notification box towards the bottom of the screen +(through MatSnackBar):

                                                          +Example :
                                                          constructor(private alertService: AlertService) {
                                                          +  this.alertService.addInfo('info message');
                                                          +  this.alertService.addWarning('warning message');
                                                          +  this.alertService.addDanger('important message');
                                                          +}

                                                          The different alert levels result in different styling of the notification. +More serious alert levels (warning and above) also require the user to actively dismiss the notification +while other notifications disappear automatically after some time.

                                                          +
                                                          +

                                                          If you want to log errors or other events for developers analysis and monitoring, also read the Log Errors Guide.

                                                          +
                                                          + +
                                                          +
                                                          +

                                                          results matching ""

                                                          +
                                                            +
                                                            +
                                                            +

                                                            No results matching ""

                                                            +
                                                            +
                                                            +
                                                            + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/display-related-entities.html b/documentation/additional-documentation/how-to-guides/display-related-entities.html new file mode 100644 index 0000000000..a399f305a9 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/display-related-entities.html @@ -0,0 +1,243 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                            +
                                                            + + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + +

                                                            How to display related entities

                                                            +

                                                            A common recurring requirement is to display a list of entities that are related to the current context. +For example displaying a table of all notes relating to the selected child in its detail view. +You shouldn't have to implement almost the same components again and again for this, +so we have a generic EntitySubrecordComponent for these use cases.

                                                            +

                                                            Creating a basic "subrecord" component

                                                            +

                                                            To keep code organized and separated you should create a new component that uses EntitySubrecordComponent +rather than trying to put everything into a larger component that includes other information as well +(e.g. create a ChildNotesComponent instead of putting your configuration for the EntitySubrecordComponent into the ChildDetailsComponent).

                                                            +

                                                            Best use the Angular CLI to generate a new component in the relevant module:

                                                            +Example :
                                                            ng generate component child-notes

                                                            The template remains very simple as you build on top of the generic EntitySubrecordComponent +and pass your values and configurations into it:

                                                            +Example :
                                                            <app-entity-subrecord
                                                            +    [records]="records"
                                                            +    [newRecordFactory]="generateNewRecordFactory()"
                                                            +    [columns]="columns">
                                                            +</app-entity-subrecord>

                                                            You need to set these parameters in your component class of course. +[records] simply takes an array of entities to be displayed, +e.g. in a oversimplified example (usually you would do some filtering or use a query):

                                                            +Example :
                                                            records: Note[];
                                                            +
                                                            +constructor(private entityMapper: EntityMapperService) {
                                                            +    this.records = await this.entityMapper.loadType<Note>(Note);
                                                            +}

                                                            The [newRecordFactory] is used to create a new entity of the required entity type when the user clicks the "add" button. +This has to be a function that returns a new entity instance:

                                                            +Example :
                                                            generateNewRecordFactory() {
                                                            +    // define values locally because "this" is a different scope after passing a function as input to another component
                                                            +    const childId = this.childId;
                                                            +
                                                            +    return () => {
                                                            +      const newNote = new Note(Date.now().toString());
                                                            +      newNote.date = new Date();
                                                            +      newNote.children = [childId];
                                                            +
                                                            +      return newNote;
                                                            +    };
                                                            +}

                                                            This gives you the power to already pre-fill certain values in the new entity +like in this example linking the new note with the selected child automatically. +Unfortunately the implementation has to be a little clumsy: A method that itself returns a function again.

                                                            +

                                                            Finally, the [columns] configuration allows you a lot of flexibility over +which properties of the entities are shown and how they are formatted and edited. +This takes an array of FormFieldConfigurations:

                                                            +Example :
                                                            columns: FormFieldConfig[] = [
                                                            +    { id: 'subject', label: 'Topic', viewComponent: 'DisplayText', editComponent: 'EditText', visibleFrom: 'xs'),
                                                            +    { id: 'text', label: 'Notes', viewComponent: 'DisplayText', editComponent: 'EditLongText', visibleFrom: 'md'),
                                                            +    { id: 'date', label: 'Date', viewComponent: 'DisplayDate', editComponent: 'EditDate', visibleFrom: 'xs'),
                                                            +];

                                                            Only the properties that you set here will be displayed to the user. +Use the parameters to configure transformations and form field types. +When a entity is displayed, most of the properties can be omitted and will be fetched from the schema definition

                                                            +
                                                            +

                                                            To learn about the full range of column options check out the API Reference:

                                                            + +
                                                            +

                                                            Showing details of one entity

                                                            +

                                                            The EntitySubrecordComponent allows the user to edit an entity inline in the table. +By default, clicking on a row will automatically open a form popup which shows all editable fields of the table. +What happens when a row is clicked can be overwritten with the [showEntity] parameter. +This parameter expects a function that gets the clicked entity as input.

                                                            +Example :
                                                            <app-entity-subrecord
                                                            +    [records]="children"
                                                            +    [columns]="columns"
                                                            +    [showEntity]="routeToChild.bind(this)"
                                                            +    [editable]="false"
                                                            +  ></app-entity-subrecord>
                                                            +
                                                            +
                                                            +

                                                            results matching ""

                                                            +
                                                              +
                                                              +
                                                              +

                                                              No results matching ""

                                                              +
                                                              +
                                                              +
                                                              + +
                                                              +
                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/format-data-export.html b/documentation/additional-documentation/how-to-guides/format-data-export.html new file mode 100644 index 0000000000..357014f36a --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/format-data-export.html @@ -0,0 +1,281 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                              +
                                                              + + +
                                                              +
                                                              + + + + + + + + + + + + + + + + + + + + + +

                                                              Exports

                                                              +

                                                              The list views like /child, /school, /note ,... have a button to export data. +Clicking this button will create a downloadable .csv file. +The format of this file can be adjusted through the configuration for the list view.

                                                              +

                                                              Config Format

                                                              +

                                                              The configuration of the export format is part of the configuration of the EntityListComponent.

                                                              +

                                                              E.g.

                                                              +Example :
                                                                "view:child": {
                                                              +    "component": "ChildrenList",
                                                              +    "config": {
                                                              +        "exportConfig": [
                                                              +          { "label": "Child", "query": ".name" },
                                                              +          {
                                                              +            "query": ":getRelated(ChildSchoolRelation, childId)",
                                                              +            "subQueries": [
                                                              +              { "label": "School Name", "query": ".schoolId:toEntities(School).name" },
                                                              +              { "label": "From", "query": ".start" },
                                                              +              { "label": "To", "query": ".end" }
                                                              +            ]
                                                              +
                                                              +          }
                                                              +        ],
                                                              +      "title": "Children List",
                                                              +      "columns": [...],
                                                              +      "columnGroups": {...},
                                                              +      "filters": [...]
                                                              +    }
                                                              +  },

                                                              Configuring a Export

                                                              +

                                                              The structure of the exports is according to the ExportColumnConfig.

                                                              +

                                                              The label property is optional and provides a title for this column. +If nothing is provided the query (without dots) is used (e.g. for "query": ".name" the label will be name).

                                                              +

                                                              The query has to be a valid JSON-Query. +The query will be run on each entity of the list page that is visited (e.g. on each child). +For further information about the query-syntax read the Reports Guide which uses the same query language.

                                                              +

                                                              The subQueries is optional and expects an array of ExportColumnConfigs. +The queries of the subQueries will be run for each result of the parent query. +In the example above, this would mean that for each ChildSchoolRelation the name of the school, the from- and the to-date will be exported. +If subQueries is defined, each object of the parent query will lead to one row in the report. +In the example above this would mean if there are n children and each of them has m child-school-relations then the final report will have n*m rows and the columns Child, School Name, From, To (Child from the first query and the others from the sub-queries). +In case subQueries is defined, the result of the parent query will not be visible in the export. +If the results of the parent query is wanted in the report, a simple sub-query can be added that returns all values of the parent query (query: "[*]").

                                                              +

                                                              Example Output

                                                              +

                                                              Using the config from above with the following data:

                                                              +Example :
                                                              const child1 = {
                                                              +  _id: "Child:1",
                                                              +  name: "Peter",
                                                              +};
                                                              +const child2 = {
                                                              +  _id: "Child:2",
                                                              +  name: "Anna",
                                                              +};
                                                              +const relation1 = {
                                                              +  _id: "ChildSchoolRelation:1",
                                                              +  schoolId: "1",
                                                              +  childId: "1",
                                                              +  start: "01/01/2020",
                                                              +  end: "01/01/2021",
                                                              +};
                                                              +const relation2 = {
                                                              +  _id: "ChildSchoolRelation:2",
                                                              +  schoolId: "1",
                                                              +  childId: "1",
                                                              +  start: "01/01/2021",
                                                              +};
                                                              +const relation3 = {
                                                              +  _id: "ChildSchoolRelation:3",
                                                              +  schoolId: "1",
                                                              +  childId: "1",
                                                              +  start: "01/01/2021",
                                                              +};
                                                              +const school = {
                                                              +  _id: "School:1",
                                                              +  name: "High School",
                                                              +};

                                                              Would create a .csv file according to the following table:

                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                              ChildSchool NameFromTo
                                                              PeterHigh School01/01/202001/01/2021
                                                              PeterHigh School01/01/2021
                                                              AnnaHigh School01/01/2021
                                                              + +
                                                              +
                                                              +

                                                              results matching ""

                                                              +
                                                                +
                                                                +
                                                                +

                                                                No results matching ""

                                                                +
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/generate-demo-data.html b/documentation/additional-documentation/how-to-guides/generate-demo-data.html new file mode 100644 index 0000000000..e421847f5c --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/generate-demo-data.html @@ -0,0 +1,244 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                +
                                                                + + +
                                                                +
                                                                + + + + + + + + + + + + + + + + + + + + + +

                                                                How to generate demo data

                                                                +

                                                                If the app is run in the "useTemporaryDatabase" mode, realistic demo data is generated on each startup.

                                                                +

                                                                This Guide walks you through the steps to add data to this demo mode for your own Entity type.

                                                                +

                                                                The Basics

                                                                +
                                                                  +
                                                                1. Create a service that extends DemoDataGenerator.
                                                                2. +
                                                                3. Make sure you call super() in your constructor to execute the parent class' constructor.
                                                                4. +
                                                                5. Implement the generateEntities(): Entity[] method so that it returns an array of demo entities.
                                                                    +
                                                                  • Try to create objects that are similar to real data. That will make it more useful during for testing and demo.
                                                                  • +
                                                                  • The most simple implementation could be to return an array of a few hard-coded instances.
                                                                  • +
                                                                  +
                                                                6. +
                                                                7. To actually make the DemoDataModule generate your demo entities you need to add your service to its config. +In the AppModule (or wherever you import the DemoDataModule) add your service provider: +_ e.g. DemoDataModule.forRoot([{ provide: DemoUserGeneratorService, useClass: DemoUserGeneratorService }]) +_ When the DemoDataModule is loaded your generator is then also triggered.
                                                                8. +
                                                                9. Change your config.json and set demo_mode: true to start the app with in demo mode +and get your data generated on startup.
                                                                10. +
                                                                +

                                                                Creating realistic, random data

                                                                +

                                                                Your generator service is a standard Angular Service that can become as complex as you need it to be.

                                                                +
                                                                  +
                                                                • You can import our (customized) faker.js +to easily generate realistic property values like names or dates. +_ import import {faker} from '../demo-data/faker'; (Faker is not an Angular service just a simple JavaScript module) +_ use child.name = faker.name.firstName() + ' ' + faker.name.lastName() for example to generate realistic random names

                                                                  +
                                                                • +
                                                                • You can use Angular's dependency injection to inject any other services that you may rely on to generate meaningful demo data. +This way you can also inject other DemoDataGenerators if you need to generate entities related to other types of entities. +_ inject demoChildren: DemoChildGenerator in your constructor +_ use this.demoChildren.entities to access all demo child entities that have been generated by the DemoChildGenerator * generate your demo entities relating to the demo child entities as needed

                                                                  +
                                                                • +
                                                                +

                                                                Making the generator configurable

                                                                +

                                                                If you want to make your generator more flexible, an important step is to receive some configuration. +This can be passed into your service through dependency injection as well.

                                                                +

                                                                (1.) Create a simple class to hold your config. +For example:

                                                                +Example :
                                                                export class DemoChildConfig {
                                                                +  count: number;
                                                                +}

                                                                Use a real class and not an interface for this. +Interfaces only exist in TypeScript before transpilation to Javascript and are not available during runtime, +therefore an interface cannot be used as a provider key for Angular dependency injection.

                                                                +

                                                                (2.) Add your config class to the constructor of your service to make it available within your generator:

                                                                +Example :
                                                                  constructor(public config: DemoChildConfig) {
                                                                +    super();
                                                                +  }

                                                                (3.) Add a static method called provider() to your service class. +The provider method will accept an instance of your config class and return a array of Angular providers. +This makes it much easier to register your service together with its config. +(Our pattern for this is inspired by the forRoot() pattern of Angular Modules.)

                                                                +Example :
                                                                  /**
                                                                +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                +   *   `providers: [DemoUserProvider.provider({count: 150})]`
                                                                +   * @param config The configuration specifying the number of entities the service should generate.
                                                                +   */
                                                                +  static provider(config: DemoChildConfig) {
                                                                +    return [
                                                                +      { provide: DemoChildGenerator, useClass: DemoChildGenerator },
                                                                +      { provide: DemoChildConfig, useValue: config },
                                                                +    ];
                                                                +  }

                                                                (4.) Use the provider() method when registering your service with the DemoDataModule +and set your config there at the same time:

                                                                +Example :
                                                                DemoDataModule.forRoot([
                                                                +  ...DemoChildGenerator.provider({count: 150}),
                                                                +])

                                                                Note that the spread operator (the ... in front of the call to .provider()) is required. +As the provider() method returns an array of providers, the ... "flattens" that array +and simply makes all providers directly items of the primary array that is passed into DemoDataModule.forRoot().

                                                                + +
                                                                +
                                                                +

                                                                results matching ""

                                                                +
                                                                  +
                                                                  +
                                                                  +

                                                                  No results matching ""

                                                                  +
                                                                  +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/load-and-save-data.html b/documentation/additional-documentation/how-to-guides/load-and-save-data.html new file mode 100644 index 0000000000..5655d1dac3 --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/load-and-save-data.html @@ -0,0 +1,225 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                  +
                                                                  + + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + + + +

                                                                  How to load and save data

                                                                  +

                                                                  One of the core actions you may need when developing new features is to interact with the database +to load data, create new entities or update existing ones. +We have a few generic services and concepts that help you do this without much overhead.

                                                                  +

                                                                  Understanding Database and Entities

                                                                  +

                                                                  Depending on the database the app is set up with, the lowest level of persisting data is the Database +that interacts with the browser's storage systems and may also be synced with a remote database.

                                                                  +

                                                                  In our code we have an abstraction layer above the database interactions implemented in the EntityModule. +You interact with a database record as an instance of the Entity class (or one of its sub types). +This way, you can use methods on these entities and benefit from the EntitySchema System for transformations as a kind of ORM.

                                                                  +

                                                                  In you code you simply treat database records as simple TypeScript objects +(instances of an Entity subclass) +and use the EntityMapperService to load and save them.

                                                                  +
                                                                  +

                                                                  Normally you should not use the Database class anywhere directly. +Use the EntityMapperService instead, which is one abstraction layer above the specific database code.

                                                                  +
                                                                  +

                                                                  Loading an entity

                                                                  +

                                                                  Use Angular's dependency injection to get the EntityMapperService in your code:

                                                                  +Example :
                                                                  constructor(private entityMapper: EntityMapperService) {  }

                                                                  You can load an individual entity by its id. +Due to restrictions of TypeScript you have to explicitly pass the Entity (sub)class as the first parameter +so that the EntityMapperService can use it to properly cast the record to the correct Entity type:

                                                                  +Example :
                                                                  let user: User;
                                                                  +const userId = '1';
                                                                  +user = await this.entityMapper.load<User>(User, userId);

                                                                  Note that load() is asynchronous, so you will need the await keyword and deal with the result as a Promise.

                                                                  +

                                                                  This will throw an error (reject the Promise) if no entity with the given id exists in the database.

                                                                  +

                                                                  You can also load all entities of an Entity type at once (e.g. if you want to display a list):

                                                                  +Example :
                                                                  let allUsers: User[];
                                                                  +allUsers = await this.entityMapper.loadType<User>(User);

                                                                  Saving an entity

                                                                  +

                                                                  Similar to the loading of data you can use the EntityMapperService to save a new or updated entity:

                                                                  +Example :
                                                                  const userId = '2';
                                                                  +const newUser = new User(userId);
                                                                  +newUser.name = 'Max';
                                                                  +await this.entityMapper.save<User>(newUser);

                                                                  IDs have to be unique for the Entity type, +i.e. if you have a Child entity with ID "2" that is not be a problem +but if there already is another User entity with this ID in the database save will fail.

                                                                  +

                                                                  To update an existing entity you can simply change the object and save it again:

                                                                  +Example :
                                                                  const user = await this.entityMapper.load<User>(User, '1');
                                                                  +user.name = 'Max';
                                                                  +await this.entityMapper.save<User>(user);

                                                                  In this case the loaded user contains an internal _rev property that allows the system to match it with the existing database record +and avoid a conflict, so the updated entity is saved to the database.

                                                                  +

                                                                  You can also force the system to overwrite an existing conflicting database record +(although you probably should only use that if you know what you are doing) +by setting the optional second parameter of save to true (forceUpdate):

                                                                  +Example :
                                                                  await this.entityMapper.save<User>(conflictingUser, true);

                                                                  Deleting an entity

                                                                  +

                                                                  Deleting an entity is similar to saving +(and the same rules about conflicts apply, so you should delete only entity instances that you actually loaded previously):

                                                                  +Example :
                                                                  const user = await this.entityMapper.load<User>(User, '1');
                                                                  +await this.entityMapper.remove<User>(user);
                                                                  +
                                                                  +
                                                                  +

                                                                  results matching ""

                                                                  +
                                                                    +
                                                                    +
                                                                    +

                                                                    No results matching ""

                                                                    +
                                                                    +
                                                                    +
                                                                    + +
                                                                    +
                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/log-errors.html b/documentation/additional-documentation/how-to-guides/log-errors.html new file mode 100644 index 0000000000..7e2c8e5b2a --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/log-errors.html @@ -0,0 +1,194 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                    +
                                                                    + + +
                                                                    +
                                                                    + + + + + + + + + + + + + + + + + + + + + +

                                                                    How to log errors

                                                                    +

                                                                    This Guide considers logging of errors and information that is necessary for developers in debugging and monitoring. +Refer to the Display Dialogs or Notifications Guide +regarding ways to inform the user about errors or other events.

                                                                    +

                                                                    Logging things

                                                                    +

                                                                    Production code (whatever is merged into the master branch) should not contain any calls to console.log(). +If you need to output information for possible debugging that is not handled otherwise, use the AlertService from our AlertsModule. +This way, all logging is done in a consistent manner and can possibly be transferred to the development team or saved in some other way.

                                                                    +

                                                                    To log information for analysis and debugging (without explicit notification to the user) +use the Logging object:

                                                                    +Example :
                                                                    someFun() {
                                                                    +  Logging.error('some error information');
                                                                    +}

                                                                    Similar to the AlertService the LoggingService has multiple log levels +that control whether log messages are sent to the remote monitoring and how they are treated there.

                                                                    +

                                                                    Remote Logging

                                                                    +

                                                                    The service side logging is performed via the sentry.io logging service. +The credentials for the EWB-Account can be found in the podio workspace.

                                                                    + +
                                                                    +
                                                                    +

                                                                    results matching ""

                                                                    +
                                                                      +
                                                                      +
                                                                      +

                                                                      No results matching ""

                                                                      +
                                                                      +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/navigate-the-code-structure.html b/documentation/additional-documentation/how-to-guides/navigate-the-code-structure.html new file mode 100644 index 0000000000..28172f6e6c --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/navigate-the-code-structure.html @@ -0,0 +1,189 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                      +
                                                                      + + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + +

                                                                      How to navigate the code structure

                                                                      +

                                                                      The application code is split within the src/app/ directory into modules providing +general features and abstract components (core) and +concrete feature modules for projects' use cases (child-dev-project).

                                                                      +

                                                                      Overall the following guidelines apply:

                                                                      +
                                                                        +
                                                                      • Different functionalities are usually split into separate Angular Modules each in its own folder.
                                                                      • +
                                                                      • At least all core features are well documented with JsDoc comments +and therefore also have a complete API Reference here (see Modules).
                                                                      • +
                                                                      • If you have a certain challenge, browse the "How-To Guides" here in the documentation +reusable features and approaches are documented there.
                                                                      • +
                                                                      + +
                                                                      +
                                                                      +

                                                                      results matching ""

                                                                      +
                                                                        +
                                                                        +
                                                                        +

                                                                        No results matching ""

                                                                        +
                                                                        +
                                                                        +
                                                                        + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/how-to-guides/use-queries-and-indices.html b/documentation/additional-documentation/how-to-guides/use-queries-and-indices.html new file mode 100644 index 0000000000..ef3d2674ab --- /dev/null +++ b/documentation/additional-documentation/how-to-guides/use-queries-and-indices.html @@ -0,0 +1,226 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                        +
                                                                        + + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + + +

                                                                        How to use queries and indices to get data

                                                                        +

                                                                        The EntityMapperService gives you an easy way to access +all entities of an Entity type or an individual entity by its ID (see Load and Save Data for these basics). +However, for more advance features this will not be enough and you may need more powerful ways to load certain data. +This is where (persistent) queries come into play.

                                                                        +
                                                                        +

                                                                        The easiest workaround to get a specific set of entities is to load all entities of that type using the EntityMapperService +and then just use standard JavaScript/TypeScript to select the required entities. +With larger databases this is hitting its limitations however.

                                                                        +
                                                                        +

                                                                        PouchDB Queries

                                                                        +

                                                                        Our application is to some extent coupled with PouchDB/CouchDB. +As queries and database indexing is closely related to the underlying database this feature (at the moment) +directly refers to the underlying PouchDB feature.

                                                                        +

                                                                        Please read through the PouchDB documentation referring to map/reduce queries: +https://pouchdb.com/guides/queries.html

                                                                        +

                                                                        Creating a persistent query / database index

                                                                        +

                                                                        Before you can use query to load specific data you have to create the related "design document" for it in the PouchDB.

                                                                        +

                                                                        To do this, create a design document object according to the PouchDB documentation +and then use saveDatabaseIndex on the Database service:

                                                                        +Example :
                                                                        constructor(private db: Database) {}
                                                                        +
                                                                        +private createQueryIndex() {
                                                                        + const designDoc = {
                                                                        +   _id: '_design/my_index',
                                                                        +   views: {
                                                                        +     by_child: {
                                                                        +       map: `(doc) => {
                                                                        +         if (!doc._id.startsWith("${ChildSchoolRelation.ENTITY_TYPE}")) return;
                                                                        +         emit(doc.childId);
                                                                        +         }`,
                                                                        +     },
                                                                        +   },
                                                                        + };
                                                                        + this.db.saveDatabaseIndex(designDoc);
                                                                        +}

                                                                        This is one of the rare cases where you will need to inject Database directly rather than only interacting with EntityMapperService.

                                                                        +

                                                                        Beware, unfortunately the map: function has to be a string containing the javascript function (to prevent the build optimization from messing this up).

                                                                        +

                                                                        Loading data through a query

                                                                        +

                                                                        After following above steps to saveDatabaseIndex that query is now available in the database.

                                                                        +

                                                                        You can now use this query to load data through its query id, +which is combined from the design document _id (without the "_design/" prefix) and the views key:

                                                                        +Example :
                                                                        const result = await this.db.query('my_index/by_child', {key: childId, include_docs: true});

                                                                        Also note the additional options parameter with a key (the "search value") and include_docs set to true. +The query function is a direct wrapper for PouchDB's query function, please refer to their docs for details.

                                                                        +

                                                                        As the query result is not automatically parsed by our EntityMapperService you have to map them manually:

                                                                        +Example :
                                                                        let resultEntities: Note[];
                                                                        +resultEntities = result.rows.map(loadedRow => {
                                                                        +    const entity = new Note('');
                                                                        +    this.entitySchemaService.loadDataIntoEntity(entity, loadedRow.doc);
                                                                        +    return entity;
                                                                        +});
                                                                        +
                                                                        +
                                                                        +

                                                                        results matching ""

                                                                        +
                                                                          +
                                                                          +
                                                                          +

                                                                          No results matching ""

                                                                          +
                                                                          +
                                                                          +
                                                                          + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/overview.html b/documentation/additional-documentation/overview.html new file mode 100644 index 0000000000..3233fd3c15 --- /dev/null +++ b/documentation/additional-documentation/overview.html @@ -0,0 +1,194 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                          +
                                                                          + + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + + + +

                                                                          Welcome to Aam Digital's Developer Documentation!

                                                                          +

                                                                          Our Developer Documentation here is structure into the following sections:

                                                                          +
                                                                            +
                                                                          • Getting Started Tutorial: +A hands-on introduction to our project and how to make your first changes to the code.
                                                                          • +
                                                                          • How-To Guides: +Step-by-step instructions for common requirements and problems.
                                                                          • +
                                                                          • Concepts: +Background and architecture information for the project.
                                                                          • +
                                                                          • API Reference: +Technical code documentation; +see the sections in the menu for Modules, Classes and other artifacts.
                                                                          • +
                                                                          +
                                                                          +

                                                                          If you are new and want to contribute, also refer to the CONTRIBUTING page.

                                                                          +

                                                                          You may want to start with the basic tutorial +or have a look at "How to navigate the code structure".

                                                                          + +
                                                                          +
                                                                          +

                                                                          results matching ""

                                                                          +
                                                                            +
                                                                            +
                                                                            +

                                                                            No results matching ""

                                                                            +
                                                                            +
                                                                            +
                                                                            + +
                                                                            +
                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/prerequisites.html b/documentation/additional-documentation/prerequisites.html new file mode 100644 index 0000000000..8c92e0f18e --- /dev/null +++ b/documentation/additional-documentation/prerequisites.html @@ -0,0 +1,182 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                            +
                                                                            + + +
                                                                            +
                                                                            + + + + + + + + + + + + + + + + + + + + + +

                                                                            This document collects all prerequisites that are necessary to run the application without problems. This can be complex settings or just simple value initialisations.

                                                                            +
                                                                              +
                                                                            • At least one user is in the database. Create a admin user that can not be deleted, if this is possible
                                                                            • +
                                                                            • password change is only possible with internet connection. Otherwise different passwords on local and remote database are possible.
                                                                            • +
                                                                            + +
                                                                            +
                                                                            +

                                                                            results matching ""

                                                                            +
                                                                              +
                                                                              +
                                                                              +

                                                                              No results matching ""

                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/tutorial.html b/documentation/additional-documentation/tutorial.html new file mode 100644 index 0000000000..3959fda930 --- /dev/null +++ b/documentation/additional-documentation/tutorial.html @@ -0,0 +1,190 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                              +
                                                                              + + +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + + + + + +

                                                                              Tutorial: First Steps

                                                                              +
                                                                              +

                                                                              This Tutorial is still work in progress and will be further extended & improved.

                                                                              +
                                                                              +

                                                                              In this tutorial we will walk you through the first steps of getting the Aam Digital project up and running - +and writing your first little extension to it.

                                                                              +

                                                                              We will focus on things specific to our project. +But there will be links to other tutorials and resources about the basics of the technologies we use.

                                                                              +

                                                                              If anything is unclear or missing, please open an issue on GitHub. +Your questions and feedback are very welcome!

                                                                              +
                                                                              +

                                                                              Let's get started with +> An Overview of our Technologies & Framework

                                                                              + +
                                                                              +
                                                                              +

                                                                              results matching ""

                                                                              +
                                                                                +
                                                                                +
                                                                                +

                                                                                No results matching ""

                                                                                +
                                                                                +
                                                                                +
                                                                                + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/tutorial/diving-into-the-code.html b/documentation/additional-documentation/tutorial/diving-into-the-code.html new file mode 100644 index 0000000000..d9a0de48d7 --- /dev/null +++ b/documentation/additional-documentation/tutorial/diving-into-the-code.html @@ -0,0 +1,201 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                +
                                                                                + + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + + + +

                                                                                Tutorial: Diving into the Code

                                                                                +
                                                                                +

                                                                                TODO: this needs a more detailed explanation of the most basic aspects of the code base

                                                                                +
                                                                                +

                                                                                Getting started with coding

                                                                                +
                                                                                  +
                                                                                1. Don't get overwhelmed by the mass of config files in the root directory. +Jump directly to the subfolder src/app/ where the actually relevant code is located.
                                                                                2. +
                                                                                3. The project is structured into several Modules, each in its own folder under src/app/core (general features) or src/app/child-ded-project (special user-facing features)
                                                                                4. +
                                                                                5. To extend upon the existing system, don't worry about the lower layer modules. +Focus on understanding the top level modules adding user features like the SchoolModule and the ChildrenModule.
                                                                                6. +
                                                                                +
                                                                                +

                                                                                Next, let's actually add something: +> Add your first field to the Child Details

                                                                                +
                                                                                +

                                                                                TODO: a short tutorial section on how to add an additional field to the Child class and the ChildDetails form?

                                                                                +
                                                                                +
                                                                                +

                                                                                Next: ??

                                                                                +
                                                                                +

                                                                                Should we end the tutorial here? +Or have another section on some more advance aspect?

                                                                                +
                                                                                + +
                                                                                +
                                                                                +

                                                                                results matching ""

                                                                                +
                                                                                  +
                                                                                  +
                                                                                  +

                                                                                  No results matching ""

                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/tutorial/overview-of-technologies.html b/documentation/additional-documentation/tutorial/overview-of-technologies.html new file mode 100644 index 0000000000..5b3f212ed4 --- /dev/null +++ b/documentation/additional-documentation/tutorial/overview-of-technologies.html @@ -0,0 +1,228 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                  +
                                                                                  + + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + + + +

                                                                                  Tutorial: An Overview of our Technologies and Framework

                                                                                  +

                                                                                  +

                                                                                  Aam Digital is based on the following technologies:

                                                                                  +
                                                                                    +
                                                                                  • Angular, +including the TypeScript programming language (a superset of JavaScript) +as well as HTML and CSS
                                                                                  • +
                                                                                  • Angular Material providing reusable UI components
                                                                                  • +
                                                                                  • PouchDB (CouchDB noSQL Database)
                                                                                  • +
                                                                                  +

                                                                                  In addition, we use Docker and nginx to deploy and run the application.

                                                                                  +

                                                                                  If you are not familiar with (some of) our tools and technologies yet, +here are some useful resources to get started. +You will need to have basic knowledge of these before you can properly start contributing to our project.

                                                                                  +

                                                                                  Git (and GitHub)

                                                                                  +

                                                                                  Git helps us track all changes to our project, allows us to revert things and is the basis for our code review process.

                                                                                  +

                                                                                  Haven't worked with git source control yet? +Work through a basic tutorial like this +Intro to Git and GitHub for Beginners (Tutorial).

                                                                                  +

                                                                                  You can also check out the official git book (chapter 1-3 are most relevant).

                                                                                  +

                                                                                  TypeScript

                                                                                  +

                                                                                  TypeScript is our primary programming language. +If you are familiar with JavaScript, learning TypeScript shouldn't be too hard for you. +All JavaScript code is also valid TypeScript. +TypeScript just adds some things on top to make development easier and less error-prone.

                                                                                  +

                                                                                  (If you don't know JavaScript yet, you can find an endless amount of online courses to learn it - go and do some of these before continuing here!)

                                                                                  +

                                                                                  If you have some experience with another "statically typed" language like Java, the additional concepts of TypeScript should feel familiar. +A quick comparison like this may be enough to get you a basic understanding: TypeScript vs. JavaScript

                                                                                  +

                                                                                  Angular

                                                                                  +

                                                                                  Angular is a powerful web development framework and the basis for our project. +It provides good structure to build complex enterprise-level web applications +with its concepts of components, services and modules.

                                                                                  +

                                                                                  It does take a while to work through Angular's core concepts. +But every minute you invest into understanding these basics now will make your development easier and cleaner forever after.

                                                                                  +

                                                                                  Follow the introductory material and tutorial: Angular - Getting started

                                                                                  +

                                                                                  You will need a solid understanding of the Angular basics of components, services, dependency injection. +The more advanced topics beyond that are things you can also learn while already working on our project. +We'll be happy to guide you!

                                                                                  +

                                                                                  Angular Material

                                                                                  +

                                                                                  We are using some standard UI components following the Material Design as building blocks.

                                                                                  +

                                                                                  Browse through the list of components to get an idea what is already available +(so that we don't reinvent the wheel): +https://material.angular.io/components/categories

                                                                                  +

                                                                                  PouchDB

                                                                                  +

                                                                                  We have built an abstraction layer of the database access. +Underneath our app is using PouchDB but you do not need any knowledge about this for most work on our project.

                                                                                  +

                                                                                  Curious or want to work on our database services? +Start here: https://pouchdb.com/learn.html

                                                                                  +
                                                                                  +

                                                                                  Next up: +> Setting up the project (and running it)

                                                                                  + +
                                                                                  +
                                                                                  +

                                                                                  results matching ""

                                                                                  +
                                                                                    +
                                                                                    +
                                                                                    +

                                                                                    No results matching ""

                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/tutorial/setting-up-the-project.html b/documentation/additional-documentation/tutorial/setting-up-the-project.html new file mode 100644 index 0000000000..30f6c2caf4 --- /dev/null +++ b/documentation/additional-documentation/tutorial/setting-up-the-project.html @@ -0,0 +1,189 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                    +
                                                                                    + + +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + + + + + +

                                                                                    Tutorial: Setting up the Project

                                                                                    +

                                                                                    In order to work on our project you should first set up a local development environment. +That way you can run the app on your own computer and immediately see and test changes you make.

                                                                                    +

                                                                                    Setup

                                                                                    +

                                                                                    We have documented the steps to clone and set up the project in our README in the "Development" section

                                                                                    +

                                                                                    Run

                                                                                    +

                                                                                    Did you follow the steps in the README and have been able to successfully execute npm start?

                                                                                    +

                                                                                    Visit your local app in a browser at http://localhost:4200/

                                                                                    +

                                                                                    If you can see and use Aam Digital there, you are good to go. Great!

                                                                                    +
                                                                                    +

                                                                                    Next up: +> Using Aam Digital (as a user)

                                                                                    + +
                                                                                    +
                                                                                    +

                                                                                    results matching ""

                                                                                    +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      No results matching ""

                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/additional-documentation/tutorial/using-aam-digital-(as-a-user).html b/documentation/additional-documentation/tutorial/using-aam-digital-(as-a-user).html new file mode 100644 index 0000000000..537f59c7cf --- /dev/null +++ b/documentation/additional-documentation/tutorial/using-aam-digital-(as-a-user).html @@ -0,0 +1,198 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      + + + + + + + + + + + + + + + + + + + + + +

                                                                                      Tutorial: Using Aam Digital (as a user)

                                                                                      +

                                                                                      Before changing things or implementing new features, you should get a basic idea of how Aam Digital currently works for our users. +Feel free to reach out to someone from our team, if you haven't already. We'll be happy to give you a demo and talk about the needs and backgrounds of our users.

                                                                                      +

                                                                                      To get a true feeling for the app, work through the following short usage scenarios yourself:

                                                                                      +

                                                                                      Basic participants & notes

                                                                                      +
                                                                                        +
                                                                                      1. Register a new participant in the system. (Hint: Go through the "Children" list)
                                                                                      2. +
                                                                                      3. Add a note about your new participant. (Hint: Either expand the "Notes & Reports" section or use the blue "primary action" button on the bottom right)
                                                                                      4. +
                                                                                      5. Find your new note in the project-wide list of notes. (Hint: Navigate to the "Notes" list using the main menu on the left)
                                                                                      6. +
                                                                                      +

                                                                                      Recording attendance

                                                                                      +
                                                                                        +
                                                                                      1. Add your new participant to a "Recurring Activity". (Hint: open the details of one activity from the "Recurring Activities" list and add the name in the "Participants" section)
                                                                                      2. +
                                                                                      3. Record today's attendance for that activity. (Hint: Use "Record Attendance" and find the activity you have just added your participant to)
                                                                                      4. +
                                                                                      5. See your participant's attendance record. (Hint: Open the details view for your participant by clicking on the relevant row in the "Children" list and then expand the "Attendance" section)
                                                                                      6. +
                                                                                      +

                                                                                      Play around

                                                                                      +

                                                                                      Try some of the other features and get a feeling for Aam Digital.

                                                                                      +
                                                                                      +

                                                                                      Next up: +> Diving into the Code

                                                                                      + +
                                                                                      +
                                                                                      +

                                                                                      results matching ""

                                                                                      +
                                                                                        +
                                                                                        +
                                                                                        +

                                                                                        No results matching ""

                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/AbstractViewComponent.html b/documentation/classes/AbstractViewComponent.html new file mode 100644 index 0000000000..70cff7edfd --- /dev/null +++ b/documentation/classes/AbstractViewComponent.html @@ -0,0 +1,415 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                        +
                                                                                        + + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + +
                                                                                        +
                                                                                        +

                                                                                        +

                                                                                        File

                                                                                        +

                                                                                        +

                                                                                        + src/app/core/ui/abstract-view/abstract-view.component.ts +

                                                                                        + + +

                                                                                        +

                                                                                        Description

                                                                                        +

                                                                                        +

                                                                                        +

                                                                                        Base class for wrapper components like RoutedViewComponent or DialogViewComponent

                                                                                        + +

                                                                                        + + + + +
                                                                                        +

                                                                                        Index

                                                                                        + + + + + + + + + + + + + + + +
                                                                                        +
                                                                                        Properties
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + +
                                                                                        +

                                                                                        Constructor

                                                                                        + + + + + + + + + + + + + +
                                                                                        +constructor(injector: Injector, isDialog: boolean) +
                                                                                        + +
                                                                                        +
                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                        NameTypeOptional
                                                                                        injector + Injector + + No +
                                                                                        isDialog + boolean + + No +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + +
                                                                                        + +

                                                                                        + Properties +

                                                                                        + + + + + + + + + + + + + + +
                                                                                        + + + componentInjector + + +
                                                                                        + Type : Injector | undefined + +
                                                                                        + +
                                                                                        + + + + + + + + + + + + + + +
                                                                                        + + + viewContext + + +
                                                                                        + Type : ViewComponentContext + +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + +
                                                                                        + + +
                                                                                        +
                                                                                        import { Injector } from "@angular/core";
                                                                                        +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                        +import { ViewActionsComponent } from "../../common-components/view-actions/view-actions.component";
                                                                                        +
                                                                                        +/**
                                                                                        + * Base class for wrapper components like RoutedViewComponent or DialogViewComponent
                                                                                        + */
                                                                                        +export abstract class AbstractViewComponent {
                                                                                        +  viewContext: ViewComponentContext;
                                                                                        +  componentInjector: Injector | undefined;
                                                                                        +
                                                                                        +  constructor(injector: Injector, isDialog: boolean) {
                                                                                        +    this.viewContext = new ViewComponentContext(isDialog);
                                                                                        +
                                                                                        +    this.componentInjector = Injector.create({
                                                                                        +      providers: [
                                                                                        +        { provide: ViewComponentContext, useValue: this.viewContext },
                                                                                        +      ],
                                                                                        +      parent: injector,
                                                                                        +    });
                                                                                        +  }
                                                                                        +}
                                                                                        +
                                                                                        +/**
                                                                                        + * Service to share context for components that can be used both
                                                                                        + * in dialogs (wrapped by DialogViewComponent) and
                                                                                        + * in full screen (wrapped by RoutedViewComponent).
                                                                                        + */
                                                                                        +export class ViewComponentContext {
                                                                                        +  title: ViewTitleComponent;
                                                                                        +  actions: ViewActionsComponent;
                                                                                        +
                                                                                        +  constructor(public isDialog: boolean) {}
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + + + + + + + + + +
                                                                                        +
                                                                                        +

                                                                                        results matching ""

                                                                                        +
                                                                                          +
                                                                                          +
                                                                                          +

                                                                                          No results matching ""

                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ActivityAttendance.html b/documentation/classes/ActivityAttendance.html new file mode 100644 index 0000000000..f19df492fc --- /dev/null +++ b/documentation/classes/ActivityAttendance.html @@ -0,0 +1,2884 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                          +
                                                                                          + + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + +
                                                                                          +
                                                                                          +

                                                                                          +

                                                                                          File

                                                                                          +

                                                                                          +

                                                                                          + src/app/child-dev-project/attendance/model/activity-attendance.ts +

                                                                                          + + +

                                                                                          +

                                                                                          Description

                                                                                          +

                                                                                          +

                                                                                          +

                                                                                          Aggregate information about all events for a RecurringActivity within a given time period.

                                                                                          +

                                                                                          This object is not saved in the database but instead generated dynamically from stored Events +to avoid problems keeping all information in sync in the database.

                                                                                          + +

                                                                                          + +

                                                                                          +

                                                                                          Extends

                                                                                          +

                                                                                          +

                                                                                          + Entity +

                                                                                          + + + +
                                                                                          +

                                                                                          Index

                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          +
                                                                                          Properties
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          Methods
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          Accessors
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + +
                                                                                          + +

                                                                                          + Properties +

                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + activity + + +
                                                                                          + Type : RecurringActivity + +
                                                                                          + +
                                                                                          +

                                                                                          The general, recurring activity for which this instance aggregates actual events that took place within a limited time period.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + individualLogicalStatusCounts + + +
                                                                                          + Default value : new Map< + string, + { [key in AttendanceLogicalStatus]?: number } + >() +
                                                                                          + +
                                                                                          +

                                                                                          Mapping child ids to a map with all logical status as object keys and their counts as values.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + individualStatusTypeCounts + + +
                                                                                          + Default value : new Map<string, { [key: string]: number }>() +
                                                                                          + +
                                                                                          +

                                                                                          Mapping child ids to a map with all status type ids as object keys and their counts as values.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + periodFrom + + +
                                                                                          + Type : Date + +
                                                                                          + +
                                                                                          +

                                                                                          Starting date of the period this data refers to

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + periodTo + + +
                                                                                          + Type : Date + +
                                                                                          + +
                                                                                          +

                                                                                          End date of the period this data refers to

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + Readonly + THRESHOLD_URGENT + + +
                                                                                          + Type : number + +
                                                                                          + Default value : 0.6 +
                                                                                          + +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + Readonly + THRESHOLD_WARNING + + +
                                                                                          + Type : number + +
                                                                                          + Default value : 0.8 +
                                                                                          + +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + Optional + _isCustomizedType + + +
                                                                                          + Type : boolean + +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:69 +
                                                                                          +
                                                                                          +

                                                                                          True if this type's schema has been customized dynamically from the config.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + + _rev + + +
                                                                                          + Type : string + +
                                                                                          + Decorators : +
                                                                                          + + @DatabaseField({anonymize: 'retain'})
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:182 +
                                                                                          +
                                                                                          +

                                                                                          internal database doc revision, used to detect conflicts by PouchDB/CouchDB

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + + anonymized + + +
                                                                                          + Type : boolean + +
                                                                                          + Decorators : +
                                                                                          + + @DatabaseField({anonymize: 'retain'})
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:201 +
                                                                                          +
                                                                                          +

                                                                                          Whether this entity has been anonymized and therefore cannot be re-activated.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + Optional + blockComponent + + +
                                                                                          + Type : string + +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:165 +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + color + + +
                                                                                          + Type : string + +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:113 +
                                                                                          +
                                                                                          +

                                                                                          color used for to highlight this entity type across the app

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + + created + + +
                                                                                          + Type : UpdateMetadata + +
                                                                                          + Decorators : +
                                                                                          + + @DatabaseField({anonymize: 'retain'})
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:187 +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + ENTITY_TYPE + + +
                                                                                          + Type : string + +
                                                                                          + Default value : "Entity" +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:56 +
                                                                                          +
                                                                                          +

                                                                                          The entity's type. +In classes extending Entity this is usually overridden by the class annotation @DatabaseEntity('NewEntity'). +The type needs to be used as routing path in lower case. The routing path can be defined in the configuration file.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + hasPII + + +
                                                                                          + Type : boolean + +
                                                                                          + Default value : false +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:172 +
                                                                                          +
                                                                                          +

                                                                                          whether this entity type can contain "personally identifiable information" (PII) +and therefore should follow strict data protection requirements +and offer a function to anonymize records.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + icon + + +
                                                                                          + Type : IconName + +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:108 +
                                                                                          +
                                                                                          +

                                                                                          icon id used for this entity

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + + inactive + + +
                                                                                          + Type : boolean + +
                                                                                          + Decorators : +
                                                                                          + + @DatabaseField({anonymize: 'retain'})
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:195 +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + schema + + +
                                                                                          + Type : EntitySchema + +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:64 +
                                                                                          +
                                                                                          +

                                                                                          EntitySchema defining property transformations from/to the database. +This is auto-generated from the property annotations @DatabaseField().

                                                                                          +

                                                                                          see /additional-documentation/how-to-guides/create-a-new-entity-type.html

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + toStringAttributes + + +
                                                                                          + Type : [] + +
                                                                                          + Default value : ["entityId"] +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:77 +
                                                                                          +
                                                                                          +

                                                                                          Defining which attribute values of an entity should be shown in the .toString() method.

                                                                                          +

                                                                                          The default is the ID of the entity (entityId). +This can be overwritten in subclasses or through the config.

                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + + updated + + +
                                                                                          + Type : UpdateMetadata + +
                                                                                          + Decorators : +
                                                                                          + + @DatabaseField({anonymize: 'retain'})
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:192 +
                                                                                          +
                                                                                          +
                                                                                          + +
                                                                                          + +

                                                                                          + Methods +

                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + countEventsAbsent + + +
                                                                                          +countEventsAbsent(childId: string) +
                                                                                          + +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          childId + string + + No +
                                                                                          +
                                                                                          +
                                                                                          + Returns : number + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + countEventsPresent + + +
                                                                                          +countEventsPresent(childId: string) +
                                                                                          + +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          childId + string + + No +
                                                                                          +
                                                                                          +
                                                                                          + Returns : number + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + countEventsTotal + + +
                                                                                          +countEventsTotal() +
                                                                                          + +
                                                                                          + +
                                                                                          + Returns : number + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + countEventsWithUnknownStatus + + +
                                                                                          +countEventsWithUnknownStatus(forChildId?: string) +
                                                                                          + +
                                                                                          +

                                                                                          The number of events that have at least one participant with an undefined status. +This may occur when the user does not complete the full roll call or skips participants. +The count of unknown status can indicate if manual checking and corrections are required.

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptionalDescription
                                                                                          forChildId + string + + Yes + +

                                                                                          filter the calculation to only include status of the given participant id

                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                          + Returns : number + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + countTotalAbsent + + +
                                                                                          +countTotalAbsent() +
                                                                                          + +
                                                                                          + +
                                                                                          + Returns : any + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + countTotalPresent + + +
                                                                                          +countTotalPresent() +
                                                                                          + +
                                                                                          + +
                                                                                          + Returns : any + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + create + + +
                                                                                          + + create(from: Date, events: EventNote[]) +
                                                                                          + +
                                                                                          +

                                                                                          Create an instance with the given initial properties.

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptionalDefault value
                                                                                          from + Date + + No + +
                                                                                          events + EventNote[] + + No + + [] +
                                                                                          +
                                                                                          +
                                                                                          + Returns : ActivityAttendance + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + getAttendancePercentage + + +
                                                                                          +getAttendancePercentage(childId: string) +
                                                                                          + +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          childId + string + + No +
                                                                                          +
                                                                                          +
                                                                                          + Returns : number + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + getAttendancePercentageAverage + + +
                                                                                          +getAttendancePercentageAverage() +
                                                                                          + +
                                                                                          + +
                                                                                          + Returns : number + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Public + + getColor + + +
                                                                                          + + getColor(forChildId?: string) +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:219 +
                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          forChildId + string + + Yes +
                                                                                          +
                                                                                          +
                                                                                          + Returns : string + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Public + + getWarningLevel + + +
                                                                                          + + getWarningLevel(forChildId?: string) +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:200 +
                                                                                          +
                                                                                          +

                                                                                          Custom warning level for attendance thresholds - optionally for a specific child.

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          forChildId + string + + Yes +
                                                                                          +
                                                                                          +
                                                                                          + Returns : WarningLevel + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + recalculateStats + + +
                                                                                          +recalculateStats() +
                                                                                          + +
                                                                                          + +
                                                                                          + Returns : void + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + assertValid + + +
                                                                                          +assertValid() +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:355 +
                                                                                          +
                                                                                          +

                                                                                          Checks if the entity is valid and if the check fails, throws an error explaining the failed check.

                                                                                          +
                                                                                          + +
                                                                                          + Returns : void + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Public + copy + + +
                                                                                          + + copy(generateNewId: boolean) +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:340 +
                                                                                          +
                                                                                          +

                                                                                          Shallow copy of the entity. +The resulting entity will be of the same type as this +(taking into account subclassing)

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptionalDefault value
                                                                                          generateNewId + boolean + + No + + false +
                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + createPrefixedId + + +
                                                                                          + + createPrefixedId(type: string, id: string) +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:155 +
                                                                                          +
                                                                                          +

                                                                                          Create a prefixed id by adding the type prefix if it isn't already part of the given id.

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptionalDescription
                                                                                          type + string + + No + +

                                                                                          The type prefix to be added.

                                                                                          + +
                                                                                          id + string + + No + +

                                                                                          The id to be extended with a prefix.

                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                          + Returns : string + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + extractEntityIdFromId + + +
                                                                                          + + extractEntityIdFromId(id: string) +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:145 +
                                                                                          +
                                                                                          +

                                                                                          Extract entityId without prefix.

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptionalDescription
                                                                                          id + string + + No + +

                                                                                          An entity's id including prefix.

                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                          + Returns : string + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Static + extractTypeFromId + + +
                                                                                          + + extractTypeFromId(id: string) +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:136 +
                                                                                          +
                                                                                          +

                                                                                          Extract the ENTITY_TYPE from an id.

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptionalDescription
                                                                                          id + string + + No + +

                                                                                          An entity's id including prefix.

                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                          + Returns : string + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + getConstructor + + +
                                                                                          +getConstructor() +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:262 +
                                                                                          +
                                                                                          +

                                                                                          Get the class (Entity or the actual subclass of the instance) to call static methods on the correct class considering inheritance

                                                                                          +
                                                                                          + +
                                                                                          + Returns : EntityConstructor<> + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Public + getId + + +
                                                                                          + + getId(withoutPrefix) +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:281 +
                                                                                          +
                                                                                          +

                                                                                          Returns the id of this entity.

                                                                                          +

                                                                                          Note that an id is final and can't be changed after the object has been instantiated, hence there is no +setId() method.

                                                                                          +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                          NameOptionalDefault value
                                                                                          withoutPrefix + No + + false +
                                                                                          +
                                                                                          +
                                                                                          + Returns : string + +
                                                                                          +
                                                                                          +

                                                                                          the unique id of this entity

                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + getSchema + + +
                                                                                          +getSchema() +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:269 +
                                                                                          +
                                                                                          +

                                                                                          Get the entity schema of this class

                                                                                          +
                                                                                          + +
                                                                                          + Returns : EntitySchema + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + Public + getType + + +
                                                                                          + + getType() +
                                                                                          +
                                                                                          Inherited from Entity +
                                                                                          +
                                                                                          +
                                                                                          Defined in Entity:292 +
                                                                                          +
                                                                                          +

                                                                                          Returns the type which is used to categorize this entity in the database.

                                                                                          +

                                                                                          Important: Do not overwrite this method! Types are handled internally.

                                                                                          +
                                                                                          + +
                                                                                          + Returns : string + +
                                                                                          +
                                                                                          +

                                                                                          the entity's type (which is the class name).

                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                          + + + + + +
                                                                                          +

                                                                                          + Accessors +

                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + events +
                                                                                          + getevents() +
                                                                                          + +
                                                                                          + setevents(value: EventNote[]) +
                                                                                          + +
                                                                                          + +
                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                          NameTypeOptional
                                                                                          value + EventNote[] + + No +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + Returns : void + +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + + +
                                                                                          +
                                                                                          import { AttendanceLogicalStatus } from "./attendance-status";
                                                                                          +import { RecurringActivity } from "./recurring-activity";
                                                                                          +import { defaultAttendanceStatusTypes } from "../../../core/config/default-config/default-attendance-status-types";
                                                                                          +import { EventNote } from "./event-note";
                                                                                          +import { getWarningLevelColor, WarningLevel } from "../../warning-level";
                                                                                          +import { Entity } from "../../../core/entity/model/entity";
                                                                                          +
                                                                                          +/**
                                                                                          + * Aggregate information about all events for a {@link RecurringActivity} within a given time period.
                                                                                          + *
                                                                                          + * This object is not saved in the database but instead generated dynamically from stored Events
                                                                                          + * to avoid problems keeping all information in sync in the database.
                                                                                          + */
                                                                                          +export class ActivityAttendance extends Entity {
                                                                                          +  static readonly THRESHOLD_URGENT = 0.6;
                                                                                          +  static readonly THRESHOLD_WARNING = 0.8;
                                                                                          +
                                                                                          +  /**
                                                                                          +   * Create an instance with the given initial properties.
                                                                                          +   */
                                                                                          +  static create(from: Date, events: EventNote[] = []) {
                                                                                          +    const instance = new ActivityAttendance();
                                                                                          +    instance.periodFrom = from;
                                                                                          +    instance.events = events;
                                                                                          +    return instance;
                                                                                          +  }
                                                                                          +
                                                                                          +  /**
                                                                                          +   * Starting date of the period this data refers to
                                                                                          +   */
                                                                                          +  periodFrom: Date;
                                                                                          +  /**
                                                                                          +   * End date of the period this data refers to
                                                                                          +   */
                                                                                          +  periodTo: Date;
                                                                                          +
                                                                                          +  /**
                                                                                          +   * Events within the period relating to the activity
                                                                                          +   */
                                                                                          +  private _events: EventNote[] = [];
                                                                                          +
                                                                                          +  set events(value: EventNote[]) {
                                                                                          +    this._events = value;
                                                                                          +    this.recalculateStats();
                                                                                          +  }
                                                                                          +
                                                                                          +  get events(): EventNote[] {
                                                                                          +    return this._events;
                                                                                          +  }
                                                                                          +
                                                                                          +  /**
                                                                                          +   * The general, recurring activity for which this instance aggregates actual events that took place within a limited time period.
                                                                                          +   */
                                                                                          +  activity: RecurringActivity;
                                                                                          +
                                                                                          +  /**
                                                                                          +   * Mapping child ids to a map with all *logical* status as object keys and their counts as values.
                                                                                          +   */
                                                                                          +  individualLogicalStatusCounts = new Map<
                                                                                          +    string,
                                                                                          +    { [key in AttendanceLogicalStatus]?: number }
                                                                                          +  >();
                                                                                          +
                                                                                          +  /**
                                                                                          +   * Mapping child ids to a map with all status type ids as object keys and their counts as values.
                                                                                          +   */
                                                                                          +  individualStatusTypeCounts = new Map<string, { [key: string]: number }>();
                                                                                          +
                                                                                          +  countEventsTotal(): number {
                                                                                          +    return this.events.length;
                                                                                          +  }
                                                                                          +
                                                                                          +  countEventsPresent(childId: string): number {
                                                                                          +    return this.countIndividual(childId, AttendanceLogicalStatus.PRESENT);
                                                                                          +  }
                                                                                          +
                                                                                          +  countEventsAbsent(childId: string): number {
                                                                                          +    return this.countIndividual(childId, AttendanceLogicalStatus.ABSENT);
                                                                                          +  }
                                                                                          +
                                                                                          +  private countIndividual(
                                                                                          +    childId: string,
                                                                                          +    countingType: AttendanceLogicalStatus,
                                                                                          +  ) {
                                                                                          +    return this.events.filter(
                                                                                          +      (eventNote) =>
                                                                                          +        eventNote.getAttendance(childId)?.status.countAs === countingType,
                                                                                          +    ).length;
                                                                                          +  }
                                                                                          +
                                                                                          +  getAttendancePercentage(childId: string): number {
                                                                                          +    const present = this.countEventsPresent(childId);
                                                                                          +    const absent = this.countEventsAbsent(childId);
                                                                                          +
                                                                                          +    return present / (present + absent);
                                                                                          +  }
                                                                                          +
                                                                                          +  countTotalPresent() {
                                                                                          +    return this.countWithStatus(AttendanceLogicalStatus.PRESENT);
                                                                                          +  }
                                                                                          +
                                                                                          +  countTotalAbsent() {
                                                                                          +    return this.countWithStatus(AttendanceLogicalStatus.ABSENT);
                                                                                          +  }
                                                                                          +
                                                                                          +  private countWithStatus(matchingType: AttendanceLogicalStatus) {
                                                                                          +    return this.events.reduce(
                                                                                          +      (total, event) => total + event.countWithStatus(matchingType),
                                                                                          +      0,
                                                                                          +    );
                                                                                          +  }
                                                                                          +
                                                                                          +  getAttendancePercentageAverage(): number {
                                                                                          +    return this.countPercentage(AttendanceLogicalStatus.PRESENT, false);
                                                                                          +  }
                                                                                          +
                                                                                          +  private countPercentage(
                                                                                          +    matchingType: AttendanceLogicalStatus,
                                                                                          +    rounded: boolean = false,
                                                                                          +  ) {
                                                                                          +    const calculatedStats = this.events
                                                                                          +      .map((event) => {
                                                                                          +        const eventStats = {
                                                                                          +          matching: 0,
                                                                                          +          total: event.children.length,
                                                                                          +        };
                                                                                          +        for (const childId of event.children) {
                                                                                          +          const att = event.getAttendance(childId).status;
                                                                                          +          if (att.countAs === matchingType) {
                                                                                          +            eventStats.matching++;
                                                                                          +          } else if (att.countAs === AttendanceLogicalStatus.IGNORE) {
                                                                                          +            eventStats.total--;
                                                                                          +          }
                                                                                          +        }
                                                                                          +
                                                                                          +        return eventStats;
                                                                                          +      })
                                                                                          +      .reduce(
                                                                                          +        (accumulatedStats, currentEventStats) => {
                                                                                          +          accumulatedStats.total += currentEventStats.total;
                                                                                          +          accumulatedStats.matching += currentEventStats.matching;
                                                                                          +          return accumulatedStats;
                                                                                          +        },
                                                                                          +        { total: 0, matching: 0 },
                                                                                          +      );
                                                                                          +
                                                                                          +    const result = calculatedStats.matching / calculatedStats.total;
                                                                                          +    if (rounded) {
                                                                                          +      return Math.round(result * 10) / 10;
                                                                                          +    } else {
                                                                                          +      return result;
                                                                                          +    }
                                                                                          +  }
                                                                                          +
                                                                                          +  /**
                                                                                          +   * The number of events that have at least one participant with an undefined status.
                                                                                          +   * This may occur when the user does not complete the full roll call or skips participants.
                                                                                          +   * The count of unknown status can indicate if manual checking and corrections are required.
                                                                                          +   *
                                                                                          +   * @param forChildId filter the calculation to only include status of the given participant id
                                                                                          +   */
                                                                                          +  countEventsWithUnknownStatus(forChildId?: string): number {
                                                                                          +    return this.events
                                                                                          +      .filter((e) => !forChildId || e.children.includes(forChildId))
                                                                                          +      .reduce(
                                                                                          +        (count: number, e: EventNote) =>
                                                                                          +          e.hasUnknownAttendances(forChildId) ? count + 1 : count,
                                                                                          +        0,
                                                                                          +      );
                                                                                          +  }
                                                                                          +
                                                                                          +  recalculateStats() {
                                                                                          +    this.individualStatusTypeCounts = new Map();
                                                                                          +    this.individualLogicalStatusCounts = new Map();
                                                                                          +
                                                                                          +    for (const event of this.events) {
                                                                                          +      for (const participant of event.children) {
                                                                                          +        let logicalCount = this.individualLogicalStatusCounts.get(participant);
                                                                                          +        if (!logicalCount) {
                                                                                          +          logicalCount = {};
                                                                                          +          this.individualLogicalStatusCounts.set(participant, logicalCount);
                                                                                          +        }
                                                                                          +        let typeCount = this.individualStatusTypeCounts.get(participant);
                                                                                          +        if (!typeCount) {
                                                                                          +          typeCount = {};
                                                                                          +          this.individualStatusTypeCounts.set(participant, typeCount);
                                                                                          +        }
                                                                                          +
                                                                                          +        const att = event.getAttendance(participant);
                                                                                          +        logicalCount[att.status.countAs] =
                                                                                          +          (logicalCount[att.status.countAs] ?? 0) + 1;
                                                                                          +        typeCount[att.status.id] = (typeCount[att.status.id] ?? 0) + 1;
                                                                                          +      }
                                                                                          +    }
                                                                                          +  }
                                                                                          +
                                                                                          +  /**
                                                                                          +   * Custom warning level for attendance thresholds - optionally for a specific child.
                                                                                          +   */
                                                                                          +  public override getWarningLevel(forChildId?: string): WarningLevel {
                                                                                          +    let attendancePercentage;
                                                                                          +    if (forChildId) {
                                                                                          +      attendancePercentage = this.getAttendancePercentage(forChildId);
                                                                                          +    } else {
                                                                                          +      attendancePercentage = this.getAttendancePercentageAverage();
                                                                                          +    }
                                                                                          +
                                                                                          +    if (!attendancePercentage) {
                                                                                          +      return WarningLevel.NONE;
                                                                                          +    } else if (attendancePercentage < ActivityAttendance.THRESHOLD_URGENT) {
                                                                                          +      return WarningLevel.URGENT;
                                                                                          +    } else if (attendancePercentage < ActivityAttendance.THRESHOLD_WARNING) {
                                                                                          +      return WarningLevel.WARNING;
                                                                                          +    } else {
                                                                                          +      return WarningLevel.OK;
                                                                                          +    }
                                                                                          +  }
                                                                                          +
                                                                                          +  public override getColor(forChildId?: string): string {
                                                                                          +    return getWarningLevelColor(this.getWarningLevel(forChildId));
                                                                                          +  }
                                                                                          +}
                                                                                          +
                                                                                          +/**
                                                                                          + * Generate a event with children for the given AttendanceStatus array.
                                                                                          + *
                                                                                          + * This is particularly useful to generate simple data for demo or test purposes.
                                                                                          + *
                                                                                          + * @param participating Object where keys are string childId and values are its attendance status
                                                                                          + * @param date (Optional) date of the event; if not given today's date is used
                                                                                          + * @param activity (Optional) reference to the connected activity entity
                                                                                          + */
                                                                                          +export function generateEventWithAttendance(
                                                                                          +  participating: (
                                                                                          +    | [string, AttendanceLogicalStatus]
                                                                                          +    | [string, AttendanceLogicalStatus, string]
                                                                                          +  )[],
                                                                                          +  date = new Date(),
                                                                                          +  activity?: RecurringActivity,
                                                                                          +): EventNote {
                                                                                          +  const event = EventNote.create(date);
                                                                                          +  for (const att of participating) {
                                                                                          +    event.addChild(att[0]);
                                                                                          +    event.getAttendance(att[0]).status = defaultAttendanceStatusTypes.find(
                                                                                          +      (t) => t.countAs === att[1],
                                                                                          +    );
                                                                                          +    if (att.length === 3) {
                                                                                          +      event.getAttendance(att[0]).remarks = att[2];
                                                                                          +    }
                                                                                          +  }
                                                                                          +  event.relatesTo = activity?.getId();
                                                                                          +  return event;
                                                                                          +}
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + +
                                                                                          +
                                                                                          +

                                                                                          results matching ""

                                                                                          +
                                                                                            +
                                                                                            +
                                                                                            +

                                                                                            No results matching ""

                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/BooleanFilter.html b/documentation/classes/BooleanFilter.html new file mode 100644 index 0000000000..9293515837 --- /dev/null +++ b/documentation/classes/BooleanFilter.html @@ -0,0 +1,902 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + +
                                                                                            +
                                                                                            +

                                                                                            +

                                                                                            File

                                                                                            +

                                                                                            +

                                                                                            + src/app/core/filter/filters/booleanFilter.ts +

                                                                                            + + + +

                                                                                            +

                                                                                            Extends

                                                                                            +

                                                                                            +

                                                                                            + SelectableFilter +

                                                                                            + + + +
                                                                                            +

                                                                                            Index

                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                            +
                                                                                            Properties
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            Methods
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            +

                                                                                            Constructor

                                                                                            + + + + + + + + + + + + + +
                                                                                            +constructor(name: string, label: string, config?: BooleanFilterConfig) +
                                                                                            + +
                                                                                            +
                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            NameTypeOptional
                                                                                            name + string + + No +
                                                                                            label + string + + No +
                                                                                            config + BooleanFilterConfig + + Yes +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            + +

                                                                                            + Properties +

                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + Public + + label + + +
                                                                                            + Type : string + +
                                                                                            + Default value : name +
                                                                                            +
                                                                                            Inherited from Filter +
                                                                                            +
                                                                                            +
                                                                                            Defined in Filter:100 +
                                                                                            +
                                                                                            +
                                                                                            The user-friendly label describing this filter-selection +(optional, defaults to the name of the selection)
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + Public + + name + + +
                                                                                            + Type : string + +
                                                                                            +
                                                                                            Inherited from Filter +
                                                                                            +
                                                                                            +
                                                                                            Defined in Filter:98 +
                                                                                            +
                                                                                            +
                                                                                            The name or id describing this filter
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + Public + options + + +
                                                                                            + Type : FilterSelectionOption<T>[] + +
                                                                                            +
                                                                                            Inherited from SelectableFilter +
                                                                                            +
                                                                                            +
                                                                                            Defined in SelectableFilter:99 +
                                                                                            +
                                                                                            +
                                                                                            An array of different filtering variants to chose between
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + component + + +
                                                                                            + Type : Type<any> + +
                                                                                            + Default value : ListFilterComponent +
                                                                                            +
                                                                                            Inherited from Filter +
                                                                                            +
                                                                                            +
                                                                                            Defined in Filter:35 +
                                                                                            +
                                                                                            +

                                                                                            The component used to display filter option to the user.

                                                                                            +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + selectedOptionChange + + +
                                                                                            + Default value : new EventEmitter<string[]>() +
                                                                                            +
                                                                                            Inherited from Filter +
                                                                                            +
                                                                                            +
                                                                                            Defined in Filter:45 +
                                                                                            +
                                                                                            +

                                                                                            Triggered when this filter changes value +(e.g. when the user selects a new value in a FilterComponent).

                                                                                            +

                                                                                            This is part of the filter object because dynamic filter components can't expose @Outputs

                                                                                            +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + Public + selectedOptionValues + + +
                                                                                            + Type : string[] + +
                                                                                            + Default value : [] +
                                                                                            +
                                                                                            Inherited from Filter +
                                                                                            +
                                                                                            +
                                                                                            Defined in Filter:37 +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            + +

                                                                                            + Methods +

                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + Static + generateOptions + + +
                                                                                            + + generateOptions(valuesToMatchAsOptions: (string | number)[], attributeName: string) +
                                                                                            +
                                                                                            Inherited from SelectableFilter +
                                                                                            +
                                                                                            +
                                                                                            Defined in SelectableFilter:77 +
                                                                                            +
                                                                                            + Type parameters : +
                                                                                              +
                                                                                            • T
                                                                                            • +
                                                                                            +
                                                                                            +

                                                                                            Generate filter options dynamically from the given value to be matched.

                                                                                            +

                                                                                            This is a utility function to make it easier to generate FilterSelectionOptions for standard cases +if you simply want each option to filter items having the given attribute matching different values. +If you have more sophisticated filtering needs, use the constructor to set FilterSelectionOptions that +you created yourself.

                                                                                            +Example :
                                                                                               A separate FilterSelectionOption is created for each value with a filter
                                                                                            +   that is true of a data item's property exactly matches that value.
                                                                                            + +
                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            NameTypeOptionalDescription
                                                                                            valuesToMatchAsOptions + (string | number)[] + + No + +

                                                                                            An array of values to be matched. +A separate FilterSelectionOption is created for each value with a filter +that is true of a data item's property exactly matches that value.

                                                                                            + +
                                                                                            attributeName + string + + No + +

                                                                                            The name of the property of a data item that is compared to the value in the filter function.

                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            + Returns : FilterSelectionOption[] + +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + Public + getFilter + + +
                                                                                            + + getFilter() +
                                                                                            +
                                                                                            Inherited from Filter +
                                                                                            +
                                                                                            +
                                                                                            Defined in Filter:120 +
                                                                                            +
                                                                                            +

                                                                                            Get the filter query for the given option. +If the given key is undefined or invalid, the returned filter matches any elements.

                                                                                            +
                                                                                            + +
                                                                                            + Returns : DataFilter<T> + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                            + + + getOption + + +
                                                                                            +getOption(key: string) +
                                                                                            +
                                                                                            Inherited from SelectableFilter +
                                                                                            +
                                                                                            + +
                                                                                            +

                                                                                            Get the full filter option by its key.

                                                                                            +
                                                                                            + +
                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                            NameTypeOptionalDescription
                                                                                            key + string + + No + +

                                                                                            The identifier of the requested option

                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            + + + + + +
                                                                                            + + +
                                                                                            +
                                                                                            import { Entity } from "../../entity/model/entity";
                                                                                            +import { BooleanFilterConfig } from "../../entity-list/EntityListConfig";
                                                                                            +import { DataFilter, SelectableFilter } from "./filters";
                                                                                            +
                                                                                            +export class BooleanFilter<T extends Entity> extends SelectableFilter<T> {
                                                                                            +  constructor(name: string, label: string, config?: BooleanFilterConfig) {
                                                                                            +    super(
                                                                                            +      name,
                                                                                            +      [
                                                                                            +        {
                                                                                            +          key: "true",
                                                                                            +          label:
                                                                                            +            config.true ?? $localize`:Filter label default boolean true:Yes`,
                                                                                            +          filter: { [config.id]: true } as DataFilter<T>,
                                                                                            +        },
                                                                                            +        {
                                                                                            +          key: "false",
                                                                                            +          label:
                                                                                            +            config.false ?? $localize`:Filter label default boolean true:No`,
                                                                                            +          filter: {
                                                                                            +            [config.id]: { $in: [false, undefined] },
                                                                                            +          } as DataFilter<T>,
                                                                                            +        },
                                                                                            +      ],
                                                                                            +      label,
                                                                                            +    );
                                                                                            +  }
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + + + + + + + + + +
                                                                                            +
                                                                                            +

                                                                                            results matching ""

                                                                                            +
                                                                                              +
                                                                                              +
                                                                                              +

                                                                                              No results matching ""

                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/CascadingActionResult.html b/documentation/classes/CascadingActionResult.html new file mode 100644 index 0000000000..b583fb784b --- /dev/null +++ b/documentation/classes/CascadingActionResult.html @@ -0,0 +1,586 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                              +
                                                                                              + + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + +
                                                                                              +
                                                                                              +

                                                                                              +

                                                                                              File

                                                                                              +

                                                                                              +

                                                                                              + src/app/core/entity/entity-actions/cascading-entity-action.ts +

                                                                                              + + + + + + +
                                                                                              +

                                                                                              Index

                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                              +
                                                                                              Properties
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              Methods
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              +

                                                                                              Constructor

                                                                                              + + + + + + + + + + + + + +
                                                                                              +constructor(changedEntities?: Entity[], potentiallyRetainingPII?: Entity[]) +
                                                                                              + +
                                                                                              +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              changedEntities + Entity[] + + Yes +
                                                                                              potentiallyRetainingPII + Entity[] + + Yes +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + +
                                                                                              + +

                                                                                              + Properties +

                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                              + + + originalEntitiesBeforeChange + + +
                                                                                              + Type : Entity[] + +
                                                                                              + +
                                                                                              +

                                                                                              entities that have been updated in the process, in their original state +(can be used for undo action)

                                                                                              +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                              + + + potentiallyRetainingPII + + +
                                                                                              + Type : Entity[] + +
                                                                                              + +
                                                                                              +

                                                                                              entities that may still contain PII related to the primary entity that could not be automatically removed +(may need manual review by the user)

                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + +
                                                                                              + +

                                                                                              + Methods +

                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + mergeResults + + +
                                                                                              +mergeResults(otherResult: CascadingActionResult) +
                                                                                              + +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              otherResult + CascadingActionResult + + No +
                                                                                              +
                                                                                              +
                                                                                              + Returns : this + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              +
                                                                                              + + + + + +
                                                                                              + + +
                                                                                              +
                                                                                              import { Entity } from "../model/entity";
                                                                                              +import { asArray } from "../../../utils/utils";
                                                                                              +import { EntitySchemaService } from "../schema/entity-schema.service";
                                                                                              +import { EntityMapperService } from "../entity-mapper/entity-mapper.service";
                                                                                              +
                                                                                              +export class CascadingActionResult {
                                                                                              +  /**
                                                                                              +   * entities that have been updated in the process, in their original state
                                                                                              +   * (can be used for undo action)
                                                                                              +   */
                                                                                              +  originalEntitiesBeforeChange: Entity[];
                                                                                              +
                                                                                              +  /**
                                                                                              +   * entities that may still contain PII related to the primary entity that could not be automatically removed
                                                                                              +   * (may need manual review by the user)
                                                                                              +   */
                                                                                              +  potentiallyRetainingPII: Entity[];
                                                                                              +
                                                                                              +  constructor(changedEntities?: Entity[], potentiallyRetainingPII?: Entity[]) {
                                                                                              +    this.originalEntitiesBeforeChange = changedEntities ?? [];
                                                                                              +    this.potentiallyRetainingPII = potentiallyRetainingPII ?? [];
                                                                                              +  }
                                                                                              +
                                                                                              +  mergeResults(otherResult: CascadingActionResult) {
                                                                                              +    this.originalEntitiesBeforeChange = [
                                                                                              +      ...this.originalEntitiesBeforeChange,
                                                                                              +      ...otherResult.originalEntitiesBeforeChange.filter(
                                                                                              +        (e) =>
                                                                                              +          !this.originalEntitiesBeforeChange.some(
                                                                                              +            (x) => x.getId() === e.getId(),
                                                                                              +          ),
                                                                                              +      ),
                                                                                              +    ];
                                                                                              +    this.potentiallyRetainingPII = [
                                                                                              +      ...this.potentiallyRetainingPII,
                                                                                              +      ...otherResult.potentiallyRetainingPII.filter(
                                                                                              +        (e) =>
                                                                                              +          !this.potentiallyRetainingPII.some((x) => x.getId() === e.getId()),
                                                                                              +      ),
                                                                                              +    ];
                                                                                              +
                                                                                              +    return this;
                                                                                              +  }
                                                                                              +}
                                                                                              +
                                                                                              +/**
                                                                                              + * extend this class to implement services that perform actions on an entity
                                                                                              + * that require recursive actions to related entities as well.
                                                                                              + */
                                                                                              +export abstract class CascadingEntityAction {
                                                                                              +  protected constructor(
                                                                                              +    protected entityMapper: EntityMapperService,
                                                                                              +    protected schemaService: EntitySchemaService,
                                                                                              +  ) {}
                                                                                              +
                                                                                              +  /**
                                                                                              +   * Recursively call the given actions on all related entities that contain a reference to the given entity.
                                                                                              +   *
                                                                                              +   * Returns an array of all affected related entities (excluding the given entity) in their state before the action
                                                                                              +   * to support an undo action.
                                                                                              +   *
                                                                                              +   * @param entity
                                                                                              +   * @param compositeAction
                                                                                              +   * @param aggregateAction
                                                                                              +   * @private
                                                                                              +   */
                                                                                              +  protected async cascadeActionToRelatedEntities(
                                                                                              +    entity: Entity,
                                                                                              +    compositeAction: (
                                                                                              +      relatedEntity: Entity,
                                                                                              +      refField?: string,
                                                                                              +      entity?: Entity,
                                                                                              +    ) => Promise<CascadingActionResult>,
                                                                                              +    aggregateAction: (
                                                                                              +      relatedEntity: Entity,
                                                                                              +      refField?: string,
                                                                                              +      entity?: Entity,
                                                                                              +    ) => Promise<CascadingActionResult>,
                                                                                              +  ): Promise<CascadingActionResult> {
                                                                                              +    const cascadeActionResult = new CascadingActionResult();
                                                                                              +
                                                                                              +    const entityTypesWithReferences =
                                                                                              +      this.schemaService.getEntityTypesReferencingType(entity.getType());
                                                                                              +
                                                                                              +    for (const refType of entityTypesWithReferences) {
                                                                                              +      const entities = await this.entityMapper.loadType(refType.entityType);
                                                                                              +
                                                                                              +      for (const refField of refType.referencingProperties) {
                                                                                              +        const affectedEntities = entities.filter((e) =>
                                                                                              +          asArray(e[refField]).includes(entity.getId()),
                                                                                              +        );
                                                                                              +
                                                                                              +        for (const e of affectedEntities) {
                                                                                              +          if (
                                                                                              +            refType.entityType.schema.get(refField).entityReferenceRole ===
                                                                                              +              "composite" &&
                                                                                              +            asArray(e[refField]).length === 1
                                                                                              +          ) {
                                                                                              +            // is only composite
                                                                                              +            const result = await compositeAction(e);
                                                                                              +            cascadeActionResult.mergeResults(result);
                                                                                              +          } else {
                                                                                              +            const result = await aggregateAction(e, refField, entity);
                                                                                              +            cascadeActionResult.mergeResults(result);
                                                                                              +          }
                                                                                              +        }
                                                                                              +      }
                                                                                              +    }
                                                                                              +
                                                                                              +    return cascadeActionResult;
                                                                                              +  }
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + + + + + + + + + +
                                                                                              +
                                                                                              +

                                                                                              results matching ""

                                                                                              +
                                                                                                +
                                                                                                +
                                                                                                +

                                                                                                No results matching ""

                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/CascadingEntityAction.html b/documentation/classes/CascadingEntityAction.html new file mode 100644 index 0000000000..6a294edfeb --- /dev/null +++ b/documentation/classes/CascadingEntityAction.html @@ -0,0 +1,539 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                +
                                                                                                +

                                                                                                +

                                                                                                File

                                                                                                +

                                                                                                +

                                                                                                + src/app/core/entity/entity-actions/cascading-entity-action.ts +

                                                                                                + + +

                                                                                                +

                                                                                                Description

                                                                                                +

                                                                                                +

                                                                                                +

                                                                                                extend this class to implement services that perform actions on an entity +that require recursive actions to related entities as well.

                                                                                                + +

                                                                                                + + + + +
                                                                                                +

                                                                                                Index

                                                                                                + + + + + + + + + + + + + + + +
                                                                                                +
                                                                                                Methods
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                +

                                                                                                Constructor

                                                                                                + + + + + + + + + + + + + +
                                                                                                + Protected + constructor(entityMapper: EntityMapperService, schemaService: EntitySchemaService) +
                                                                                                + +
                                                                                                +
                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                NameTypeOptional
                                                                                                entityMapper + EntityMapperService + + No +
                                                                                                schemaService + EntitySchemaService + + No +
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + + +
                                                                                                + +

                                                                                                + Methods +

                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                + + + Protected + Async + cascadeActionToRelatedEntities + + +
                                                                                                + + cascadeActionToRelatedEntities(entity: Entity, compositeAction: (relatedEntity: Entity,refField: string,entity: Entity) => void, aggregateAction: (relatedEntity: Entity,refField: string,entity: Entity) => void) +
                                                                                                + +
                                                                                                +

                                                                                                Recursively call the given actions on all related entities that contain a reference to the given entity.

                                                                                                +

                                                                                                Returns an array of all affected related entities (excluding the given entity) in their state before the action +to support an undo action.

                                                                                                +
                                                                                                + +
                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                NameTypeOptional
                                                                                                entity + Entity + + No +
                                                                                                compositeAction + function + + No +
                                                                                                aggregateAction + function + + No +
                                                                                                +
                                                                                                + +
                                                                                                + +
                                                                                                +
                                                                                                +
                                                                                                + + + + + +
                                                                                                + + +
                                                                                                +
                                                                                                import { Entity } from "../model/entity";
                                                                                                +import { asArray } from "../../../utils/utils";
                                                                                                +import { EntitySchemaService } from "../schema/entity-schema.service";
                                                                                                +import { EntityMapperService } from "../entity-mapper/entity-mapper.service";
                                                                                                +
                                                                                                +export class CascadingActionResult {
                                                                                                +  /**
                                                                                                +   * entities that have been updated in the process, in their original state
                                                                                                +   * (can be used for undo action)
                                                                                                +   */
                                                                                                +  originalEntitiesBeforeChange: Entity[];
                                                                                                +
                                                                                                +  /**
                                                                                                +   * entities that may still contain PII related to the primary entity that could not be automatically removed
                                                                                                +   * (may need manual review by the user)
                                                                                                +   */
                                                                                                +  potentiallyRetainingPII: Entity[];
                                                                                                +
                                                                                                +  constructor(changedEntities?: Entity[], potentiallyRetainingPII?: Entity[]) {
                                                                                                +    this.originalEntitiesBeforeChange = changedEntities ?? [];
                                                                                                +    this.potentiallyRetainingPII = potentiallyRetainingPII ?? [];
                                                                                                +  }
                                                                                                +
                                                                                                +  mergeResults(otherResult: CascadingActionResult) {
                                                                                                +    this.originalEntitiesBeforeChange = [
                                                                                                +      ...this.originalEntitiesBeforeChange,
                                                                                                +      ...otherResult.originalEntitiesBeforeChange.filter(
                                                                                                +        (e) =>
                                                                                                +          !this.originalEntitiesBeforeChange.some(
                                                                                                +            (x) => x.getId() === e.getId(),
                                                                                                +          ),
                                                                                                +      ),
                                                                                                +    ];
                                                                                                +    this.potentiallyRetainingPII = [
                                                                                                +      ...this.potentiallyRetainingPII,
                                                                                                +      ...otherResult.potentiallyRetainingPII.filter(
                                                                                                +        (e) =>
                                                                                                +          !this.potentiallyRetainingPII.some((x) => x.getId() === e.getId()),
                                                                                                +      ),
                                                                                                +    ];
                                                                                                +
                                                                                                +    return this;
                                                                                                +  }
                                                                                                +}
                                                                                                +
                                                                                                +/**
                                                                                                + * extend this class to implement services that perform actions on an entity
                                                                                                + * that require recursive actions to related entities as well.
                                                                                                + */
                                                                                                +export abstract class CascadingEntityAction {
                                                                                                +  protected constructor(
                                                                                                +    protected entityMapper: EntityMapperService,
                                                                                                +    protected schemaService: EntitySchemaService,
                                                                                                +  ) {}
                                                                                                +
                                                                                                +  /**
                                                                                                +   * Recursively call the given actions on all related entities that contain a reference to the given entity.
                                                                                                +   *
                                                                                                +   * Returns an array of all affected related entities (excluding the given entity) in their state before the action
                                                                                                +   * to support an undo action.
                                                                                                +   *
                                                                                                +   * @param entity
                                                                                                +   * @param compositeAction
                                                                                                +   * @param aggregateAction
                                                                                                +   * @private
                                                                                                +   */
                                                                                                +  protected async cascadeActionToRelatedEntities(
                                                                                                +    entity: Entity,
                                                                                                +    compositeAction: (
                                                                                                +      relatedEntity: Entity,
                                                                                                +      refField?: string,
                                                                                                +      entity?: Entity,
                                                                                                +    ) => Promise<CascadingActionResult>,
                                                                                                +    aggregateAction: (
                                                                                                +      relatedEntity: Entity,
                                                                                                +      refField?: string,
                                                                                                +      entity?: Entity,
                                                                                                +    ) => Promise<CascadingActionResult>,
                                                                                                +  ): Promise<CascadingActionResult> {
                                                                                                +    const cascadeActionResult = new CascadingActionResult();
                                                                                                +
                                                                                                +    const entityTypesWithReferences =
                                                                                                +      this.schemaService.getEntityTypesReferencingType(entity.getType());
                                                                                                +
                                                                                                +    for (const refType of entityTypesWithReferences) {
                                                                                                +      const entities = await this.entityMapper.loadType(refType.entityType);
                                                                                                +
                                                                                                +      for (const refField of refType.referencingProperties) {
                                                                                                +        const affectedEntities = entities.filter((e) =>
                                                                                                +          asArray(e[refField]).includes(entity.getId()),
                                                                                                +        );
                                                                                                +
                                                                                                +        for (const e of affectedEntities) {
                                                                                                +          if (
                                                                                                +            refType.entityType.schema.get(refField).entityReferenceRole ===
                                                                                                +              "composite" &&
                                                                                                +            asArray(e[refField]).length === 1
                                                                                                +          ) {
                                                                                                +            // is only composite
                                                                                                +            const result = await compositeAction(e);
                                                                                                +            cascadeActionResult.mergeResults(result);
                                                                                                +          } else {
                                                                                                +            const result = await aggregateAction(e, refField, entity);
                                                                                                +            cascadeActionResult.mergeResults(result);
                                                                                                +          }
                                                                                                +        }
                                                                                                +      }
                                                                                                +    }
                                                                                                +
                                                                                                +    return cascadeActionResult;
                                                                                                +  }
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + + + + + + + + + +
                                                                                                +
                                                                                                +

                                                                                                results matching ""

                                                                                                +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  No results matching ""

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Changelog.html b/documentation/classes/Changelog.html new file mode 100644 index 0000000000..0b4f45d001 --- /dev/null +++ b/documentation/classes/Changelog.html @@ -0,0 +1,496 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  +

                                                                                                  File

                                                                                                  +

                                                                                                  +

                                                                                                  + src/app/core/ui/latest-changes/changelog.ts +

                                                                                                  + + +

                                                                                                  +

                                                                                                  Description

                                                                                                  +

                                                                                                  +

                                                                                                  +

                                                                                                  Format of a changelog entry in the changelog.json describing one app version.

                                                                                                  + +

                                                                                                  + + + + +
                                                                                                  +

                                                                                                  Index

                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  Properties
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + +

                                                                                                  + Properties +

                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                  + + + body + + +
                                                                                                  + Type : string + +
                                                                                                  + +
                                                                                                  +

                                                                                                  description of changes included in this version

                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Optional + draft + + +
                                                                                                  + Type : boolean + +
                                                                                                  + +
                                                                                                  +

                                                                                                  whether it is a draft

                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                  + + + name + + +
                                                                                                  + Type : string + +
                                                                                                  + +
                                                                                                  +

                                                                                                  short title of the version

                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Optional + prerelease + + +
                                                                                                  + Type : boolean + +
                                                                                                  + +
                                                                                                  +

                                                                                                  whether it is a pre-release

                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                  + + + published_at + + +
                                                                                                  + Type : string + +
                                                                                                  + +
                                                                                                  +

                                                                                                  release date

                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                  + + + tag_name + + +
                                                                                                  + Type : string + +
                                                                                                  + +
                                                                                                  +

                                                                                                  version tag, e.g. "2.1.7"

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + +
                                                                                                  + + +
                                                                                                  +
                                                                                                  export class Changelog {
                                                                                                  +  /** short title of the version */
                                                                                                  +  name: string;
                                                                                                  +
                                                                                                  +  /** version tag, e.g. "2.1.7" */
                                                                                                  +  tag_name: string;
                                                                                                  +
                                                                                                  +  /** description of changes included in this version */
                                                                                                  +  body: string;
                                                                                                  +
                                                                                                  +  /** release date */
                                                                                                  +  published_at: string;
                                                                                                  +
                                                                                                  +  /** whether it is a pre-release */
                                                                                                  +  prerelease?: boolean;
                                                                                                  +
                                                                                                  +  /** whether it is a draft */
                                                                                                  +  draft?: boolean;
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + + + + + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  results matching ""

                                                                                                  +
                                                                                                    +
                                                                                                    +
                                                                                                    +

                                                                                                    No results matching ""

                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ChildSchoolRelation.html b/documentation/classes/ChildSchoolRelation.html new file mode 100644 index 0000000000..d365d8b638 --- /dev/null +++ b/documentation/classes/ChildSchoolRelation.html @@ -0,0 +1,513 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    +
                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    +

                                                                                                    File

                                                                                                    +

                                                                                                    +

                                                                                                    + src/app/child-dev-project/children/model/childSchoolRelation.ts +

                                                                                                    + + +

                                                                                                    +

                                                                                                    Description

                                                                                                    +

                                                                                                    +

                                                                                                    +

                                                                                                    Record of a school year that a Child attended a certain class in a School.

                                                                                                    +

                                                                                                    This class remains as a stub and in the future will be further refactored +TODO: refactor into generic time-period based relationship entity --> #2512

                                                                                                    + +

                                                                                                    + + + + +
                                                                                                    +

                                                                                                    Index

                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    Properties
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + +

                                                                                                    + Properties +

                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                    + + + + childId + + +
                                                                                                    + Type : string + +
                                                                                                    + Decorators : +
                                                                                                    + + @DatabaseField({dataType: 'entity', additional: 'Child', entityReferenceRole: 'composite', validators: undefined, anonymize: 'retain'})
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                    + + + + + end + + +
                                                                                                    + Type : Date + +
                                                                                                    + Decorators : +
                                                                                                    + + @DatabaseField({dataType: 'date-only', label: undefined, description: undefined, anonymize: 'retain'})
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    + + + + + + + + + + + + + + +
                                                                                                    + + + Static + + hasPII + + +
                                                                                                    + Default value : true +
                                                                                                    + +
                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                    + + + + schoolId + + +
                                                                                                    + Type : string + +
                                                                                                    + Decorators : +
                                                                                                    + + @DatabaseField({dataType: 'entity', additional: 'School', entityReferenceRole: 'aggregate', validators: undefined, anonymize: 'retain'})
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                    + + + + + start + + +
                                                                                                    + Type : Date + +
                                                                                                    + Decorators : +
                                                                                                    + + @DatabaseField({dataType: 'date-only', label: undefined, description: undefined, anonymize: 'retain'})
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + + +
                                                                                                    + + +
                                                                                                    +
                                                                                                    import { DatabaseEntity } from "../../../core/entity/database-entity.decorator";
                                                                                                    +import { DatabaseField } from "../../../core/entity/database-field.decorator";
                                                                                                    +import { TimePeriod } from "../../../core/entity-details/related-time-period-entities/time-period";
                                                                                                    +
                                                                                                    +/**
                                                                                                    + * Record of a school year that a Child attended a certain class in a School.
                                                                                                    + *
                                                                                                    + * This class remains as a stub and in the future will be further refactored
                                                                                                    + * TODO: refactor into generic time-period based relationship entity --> #2512
                                                                                                    + */
                                                                                                    +@DatabaseEntity("ChildSchoolRelation")
                                                                                                    +export class ChildSchoolRelation extends TimePeriod {
                                                                                                    +  static override hasPII = true;
                                                                                                    +
                                                                                                    +  @DatabaseField({
                                                                                                    +    dataType: "entity",
                                                                                                    +    additional: "Child",
                                                                                                    +    entityReferenceRole: "composite",
                                                                                                    +    validators: {
                                                                                                    +      required: true,
                                                                                                    +    },
                                                                                                    +    anonymize: "retain",
                                                                                                    +  })
                                                                                                    +  childId: string;
                                                                                                    +
                                                                                                    +  @DatabaseField({
                                                                                                    +    dataType: "entity",
                                                                                                    +    additional: "School",
                                                                                                    +    entityReferenceRole: "aggregate",
                                                                                                    +    validators: {
                                                                                                    +      required: true,
                                                                                                    +    },
                                                                                                    +    anonymize: "retain",
                                                                                                    +  })
                                                                                                    +  schoolId: string;
                                                                                                    +
                                                                                                    +  @DatabaseField({
                                                                                                    +    dataType: "date-only",
                                                                                                    +    label: $localize`:Label for the start date of a relation:Start date`,
                                                                                                    +    description: $localize`:Description of the start date of a relation:The date a child joins a school`,
                                                                                                    +    anonymize: "retain",
                                                                                                    +  })
                                                                                                    +  declare start: Date;
                                                                                                    +
                                                                                                    +  @DatabaseField({
                                                                                                    +    dataType: "date-only",
                                                                                                    +    label: $localize`:Label for the end date of a relation:End date`,
                                                                                                    +    description: $localize`:Description of the end date of a relation:The date of a child leaving the school`,
                                                                                                    +    anonymize: "retain",
                                                                                                    +  })
                                                                                                    +  declare end: Date;
                                                                                                    +}
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    + + + + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    results matching ""

                                                                                                    +
                                                                                                      +
                                                                                                      +
                                                                                                      +

                                                                                                      No results matching ""

                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ComponentRegistry.html b/documentation/classes/ComponentRegistry.html new file mode 100644 index 0000000000..3d1aa95411 --- /dev/null +++ b/documentation/classes/ComponentRegistry.html @@ -0,0 +1,585 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      +

                                                                                                      File

                                                                                                      +

                                                                                                      +

                                                                                                      + src/app/dynamic-components.ts +

                                                                                                      + + +

                                                                                                      +

                                                                                                      Description

                                                                                                      +

                                                                                                      +

                                                                                                      +

                                                                                                      This registry hold all the loading functions for components that can be used dynamically with lazy loading.

                                                                                                      + +

                                                                                                      + +

                                                                                                      +

                                                                                                      Extends

                                                                                                      +

                                                                                                      +

                                                                                                      + Registry +

                                                                                                      + + + +
                                                                                                      +

                                                                                                      Index

                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      Methods
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + +
                                                                                                      + +

                                                                                                      + Methods +

                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                      + + + Public + add + + +
                                                                                                      + + add(key: string, mapping: T) +
                                                                                                      +
                                                                                                      Inherited from Registry +
                                                                                                      +
                                                                                                      +
                                                                                                      Defined in Registry:17 +
                                                                                                      +
                                                                                                      + +
                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                      NameTypeOptional
                                                                                                      key + string + + No +
                                                                                                      mapping + T + + No +
                                                                                                      +
                                                                                                      +
                                                                                                      + Returns : void + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                      + + + Public + addAll + + +
                                                                                                      + + addAll(tuples: []) +
                                                                                                      +
                                                                                                      Inherited from Registry +
                                                                                                      +
                                                                                                      +
                                                                                                      Defined in Registry:31 +
                                                                                                      +
                                                                                                      + +
                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                      NameTypeOptional
                                                                                                      tuples + [] + + No +
                                                                                                      +
                                                                                                      +
                                                                                                      + Returns : void + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                      + + + Public + allowDuplicates + + +
                                                                                                      + + allowDuplicates() +
                                                                                                      +
                                                                                                      Inherited from Registry +
                                                                                                      +
                                                                                                      +
                                                                                                      Defined in Registry:49 +
                                                                                                      +
                                                                                                      +

                                                                                                      Calling this will allow the same keys to be added multiple times without thrown errors. +This is useful for storybook where live-updates re-trigger the decorator while the registry is cached.

                                                                                                      +
                                                                                                      + +
                                                                                                      + Returns : void + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                      + + + Public + + get + + +
                                                                                                      + + get(key: string) +
                                                                                                      +
                                                                                                      Inherited from Registry +
                                                                                                      +
                                                                                                      +
                                                                                                      Defined in Registry:35 +
                                                                                                      +
                                                                                                      + +
                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                      NameTypeOptional
                                                                                                      key + string + + No +
                                                                                                      +
                                                                                                      +
                                                                                                      + Returns : T + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +
                                                                                                      + + + + + +
                                                                                                      + + +
                                                                                                      +
                                                                                                      import { Type } from "@angular/core";
                                                                                                      +import { Registry } from "./core/config/registry/dynamic-registry";
                                                                                                      +
                                                                                                      +export type AsyncComponent = () => Promise<Type<any>>;
                                                                                                      +
                                                                                                      +/**
                                                                                                      + * This registry hold all the loading functions for components that can be used dynamically with lazy loading.
                                                                                                      + */
                                                                                                      +export class ComponentRegistry extends Registry<AsyncComponent> {}
                                                                                                      +
                                                                                                      +// TODO make a build script that looks for annotations and creates this
                                                                                                      +export const componentRegistry = new ComponentRegistry();
                                                                                                      +
                                                                                                      +export type ComponentTuple = [string, AsyncComponent];
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      + + + + + + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      results matching ""

                                                                                                      +
                                                                                                        +
                                                                                                        +
                                                                                                        +

                                                                                                        No results matching ""

                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Config.html b/documentation/classes/Config.html new file mode 100644 index 0000000000..38014aff30 --- /dev/null +++ b/documentation/classes/Config.html @@ -0,0 +1,541 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        +

                                                                                                        +

                                                                                                        File

                                                                                                        +

                                                                                                        +

                                                                                                        + src/app/core/config/config.ts +

                                                                                                        + + +

                                                                                                        +

                                                                                                        Description

                                                                                                        +

                                                                                                        +

                                                                                                        +

                                                                                                        The class which represents the config for the application.

                                                                                                        + +

                                                                                                        + + + + +
                                                                                                        +

                                                                                                        Index

                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        Properties
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        Methods
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +

                                                                                                        Constructor

                                                                                                        + + + + + + + + + + + + + +
                                                                                                        +constructor(id, configuration?: T) +
                                                                                                        + +
                                                                                                        +
                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        NameTypeOptional
                                                                                                        id + + No +
                                                                                                        configuration + T + + Yes +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        + +

                                                                                                        + Properties +

                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + + Static + Readonly + CONFIG_KEY + + +
                                                                                                        + Type : string + +
                                                                                                        + Default value : "CONFIG_ENTITY" +
                                                                                                        + +
                                                                                                        +

                                                                                                        The ID for the UI and data-model config

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + + + data + + +
                                                                                                        + Type : T + +
                                                                                                        + Decorators : +
                                                                                                        + + @DatabaseField()
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +

                                                                                                        This field contains all the configuration and does not have a predefined type.

                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + + Static + Readonly + PERMISSION_KEY + + +
                                                                                                        + Type : string + +
                                                                                                        + Default value : "Permissions" +
                                                                                                        + +
                                                                                                        +

                                                                                                        The ID for the permission configuration

                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        + +

                                                                                                        + Methods +

                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                        + + + + copy + + +
                                                                                                        + + copy() +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + + + + +
                                                                                                        + + +
                                                                                                        +
                                                                                                        import { Entity } from "../entity/model/entity";
                                                                                                        +import { DatabaseField } from "../entity/database-field.decorator";
                                                                                                        +import { DatabaseEntity } from "../entity/database-entity.decorator";
                                                                                                        +
                                                                                                        +/**
                                                                                                        + * The class which represents the config for the application.
                                                                                                        + */
                                                                                                        +@DatabaseEntity("Config")
                                                                                                        +export class Config<T = any> extends Entity {
                                                                                                        +  /**
                                                                                                        +   * The ID for the UI and data-model config
                                                                                                        +   */
                                                                                                        +  static readonly CONFIG_KEY = "CONFIG_ENTITY";
                                                                                                        +
                                                                                                        +  /**
                                                                                                        +   * The ID for the permission configuration
                                                                                                        +   */
                                                                                                        +  static readonly PERMISSION_KEY = "Permissions";
                                                                                                        +
                                                                                                        +  /**
                                                                                                        +   * This field contains all the configuration and does not have a predefined type.
                                                                                                        +   */
                                                                                                        +  @DatabaseField() data: T;
                                                                                                        +
                                                                                                        +  constructor(id = Config.CONFIG_KEY, configuration?: T) {
                                                                                                        +    super(id);
                                                                                                        +    this.data = configuration;
                                                                                                        +  }
                                                                                                        +
                                                                                                        +  override copy(): this {
                                                                                                        +    const newConfig = super.copy();
                                                                                                        +    newConfig.data = JSON.parse(JSON.stringify(this.data));
                                                                                                        +    return newConfig;
                                                                                                        +  }
                                                                                                        +}
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + + + + + + + + + +
                                                                                                        +
                                                                                                        +

                                                                                                        results matching ""

                                                                                                        +
                                                                                                          +
                                                                                                          +
                                                                                                          +

                                                                                                          No results matching ""

                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ConfigurableEnum.html b/documentation/classes/ConfigurableEnum.html new file mode 100644 index 0000000000..767fb8e334 --- /dev/null +++ b/documentation/classes/ConfigurableEnum.html @@ -0,0 +1,529 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                          +
                                                                                                          + + +
                                                                                                          +
                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                          +
                                                                                                          +

                                                                                                          +

                                                                                                          File

                                                                                                          +

                                                                                                          +

                                                                                                          + src/app/core/basic-datatypes/configurable-enum/configurable-enum.ts +

                                                                                                          + + + + + + +
                                                                                                          +

                                                                                                          Index

                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          +
                                                                                                          Properties
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          Methods
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          +

                                                                                                          Constructor

                                                                                                          + + + + + + + + + + + + + +
                                                                                                          +constructor(id?: string, values: ConfigurableEnumValue[]) +
                                                                                                          + +
                                                                                                          +
                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          NameTypeOptional
                                                                                                          id + string + + Yes +
                                                                                                          values + ConfigurableEnumValue[] + + No +
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          + +

                                                                                                          + Properties +

                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + + + values + + +
                                                                                                          + Type : ConfigurableEnumValue[] + +
                                                                                                          + Default value : [] +
                                                                                                          + Decorators : +
                                                                                                          + + @DatabaseField()
                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          + +

                                                                                                          + Methods +

                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                          + + + addOption + + +
                                                                                                          +addOption(newOptionInput: ConfigurableEnumValue | string) +
                                                                                                          + +
                                                                                                          +

                                                                                                          Add a new valid option to the enum values, if it is not a duplicate or invalid. +Returns the newly added option upon success.

                                                                                                          +
                                                                                                          + +
                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                          NameTypeOptionalDescription
                                                                                                          newOptionInput + ConfigurableEnumValue | string + + No + +

                                                                                                          String or option object to be added

                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          + +
                                                                                                          +
                                                                                                          +
                                                                                                          + + + + + +
                                                                                                          + + +
                                                                                                          +
                                                                                                          import { Entity } from "../../entity/model/entity";
                                                                                                          +import { DatabaseEntity } from "../../entity/database-entity.decorator";
                                                                                                          +import { ConfigurableEnumValue } from "./configurable-enum.interface";
                                                                                                          +import { DatabaseField } from "../../entity/database-field.decorator";
                                                                                                          +import { Logging } from "../../logging/logging.service";
                                                                                                          +
                                                                                                          +@DatabaseEntity("ConfigurableEnum")
                                                                                                          +export class ConfigurableEnum extends Entity {
                                                                                                          +  @DatabaseField() values: ConfigurableEnumValue[] = [];
                                                                                                          +
                                                                                                          +  constructor(id?: string, values: ConfigurableEnumValue[] = []) {
                                                                                                          +    super(id);
                                                                                                          +    this.values = values;
                                                                                                          +  }
                                                                                                          +
                                                                                                          +  /**
                                                                                                          +   * Add a new valid option to the enum values, if it is not a duplicate or invalid.
                                                                                                          +   * Returns the newly added option upon success.
                                                                                                          +   * @param newOptionInput String or option object to be added
                                                                                                          +   */
                                                                                                          +  addOption(
                                                                                                          +    newOptionInput: ConfigurableEnumValue | string,
                                                                                                          +  ): ConfigurableEnumValue | undefined {
                                                                                                          +    const option: ConfigurableEnumValue =
                                                                                                          +      typeof newOptionInput === "string"
                                                                                                          +        ? this.convertStringToOption(newOptionInput)
                                                                                                          +        : newOptionInput;
                                                                                                          +
                                                                                                          +    if (!option || !(option?.id && option?.label)) {
                                                                                                          +      Logging.debug(
                                                                                                          +        "Trying to add invalid enum option",
                                                                                                          +        newOptionInput,
                                                                                                          +        option,
                                                                                                          +      );
                                                                                                          +      return;
                                                                                                          +    }
                                                                                                          +
                                                                                                          +    // check for duplicates
                                                                                                          +    if (this.values.some((v) => v.label === option.label)) {
                                                                                                          +      throw new DuplicateEnumOptionException(newOptionInput);
                                                                                                          +    }
                                                                                                          +    if (this.values.some((v) => v.id === option.id)) {
                                                                                                          +      option.id = option.id + "_";
                                                                                                          +    }
                                                                                                          +
                                                                                                          +    this.values.push(option);
                                                                                                          +    return option;
                                                                                                          +  }
                                                                                                          +
                                                                                                          +  private convertStringToOption(
                                                                                                          +    newOption: string,
                                                                                                          +  ): ConfigurableEnumValue | undefined {
                                                                                                          +    newOption = newOption.trim();
                                                                                                          +    if (newOption.length === 0) {
                                                                                                          +      return;
                                                                                                          +    }
                                                                                                          +
                                                                                                          +    return {
                                                                                                          +      id: newOption.toUpperCase(),
                                                                                                          +      label: newOption,
                                                                                                          +    };
                                                                                                          +  }
                                                                                                          +}
                                                                                                          +
                                                                                                          +/**
                                                                                                          + * Error thrown when trying to add an option that already exists in the enum values.
                                                                                                          + */
                                                                                                          +export class DuplicateEnumOptionException extends Error {
                                                                                                          +  constructor(newOptionInput) {
                                                                                                          +    super("Enum Option already exists");
                                                                                                          +
                                                                                                          +    this["newOptionInput"] = newOptionInput;
                                                                                                          +  }
                                                                                                          +}
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + + + + + + + + + +
                                                                                                          +
                                                                                                          +

                                                                                                          results matching ""

                                                                                                          +
                                                                                                            +
                                                                                                            +
                                                                                                            +

                                                                                                            No results matching ""

                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ConfigurableEnumFilter.html b/documentation/classes/ConfigurableEnumFilter.html new file mode 100644 index 0000000000..9ef0122162 --- /dev/null +++ b/documentation/classes/ConfigurableEnumFilter.html @@ -0,0 +1,897 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                            +
                                                                                                            + + +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + +
                                                                                                            +
                                                                                                            +

                                                                                                            +

                                                                                                            File

                                                                                                            +

                                                                                                            +

                                                                                                            + src/app/core/filter/filters/configurableEnumFilter.ts +

                                                                                                            + + + +

                                                                                                            +

                                                                                                            Extends

                                                                                                            +

                                                                                                            +

                                                                                                            + SelectableFilter +

                                                                                                            + + + +
                                                                                                            +

                                                                                                            Index

                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            +
                                                                                                            Properties
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            Methods
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            +

                                                                                                            Constructor

                                                                                                            + + + + + + + + + + + + + +
                                                                                                            +constructor(name: string, label: string, enumValues: ConfigurableEnumValue[]) +
                                                                                                            + +
                                                                                                            +
                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            NameTypeOptional
                                                                                                            name + string + + No +
                                                                                                            label + string + + No +
                                                                                                            enumValues + ConfigurableEnumValue[] + + No +
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            + +
                                                                                                            + +

                                                                                                            + Properties +

                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + Public + + label + + +
                                                                                                            + Type : string + +
                                                                                                            + Default value : name +
                                                                                                            +
                                                                                                            Inherited from Filter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in Filter:100 +
                                                                                                            +
                                                                                                            +
                                                                                                            The user-friendly label describing this filter-selection +(optional, defaults to the name of the selection)
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + Public + + name + + +
                                                                                                            + Type : string + +
                                                                                                            +
                                                                                                            Inherited from Filter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in Filter:98 +
                                                                                                            +
                                                                                                            +
                                                                                                            The name or id describing this filter
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + Public + options + + +
                                                                                                            + Type : FilterSelectionOption<T>[] + +
                                                                                                            +
                                                                                                            Inherited from SelectableFilter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in SelectableFilter:99 +
                                                                                                            +
                                                                                                            +
                                                                                                            An array of different filtering variants to chose between
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + component + + +
                                                                                                            + Type : Type<any> + +
                                                                                                            + Default value : ListFilterComponent +
                                                                                                            +
                                                                                                            Inherited from Filter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in Filter:35 +
                                                                                                            +
                                                                                                            +

                                                                                                            The component used to display filter option to the user.

                                                                                                            +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + selectedOptionChange + + +
                                                                                                            + Default value : new EventEmitter<string[]>() +
                                                                                                            +
                                                                                                            Inherited from Filter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in Filter:45 +
                                                                                                            +
                                                                                                            +

                                                                                                            Triggered when this filter changes value +(e.g. when the user selects a new value in a FilterComponent).

                                                                                                            +

                                                                                                            This is part of the filter object because dynamic filter components can't expose @Outputs

                                                                                                            +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + Public + selectedOptionValues + + +
                                                                                                            + Type : string[] + +
                                                                                                            + Default value : [] +
                                                                                                            +
                                                                                                            Inherited from Filter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in Filter:37 +
                                                                                                            +
                                                                                                            +
                                                                                                            + +
                                                                                                            + +

                                                                                                            + Methods +

                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + Static + generateOptions + + +
                                                                                                            + + generateOptions(valuesToMatchAsOptions: (string | number)[], attributeName: string) +
                                                                                                            +
                                                                                                            Inherited from SelectableFilter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in SelectableFilter:77 +
                                                                                                            +
                                                                                                            + Type parameters : +
                                                                                                              +
                                                                                                            • T
                                                                                                            • +
                                                                                                            +
                                                                                                            +

                                                                                                            Generate filter options dynamically from the given value to be matched.

                                                                                                            +

                                                                                                            This is a utility function to make it easier to generate FilterSelectionOptions for standard cases +if you simply want each option to filter items having the given attribute matching different values. +If you have more sophisticated filtering needs, use the constructor to set FilterSelectionOptions that +you created yourself.

                                                                                                            +Example :
                                                                                                               A separate FilterSelectionOption is created for each value with a filter
                                                                                                            +   that is true of a data item's property exactly matches that value.
                                                                                                            + +
                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            NameTypeOptionalDescription
                                                                                                            valuesToMatchAsOptions + (string | number)[] + + No + +

                                                                                                            An array of values to be matched. +A separate FilterSelectionOption is created for each value with a filter +that is true of a data item's property exactly matches that value.

                                                                                                            + +
                                                                                                            attributeName + string + + No + +

                                                                                                            The name of the property of a data item that is compared to the value in the filter function.

                                                                                                            + +
                                                                                                            +
                                                                                                            +
                                                                                                            + Returns : FilterSelectionOption[] + +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + Public + getFilter + + +
                                                                                                            + + getFilter() +
                                                                                                            +
                                                                                                            Inherited from Filter +
                                                                                                            +
                                                                                                            +
                                                                                                            Defined in Filter:120 +
                                                                                                            +
                                                                                                            +

                                                                                                            Get the filter query for the given option. +If the given key is undefined or invalid, the returned filter matches any elements.

                                                                                                            +
                                                                                                            + +
                                                                                                            + Returns : DataFilter<T> + +
                                                                                                            +
                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            + + + getOption + + +
                                                                                                            +getOption(key: string) +
                                                                                                            +
                                                                                                            Inherited from SelectableFilter +
                                                                                                            +
                                                                                                            + +
                                                                                                            +

                                                                                                            Get the full filter option by its key.

                                                                                                            +
                                                                                                            + +
                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                            NameTypeOptionalDescription
                                                                                                            key + string + + No + +

                                                                                                            The identifier of the requested option

                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            + +
                                                                                                            +
                                                                                                            +
                                                                                                            + + + + + +
                                                                                                            + + +
                                                                                                            +
                                                                                                            import { Entity } from "../../entity/model/entity";
                                                                                                            +import { ConfigurableEnumValue } from "../../basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                            +import { DataFilter, FilterSelectionOption, SelectableFilter } from "./filters";
                                                                                                            +
                                                                                                            +export class ConfigurableEnumFilter<
                                                                                                            +  T extends Entity,
                                                                                                            +> extends SelectableFilter<T> {
                                                                                                            +  constructor(
                                                                                                            +    name: string,
                                                                                                            +    label: string,
                                                                                                            +    enumValues: ConfigurableEnumValue[],
                                                                                                            +  ) {
                                                                                                            +    const options: FilterSelectionOption<T>[] = enumValues.map(
                                                                                                            +      (enumValue: ConfigurableEnumValue) => ({
                                                                                                            +        key: enumValue.id,
                                                                                                            +        label: enumValue.label,
                                                                                                            +        color: enumValue.color,
                                                                                                            +        filter: { [name + ".id"]: enumValue.id } as DataFilter<T>,
                                                                                                            +      }),
                                                                                                            +    );
                                                                                                            +    super(name, options, label);
                                                                                                            +  }
                                                                                                            +}
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            + + + + + + + + + +
                                                                                                            +
                                                                                                            +

                                                                                                            results matching ""

                                                                                                            +
                                                                                                              +
                                                                                                              +
                                                                                                              +

                                                                                                              No results matching ""

                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/CustomFaker.html b/documentation/classes/CustomFaker.html new file mode 100644 index 0000000000..91a95f97ba --- /dev/null +++ b/documentation/classes/CustomFaker.html @@ -0,0 +1,601 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                              +
                                                                                                              + + +
                                                                                                              +
                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                              +
                                                                                                              +

                                                                                                              +

                                                                                                              File

                                                                                                              +

                                                                                                              +

                                                                                                              + src/app/core/demo-data/faker.ts +

                                                                                                              + + +

                                                                                                              +

                                                                                                              Description

                                                                                                              +

                                                                                                              +

                                                                                                              +

                                                                                                              Extension of faker.js implementing additional data generation methods.

                                                                                                              + +

                                                                                                              + + + + +
                                                                                                              +

                                                                                                              Index

                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                              +
                                                                                                              Methods
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + +
                                                                                                              +

                                                                                                              Constructor

                                                                                                              + + + + + + + + + + + + + +
                                                                                                              +constructor(baseFaker: Faker.FakerStatic) +
                                                                                                              + +
                                                                                                              +

                                                                                                              Merge the created CustomFaker's implementation with a given faker's standard methods.

                                                                                                              +
                                                                                                              +
                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                                              NameTypeOptionalDescription
                                                                                                              baseFaker + Faker.FakerStatic + + No + +

                                                                                                              A standard faker.js

                                                                                                              + +
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              + + +
                                                                                                              + +

                                                                                                              + Methods +

                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + + Public + dateOfBirth + + +
                                                                                                              + + dateOfBirth(minAge: number, maxAge: number) +
                                                                                                              + +
                                                                                                              +

                                                                                                              Generate a date that works as a date of birth in the given age range.

                                                                                                              +
                                                                                                              + +
                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                              NameTypeOptionalDescription
                                                                                                              minAge + number + + No + +

                                                                                                              The minimum age (today) of a person with the generated random birthdate.

                                                                                                              + +
                                                                                                              maxAge + number + + No + +

                                                                                                              The maximum age (today) of a person with the generated random birthdate.

                                                                                                              + +
                                                                                                              +
                                                                                                              +
                                                                                                              + Returns : Date + +
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + + geoAddress + + +
                                                                                                              +geoAddress() +
                                                                                                              + +
                                                                                                              + +
                                                                                                              + Returns : GeoResult + +
                                                                                                              +
                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                              + + + getEarlierDateOrToday + + +
                                                                                                              +getEarlierDateOrToday(date: Date) +
                                                                                                              + +
                                                                                                              +

                                                                                                              Return the given date if it is defined and earlier than today's date +otherwise return a Date representing today.

                                                                                                              +
                                                                                                              + +
                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                              NameTypeOptionalDescription
                                                                                                              date + Date + + No + +

                                                                                                              The date to be compared

                                                                                                              + +
                                                                                                              +
                                                                                                              +
                                                                                                              + Returns : Date + +
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              +
                                                                                                              + + + + + +
                                                                                                              + + +
                                                                                                              +
                                                                                                              import { fakerEN_IN as originalFaker } from "@faker-js/faker";
                                                                                                              +import { GeoResult } from "../../features/location/geo.service";
                                                                                                              +/**
                                                                                                              + * Extension of faker.js implementing additional data generation methods.
                                                                                                              + */
                                                                                                              +class CustomFaker {
                                                                                                              +  /**
                                                                                                              +   * Merge the created CustomFaker's implementation with a given faker's standard methods.
                                                                                                              +   * @param baseFaker A standard faker.js
                                                                                                              +   */
                                                                                                              +  constructor(
                                                                                                              +    // @ts-ignore
                                                                                                              +    private baseFaker: Faker.FakerStatic,
                                                                                                              +  ) {
                                                                                                              +    // make baseFaker methods available from instances of this class
                                                                                                              +    Object.assign(this, baseFaker);
                                                                                                              +  }
                                                                                                              +
                                                                                                              +  /**
                                                                                                              +   * Generate a date that works as a date of birth in the given age range.
                                                                                                              +   * @param minAge The minimum age (today) of a person with the generated random birthdate.
                                                                                                              +   * @param maxAge The maximum age (today) of a person with the generated random birthdate.
                                                                                                              +   */
                                                                                                              +  public dateOfBirth(minAge: number, maxAge: number): Date {
                                                                                                              +    const currentYear = new Date().getFullYear();
                                                                                                              +    const latest = new Date();
                                                                                                              +    latest.setFullYear(currentYear - minAge);
                                                                                                              +    const earliest = new Date();
                                                                                                              +    earliest.setFullYear(currentYear - maxAge);
                                                                                                              +    return this.baseFaker.date.between({ from: earliest, to: latest });
                                                                                                              +  }
                                                                                                              +
                                                                                                              +  /**
                                                                                                              +   * Return the given date if it is defined and earlier than today's date
                                                                                                              +   * otherwise return a Date representing today.
                                                                                                              +   * @param date The date to be compared
                                                                                                              +   */
                                                                                                              +  getEarlierDateOrToday(date: Date): Date {
                                                                                                              +    const today = new Date();
                                                                                                              +
                                                                                                              +    if (!date || date > today) {
                                                                                                              +      return today;
                                                                                                              +    } else {
                                                                                                              +      return date;
                                                                                                              +    }
                                                                                                              +  }
                                                                                                              +
                                                                                                              +  geoAddress(): GeoResult {
                                                                                                              +    const coordinates = faker.location.nearbyGPSCoordinate({
                                                                                                              +      origin: [52.4790412, 13.4319106],
                                                                                                              +    });
                                                                                                              +    return {
                                                                                                              +      lat: Number.parseFloat(coordinates[0].toString()),
                                                                                                              +      lon: Number.parseFloat(coordinates[1].toString()),
                                                                                                              +      display_name: faker.location.streetAddress(true),
                                                                                                              +    } as GeoResult;
                                                                                                              +  }
                                                                                                              +}
                                                                                                              +
                                                                                                              +/**
                                                                                                              + * Typing for faker including extended functionality.
                                                                                                              + */
                                                                                                              +export type Faker = typeof originalFaker & CustomFaker;
                                                                                                              +
                                                                                                              +originalFaker.seed(1);
                                                                                                              +
                                                                                                              +/**
                                                                                                              + * (Extended) faker module
                                                                                                              + */
                                                                                                              +export const faker = new CustomFaker(originalFaker) as Faker;
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              + + + + + + + + + +
                                                                                                              +
                                                                                                              +

                                                                                                              results matching ""

                                                                                                              +
                                                                                                                +
                                                                                                                +
                                                                                                                +

                                                                                                                No results matching ""

                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DashboardWidget.html b/documentation/classes/DashboardWidget.html new file mode 100644 index 0000000000..effedbd347 --- /dev/null +++ b/documentation/classes/DashboardWidget.html @@ -0,0 +1,356 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                +
                                                                                                                + + +
                                                                                                                +
                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                +
                                                                                                                +

                                                                                                                +

                                                                                                                File

                                                                                                                +

                                                                                                                +

                                                                                                                + src/app/core/dashboard/dashboard-widget/dashboard-widget.ts +

                                                                                                                + + +

                                                                                                                +

                                                                                                                Description

                                                                                                                +

                                                                                                                +

                                                                                                                +

                                                                                                                Abstract class for dashboard widgets

                                                                                                                + +

                                                                                                                + + + + +
                                                                                                                +

                                                                                                                Index

                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                +
                                                                                                                Methods
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + + + +
                                                                                                                + +

                                                                                                                + Methods +

                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                + + + Static + getRequiredEntities + + +
                                                                                                                + + getRequiredEntities(config: any) +
                                                                                                                + +
                                                                                                                +

                                                                                                                Implement this if the dashboard depends on the user having access to a certain entity. +If an array of strings is returned, the dashboard is shown if the user has access to at least one of them.

                                                                                                                +
                                                                                                                + +
                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                NameTypeOptionalDescription
                                                                                                                config + any + + No + +

                                                                                                                same of the normal config that will later be passed to the inputs

                                                                                                                + +
                                                                                                                +
                                                                                                                +
                                                                                                                + Returns : string | [] + +
                                                                                                                +
                                                                                                                +

                                                                                                                ENTITY_TYPE which a user needs to have

                                                                                                                + +
                                                                                                                +
                                                                                                                +
                                                                                                                + + + + + +
                                                                                                                + + +
                                                                                                                +
                                                                                                                export abstract class DashboardWidget {
                                                                                                                +  /**
                                                                                                                +   * Implement this if the dashboard depends on the user having access to a certain entity.
                                                                                                                +   * If an array of strings is returned, the dashboard is shown if the user has access to at least one of them.
                                                                                                                +   *
                                                                                                                +   * @param config same of the normal config that will later be passed to the inputs
                                                                                                                +   * @return ENTITY_TYPE which a user needs to have
                                                                                                                +   */
                                                                                                                +  static getRequiredEntities(config: any): string | string[] {
                                                                                                                +    return;
                                                                                                                +  }
                                                                                                                +}
                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                + + + + + + + + + +
                                                                                                                +
                                                                                                                +

                                                                                                                results matching ""

                                                                                                                +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  No results matching ""

                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Database.html b/documentation/classes/Database.html new file mode 100644 index 0000000000..df58a61486 --- /dev/null +++ b/documentation/classes/Database.html @@ -0,0 +1,1255 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                  +
                                                                                                                  + + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  +

                                                                                                                  File

                                                                                                                  +

                                                                                                                  +

                                                                                                                  + src/app/core/database/database.ts +

                                                                                                                  + + +

                                                                                                                  +

                                                                                                                  Description

                                                                                                                  +

                                                                                                                  +

                                                                                                                  +

                                                                                                                  An implementation of this abstract class provides functions for direct database access. +This interface is an extension of the PouchDB API.

                                                                                                                  + +

                                                                                                                  + + + + +
                                                                                                                  +

                                                                                                                  Index

                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                  +
                                                                                                                  Methods
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + +
                                                                                                                  + +

                                                                                                                  + Methods +

                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + allDocs + + +
                                                                                                                  + + allDocs(options?: GetAllOptions) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Load all documents (matching the given PouchDB options) from the database.

                                                                                                                  +

                                                                                                                  Normally you should rather use "getAll()" or another well typed method of this class +instead of passing PouchDB specific options here +because that will make your code tightly coupled with PouchDB rather than any other database provider.

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDescription
                                                                                                                  options + GetAllOptions + + Yes + +

                                                                                                                  PouchDB options object as in the normal PouchDB library

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<any> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + changes + + +
                                                                                                                  + + changes(prefix: string) +
                                                                                                                  + +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptional
                                                                                                                  prefix + string + + No +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Observable<any> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + destroy + + +
                                                                                                                  + + destroy() +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Closes all open connections to the database base and destroys it (clearing all data)

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Returns : Promise<any> + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + get + + +
                                                                                                                  + + get(id: string, options?: GetOptions) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Load a single document by id from the database.

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDescription
                                                                                                                  id + string + + No + +

                                                                                                                  The primary key of the document to be loaded

                                                                                                                  + +
                                                                                                                  options + GetOptions + + Yes + +

                                                                                                                  Optional options for the database engine (PouchDB)

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<any> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + getAll + + +
                                                                                                                  +getAll(prefix: string) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Load all documents (with the given prefix) from the database.

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDefault valueDescription
                                                                                                                  prefix + string + + No + + "" + +

                                                                                                                  The string prefix of document ids that should be retrieved

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<Array<any>> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + isEmpty + + +
                                                                                                                  + + isEmpty() +
                                                                                                                  + +
                                                                                                                  + +
                                                                                                                  + Returns : Promise<boolean> + +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  true if there are no documents in the database

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + put + + +
                                                                                                                  + + put(object: any, forceUpdate?: boolean) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Save a document to the database.

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDescription
                                                                                                                  object + any + + No + +

                                                                                                                  The document to be saved

                                                                                                                  + +
                                                                                                                  forceUpdate + boolean + + Yes + +

                                                                                                                  (Optional) Whether conflicts should be ignored and an existing conflicting document forcefully overwritten.

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<any> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + putAll + + +
                                                                                                                  + + putAll(objects: any[], forceUpdate?: boolean) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Save a bunch of documents at once to the database

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDescription
                                                                                                                  objects + any[] + + No + +

                                                                                                                  The documents to be saved

                                                                                                                  + +
                                                                                                                  forceUpdate + boolean + + Yes + +

                                                                                                                  (Optional) Whether conflicts should be ignored and existing conflicting documents forcefully overwritten.

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<any[]> + +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  array holding success responses or errors depending on the success of the operation

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + query + + +
                                                                                                                  + + query(fun: any, options?: QueryOptions) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Query data from the database based on a more complex, indexed request.

                                                                                                                  +

                                                                                                                  This is directly calling the PouchDB implementation of this function. +Also see the documentation there: https://pouchdb.com/api.html#query_database

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDescription
                                                                                                                  fun + any + + No + +

                                                                                                                  The name of a previously saved database index

                                                                                                                  + +
                                                                                                                  options + QueryOptions + + Yes + +

                                                                                                                  Additional options for the query, like a key. See the PouchDB docs for details.

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<any> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + remove + + +
                                                                                                                  + + remove(object: any) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Delete a document from the database

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDescription
                                                                                                                  object + any + + No + +

                                                                                                                  The document to be deleted (usually this object must at least contain the _id and _rev)

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<any> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                  + + + Abstract + saveDatabaseIndex + + +
                                                                                                                  + + saveDatabaseIndex(designDoc: any) +
                                                                                                                  + +
                                                                                                                  +

                                                                                                                  Create a database index to query() certain data more efficiently in the future.

                                                                                                                  +

                                                                                                                  Also see the PouchDB documentation regarding indices and queries: https://pouchdb.com/api.html#query_database

                                                                                                                  +
                                                                                                                  + +
                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                  NameTypeOptionalDescription
                                                                                                                  designDoc + any + + No + +

                                                                                                                  The PouchDB style design document for the map/reduce query

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + Returns : Promise<any> + +
                                                                                                                  +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + + + + + +
                                                                                                                  + + +
                                                                                                                  +
                                                                                                                  import { Observable } from "rxjs";
                                                                                                                  +
                                                                                                                  +/**
                                                                                                                  + * An implementation of this abstract class provides functions for direct database access.
                                                                                                                  + * This interface is an extension of the [PouchDB API](https://pouchdb.com/api.html).
                                                                                                                  + */
                                                                                                                  +export abstract class Database {
                                                                                                                  +  /**
                                                                                                                  +   * Load a single document by id from the database.
                                                                                                                  +   * @param id The primary key of the document to be loaded
                                                                                                                  +   * @param options Optional options for the database engine (PouchDB)
                                                                                                                  +   */
                                                                                                                  +  abstract get(id: string, options?: GetOptions): Promise<any>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Load all documents (matching the given PouchDB options) from the database.
                                                                                                                  +   *
                                                                                                                  +   * Normally you should rather use "getAll()" or another well typed method of this class
                                                                                                                  +   * instead of passing PouchDB specific options here
                                                                                                                  +   * because that will make your code tightly coupled with PouchDB rather than any other database provider.
                                                                                                                  +   *
                                                                                                                  +   * @param options PouchDB options object as in the normal PouchDB library
                                                                                                                  +   */
                                                                                                                  +  abstract allDocs(options?: GetAllOptions): Promise<any>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Save a document to the database.
                                                                                                                  +   * @param object The document to be saved
                                                                                                                  +   * @param forceUpdate (Optional) Whether conflicts should be ignored and an existing conflicting document forcefully overwritten.
                                                                                                                  +   */
                                                                                                                  +  abstract put(object: any, forceUpdate?: boolean): Promise<any>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Save a bunch of documents at once to the database
                                                                                                                  +   * @param objects The documents to be saved
                                                                                                                  +   * @param forceUpdate (Optional) Whether conflicts should be ignored and existing conflicting documents forcefully overwritten.
                                                                                                                  +   * @returns array holding success responses or errors depending on the success of the operation
                                                                                                                  +   */
                                                                                                                  +  abstract putAll(objects: any[], forceUpdate?: boolean): Promise<any[]>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Delete a document from the database
                                                                                                                  +   * @param object The document to be deleted (usually this object must at least contain the _id and _rev)
                                                                                                                  +   */
                                                                                                                  +  abstract remove(object: any): Promise<any>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Query data from the database based on a more complex, indexed request.
                                                                                                                  +   *
                                                                                                                  +   * This is directly calling the PouchDB implementation of this function.
                                                                                                                  +   * Also see the documentation there: {@link https://pouchdb.com/api.html#query_database}
                                                                                                                  +   *
                                                                                                                  +   * @param fun The name of a previously saved database index
                                                                                                                  +   * @param options Additional options for the query, like a `key`. See the PouchDB docs for details.
                                                                                                                  +   */
                                                                                                                  +  abstract query(fun: any, options?: QueryOptions): Promise<any>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Create a database index to `query()` certain data more efficiently in the future.
                                                                                                                  +   *
                                                                                                                  +   * Also see the PouchDB documentation regarding indices and queries: {@link https://pouchdb.com/api.html#query_database}
                                                                                                                  +   *
                                                                                                                  +   * @param designDoc The PouchDB style design document for the map/reduce query
                                                                                                                  +   */
                                                                                                                  +  abstract saveDatabaseIndex(designDoc: any): Promise<any>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Load all documents (with the given prefix) from the database.
                                                                                                                  +   * @param prefix The string prefix of document ids that should be retrieved
                                                                                                                  +   */
                                                                                                                  +  getAll(prefix = ""): Promise<Array<any>> {
                                                                                                                  +    return this.allDocs({
                                                                                                                  +      include_docs: true,
                                                                                                                  +      startkey: prefix,
                                                                                                                  +      endkey: prefix + "\ufff0",
                                                                                                                  +    });
                                                                                                                  +  }
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * @returns true if there are no documents in the database
                                                                                                                  +   */
                                                                                                                  +  abstract isEmpty(): Promise<boolean>;
                                                                                                                  +
                                                                                                                  +  /**
                                                                                                                  +   * Closes all open connections to the database base and destroys it (clearing all data)
                                                                                                                  +   */
                                                                                                                  +  abstract destroy(): Promise<any>;
                                                                                                                  +
                                                                                                                  +  abstract changes(prefix: string): Observable<any>;
                                                                                                                  +}
                                                                                                                  +
                                                                                                                  +/**
                                                                                                                  + * Basic query options supported by {@link Database}.
                                                                                                                  + *
                                                                                                                  + * also see https://pouchdb.com/guides/queries.html
                                                                                                                  + */
                                                                                                                  +export type QueryOptions = PouchDB.Query.Options<any, any>;
                                                                                                                  +
                                                                                                                  +/**
                                                                                                                  + * Basic database read options supported by {@link Database}.
                                                                                                                  + *
                                                                                                                  + * also see https://pouchdb.com/api.html#fetch_document
                                                                                                                  + */
                                                                                                                  +export type GetAllOptions =
                                                                                                                  +  | PouchDB.Core.AllDocsWithKeyOptions
                                                                                                                  +  | PouchDB.Core.AllDocsWithKeysOptions
                                                                                                                  +  | PouchDB.Core.AllDocsWithinRangeOptions
                                                                                                                  +  | PouchDB.Core.AllDocsOptions;
                                                                                                                  +
                                                                                                                  +/**
                                                                                                                  + * Basic database read options supported by {@link Database}.
                                                                                                                  + *
                                                                                                                  + * also see https://pouchdb.com/api.html#fetch_document
                                                                                                                  + */
                                                                                                                  +export type GetOptions = PouchDB.Core.GetOptions;
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + + + + + + + + + +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  results matching ""

                                                                                                                  +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    No results matching ""

                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + +
                                                                                                                    +
                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DatabaseException.html b/documentation/classes/DatabaseException.html new file mode 100644 index 0000000000..601e4ffde7 --- /dev/null +++ b/documentation/classes/DatabaseException.html @@ -0,0 +1,768 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                    +
                                                                                                                    + + +
                                                                                                                    +
                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    +

                                                                                                                    File

                                                                                                                    +

                                                                                                                    +

                                                                                                                    + src/app/core/database/pouch-database.ts +

                                                                                                                    + + +

                                                                                                                    +

                                                                                                                    Description

                                                                                                                    +

                                                                                                                    +

                                                                                                                    +

                                                                                                                    This overwrites PouchDB's error class which only logs limited information

                                                                                                                    + +

                                                                                                                    + +

                                                                                                                    +

                                                                                                                    Extends

                                                                                                                    +

                                                                                                                    +

                                                                                                                    + Error +

                                                                                                                    + + + + +
                                                                                                                    +

                                                                                                                    Constructor

                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                    +constructor(error: PouchDB.Core.Error | literal type, entityId?: string) +
                                                                                                                    + +
                                                                                                                    +
                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                    NameTypeOptional
                                                                                                                    error + PouchDB.Core.Error | literal type + + No +
                                                                                                                    entityId + string + + Yes +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + + + + + + + + +
                                                                                                                    + + +
                                                                                                                    +
                                                                                                                    import { Database, GetAllOptions, GetOptions, QueryOptions } from "./database";
                                                                                                                    +import { Logging } from "../logging/logging.service";
                                                                                                                    +import PouchDB from "pouchdb-browser";
                                                                                                                    +import memory from "pouchdb-adapter-memory";
                                                                                                                    +import { PerformanceAnalysisLogging } from "../../utils/performance-analysis-logging";
                                                                                                                    +import { Injectable, Optional } from "@angular/core";
                                                                                                                    +import { firstValueFrom, Observable, Subject } from "rxjs";
                                                                                                                    +import { filter } from "rxjs/operators";
                                                                                                                    +import { HttpStatusCode } from "@angular/common/http";
                                                                                                                    +import { environment } from "../../../environments/environment";
                                                                                                                    +import { KeycloakAuthService } from "../session/auth/keycloak/keycloak-auth.service";
                                                                                                                    +
                                                                                                                    +/**
                                                                                                                    + * Wrapper for a PouchDB instance to decouple the code from
                                                                                                                    + * that external library.
                                                                                                                    + *
                                                                                                                    + * Additional convenience functions on top of the PouchDB API
                                                                                                                    + * should be implemented in the abstract {@link Database}.
                                                                                                                    + */
                                                                                                                    +@Injectable()
                                                                                                                    +export class PouchDatabase extends Database {
                                                                                                                    +  /**
                                                                                                                    +   * Small helper function which creates a database with in-memory PouchDB initialized
                                                                                                                    +   */
                                                                                                                    +  static create(): PouchDatabase {
                                                                                                                    +    return new PouchDatabase().initInMemoryDB();
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * The reference to the PouchDB instance
                                                                                                                    +   * @private
                                                                                                                    +   */
                                                                                                                    +  private pouchDB: PouchDB.Database;
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * A list of promises that resolve once all the (until now saved) indexes are created
                                                                                                                    +   * @private
                                                                                                                    +   */
                                                                                                                    +  private indexPromises: Promise<any>[] = [];
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * An observable that emits a value whenever the PouchDB receives a new change.
                                                                                                                    +   * This change can come from the current user or remotely from the (live) synchronization
                                                                                                                    +   * @private
                                                                                                                    +   */
                                                                                                                    +  private changesFeed: Subject<any>;
                                                                                                                    +
                                                                                                                    +  private databaseInitialized = new Subject<void>();
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Create a PouchDB database manager.
                                                                                                                    +   */
                                                                                                                    +  constructor(@Optional() private authService?: KeycloakAuthService) {
                                                                                                                    +    super();
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Initialize the PouchDB with the in-memory adapter.
                                                                                                                    +   * See {@link https://github.com/pouchdb/pouchdb/tree/master/packages/node_modules/pouchdb-adapter-memory}
                                                                                                                    +   * @param dbName the name for the database
                                                                                                                    +   */
                                                                                                                    +  initInMemoryDB(dbName = "in-memory-database"): PouchDatabase {
                                                                                                                    +    PouchDB.plugin(memory);
                                                                                                                    +    this.pouchDB = new PouchDB(dbName, { adapter: "memory" });
                                                                                                                    +    this.databaseInitialized.complete();
                                                                                                                    +    return this;
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Initialize the PouchDB with the IndexedDB/in-browser adapter (default).
                                                                                                                    +   * See {link https://github.com/pouchdb/pouchdb/tree/master/packages/node_modules/pouchdb-browser}
                                                                                                                    +   * @param dbName the name for the database under which the IndexedDB entries will be created
                                                                                                                    +   * @param options PouchDB options which are directly passed to the constructor
                                                                                                                    +   */
                                                                                                                    +  initIndexedDB(
                                                                                                                    +    dbName = "indexed-database",
                                                                                                                    +    options?: PouchDB.Configuration.DatabaseConfiguration,
                                                                                                                    +  ): PouchDatabase {
                                                                                                                    +    this.pouchDB = new PouchDB(dbName, options);
                                                                                                                    +    this.databaseInitialized.complete();
                                                                                                                    +    return this;
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Initializes the PouchDB with the http adapter to directly access a remote CouchDB without replication
                                                                                                                    +   * See {@link https://pouchdb.com/adapters.html#pouchdb_over_http}
                                                                                                                    +   * @param dbName (relative) path to the remote database
                                                                                                                    +   * @param fetch a overwrite for the default fetch handler
                                                                                                                    +   */
                                                                                                                    +  initRemoteDB(
                                                                                                                    +    dbName = `${environment.DB_PROXY_PREFIX}/${environment.DB_NAME}`,
                                                                                                                    +  ): PouchDatabase {
                                                                                                                    +    const options = {
                                                                                                                    +      adapter: "http",
                                                                                                                    +      skip_setup: true,
                                                                                                                    +      fetch: (url: string | Request, opts: RequestInit) =>
                                                                                                                    +        this.defaultFetch(url, opts),
                                                                                                                    +    };
                                                                                                                    +    this.pouchDB = new PouchDB(dbName, options);
                                                                                                                    +    this.databaseInitialized.complete();
                                                                                                                    +    return this;
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  private defaultFetch: Fetch = async (url: string | Request, opts: any) => {
                                                                                                                    +    if (typeof url !== "string") {
                                                                                                                    +      const err = new Error("PouchDatabase.fetch: url is not a string");
                                                                                                                    +      err["details"] = url;
                                                                                                                    +      throw err;
                                                                                                                    +    }
                                                                                                                    +
                                                                                                                    +    const remoteUrl =
                                                                                                                    +      environment.DB_PROXY_PREFIX + url.split(environment.DB_PROXY_PREFIX)[1];
                                                                                                                    +    this.authService.addAuthHeader(opts.headers);
                                                                                                                    +
                                                                                                                    +    let result: Response;
                                                                                                                    +    try {
                                                                                                                    +      result = await PouchDB.fetch(remoteUrl, opts);
                                                                                                                    +    } catch (err) {
                                                                                                                    +      Logging.debug("navigator.onLine", navigator.onLine);
                                                                                                                    +      Logging.warn("Failed to fetch from DB", err);
                                                                                                                    +    }
                                                                                                                    +
                                                                                                                    +    // retry login if request failed with unauthorized
                                                                                                                    +    if (!result || result.status === HttpStatusCode.Unauthorized) {
                                                                                                                    +      try {
                                                                                                                    +        await this.authService.login();
                                                                                                                    +        this.authService.addAuthHeader(opts.headers);
                                                                                                                    +        result = await PouchDB.fetch(remoteUrl, opts);
                                                                                                                    +      } catch (err) {
                                                                                                                    +        Logging.debug("navigator.onLine", navigator.onLine);
                                                                                                                    +        Logging.warn("Failed to fetch from DB", err);
                                                                                                                    +      }
                                                                                                                    +    }
                                                                                                                    +
                                                                                                                    +    if (!result || result.status >= 500) {
                                                                                                                    +      Logging.debug("Actual DB Fetch response", result);
                                                                                                                    +      Logging.debug("navigator.onLine", navigator.onLine);
                                                                                                                    +      throw new DatabaseException({
                                                                                                                    +        error: "Failed to fetch from DB",
                                                                                                                    +        actualResponse: JSON.stringify(result.headers),
                                                                                                                    +        actualResponseBody: await result?.text(),
                                                                                                                    +      });
                                                                                                                    +    }
                                                                                                                    +    return result;
                                                                                                                    +  };
                                                                                                                    +
                                                                                                                    +  async getPouchDBOnceReady(): Promise<PouchDB.Database> {
                                                                                                                    +    await firstValueFrom(this.databaseInitialized, {
                                                                                                                    +      defaultValue: this.pouchDB,
                                                                                                                    +    });
                                                                                                                    +    return this.pouchDB;
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Get the actual instance of the PouchDB
                                                                                                                    +   */
                                                                                                                    +  getPouchDB(): PouchDB.Database {
                                                                                                                    +    return this.pouchDB;
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Load a single document by id from the database.
                                                                                                                    +   * (see {@link Database})
                                                                                                                    +   * @param id The primary key of the document to be loaded
                                                                                                                    +   * @param options Optional PouchDB options for the request
                                                                                                                    +   * @param returnUndefined (Optional) return undefined instead of throwing error if doc is not found in database
                                                                                                                    +   */
                                                                                                                    +  async get(
                                                                                                                    +    id: string,
                                                                                                                    +    options: GetOptions = {},
                                                                                                                    +    returnUndefined?: boolean,
                                                                                                                    +  ): Promise<any> {
                                                                                                                    +    try {
                                                                                                                    +      return await (await this.getPouchDBOnceReady()).get(id, options);
                                                                                                                    +    } catch (err) {
                                                                                                                    +      if (err.status === 404) {
                                                                                                                    +        Logging.debug("Doc not found in database: " + id);
                                                                                                                    +        if (returnUndefined) {
                                                                                                                    +          return undefined;
                                                                                                                    +        }
                                                                                                                    +      }
                                                                                                                    +
                                                                                                                    +      throw new DatabaseException(err, id);
                                                                                                                    +    }
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Load all documents (matching the given PouchDB options) from the database.
                                                                                                                    +   * (see {@link Database})
                                                                                                                    +   *
                                                                                                                    +   * Normally you should rather use "getAll()" or another well typed method of this class
                                                                                                                    +   * instead of passing PouchDB specific options here
                                                                                                                    +   * because that will make your code tightly coupled with PouchDB rather than any other database provider.
                                                                                                                    +   *
                                                                                                                    +   * @param options PouchDB options object as in the normal PouchDB library
                                                                                                                    +   */
                                                                                                                    +  async allDocs(options?: GetAllOptions) {
                                                                                                                    +    try {
                                                                                                                    +      const result = await (await this.getPouchDBOnceReady()).allDocs(options);
                                                                                                                    +      return result.rows.map((row) => row.doc);
                                                                                                                    +    } catch (err) {
                                                                                                                    +      throw new DatabaseException(
                                                                                                                    +        err,
                                                                                                                    +        "allDocs; startkey: " + options?.["startkey"],
                                                                                                                    +      );
                                                                                                                    +    }
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Save a document to the database.
                                                                                                                    +   * (see {@link Database})
                                                                                                                    +   *
                                                                                                                    +   * @param object The document to be saved
                                                                                                                    +   * @param forceOverwrite (Optional) Whether conflicts should be ignored and an existing conflicting document forcefully overwritten.
                                                                                                                    +   */
                                                                                                                    +  async put(object: any, forceOverwrite = false): Promise<any> {
                                                                                                                    +    if (forceOverwrite) {
                                                                                                                    +      object._rev = undefined;
                                                                                                                    +    }
                                                                                                                    +
                                                                                                                    +    try {
                                                                                                                    +      return await (await this.getPouchDBOnceReady()).put(object);
                                                                                                                    +    } catch (err) {
                                                                                                                    +      if (err.status === 409) {
                                                                                                                    +        return this.resolveConflict(object, forceOverwrite, err);
                                                                                                                    +      } else {
                                                                                                                    +        throw new DatabaseException(err, object._id);
                                                                                                                    +      }
                                                                                                                    +    }
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Save an array of documents to the database
                                                                                                                    +   * @param objects the documents to be saved
                                                                                                                    +   * @param forceOverwrite whether conflicting versions should be overwritten
                                                                                                                    +   * @returns array with the result for each object to be saved, if any item fails to be saved, this returns a rejected Promise.
                                                                                                                    +   *          The save can partially fail and return a mix of success and error states in the array (e.g. `[{ ok: true, ... }, { error: true, ... }]`)
                                                                                                                    +   */
                                                                                                                    +  async putAll(objects: any[], forceOverwrite = false): Promise<any> {
                                                                                                                    +    if (forceOverwrite) {
                                                                                                                    +      objects.forEach((obj) => (obj._rev = undefined));
                                                                                                                    +    }
                                                                                                                    +
                                                                                                                    +    const pouchDB = await this.getPouchDBOnceReady();
                                                                                                                    +    const results = await pouchDB.bulkDocs(objects);
                                                                                                                    +
                                                                                                                    +    for (let i = 0; i < results.length; i++) {
                                                                                                                    +      // Check if document update conflicts happened in the request
                                                                                                                    +      const result = results[i] as PouchDB.Core.Error;
                                                                                                                    +      if (result.status === 409) {
                                                                                                                    +        results[i] = await this.resolveConflict(
                                                                                                                    +          objects.find((obj) => obj._id === result.id),
                                                                                                                    +          forceOverwrite,
                                                                                                                    +          result,
                                                                                                                    +        ).catch((e) => {
                                                                                                                    +          Logging.warn(
                                                                                                                    +            "error during putAll",
                                                                                                                    +            e,
                                                                                                                    +            objects.map((x) => x._id),
                                                                                                                    +          );
                                                                                                                    +          return new DatabaseException(e);
                                                                                                                    +        });
                                                                                                                    +      }
                                                                                                                    +    }
                                                                                                                    +
                                                                                                                    +    if (results.some((r) => r instanceof Error)) {
                                                                                                                    +      return Promise.reject(results);
                                                                                                                    +    }
                                                                                                                    +    return results;
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Delete a document from the database
                                                                                                                    +   * (see {@link Database})
                                                                                                                    +   *
                                                                                                                    +   * @param object The document to be deleted (usually this object must at least contain the _id and _rev)
                                                                                                                    +   */
                                                                                                                    +  remove(object: any) {
                                                                                                                    +    return this.getPouchDBOnceReady()
                                                                                                                    +      .then((pouchDB) => pouchDB.remove(object))
                                                                                                                    +      .catch((err) => {
                                                                                                                    +        throw new DatabaseException(err, object["_id"]);
                                                                                                                    +      });
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Check if a database is new/empty.
                                                                                                                    +   * Returns true if there are no documents in the database
                                                                                                                    +   */
                                                                                                                    +  isEmpty(): Promise<boolean> {
                                                                                                                    +    return this.getPouchDBOnceReady()
                                                                                                                    +      .then((pouchDB) => pouchDB.info())
                                                                                                                    +      .then((res) => res.doc_count === 0);
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Listen to changes to documents which have an _id with the given prefix
                                                                                                                    +   * @param prefix for which document changes are emitted
                                                                                                                    +   * @returns observable which emits the filtered changes
                                                                                                                    +   */
                                                                                                                    +  changes(prefix: string): Observable<any> {
                                                                                                                    +    if (!this.changesFeed) {
                                                                                                                    +      this.changesFeed = new Subject();
                                                                                                                    +      this.subscribeChanges();
                                                                                                                    +    }
                                                                                                                    +    return this.changesFeed.pipe(filter((doc) => doc._id.startsWith(prefix)));
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  private async subscribeChanges() {
                                                                                                                    +    (await this.getPouchDBOnceReady())
                                                                                                                    +      .changes({
                                                                                                                    +        live: true,
                                                                                                                    +        since: "now",
                                                                                                                    +        include_docs: true,
                                                                                                                    +      })
                                                                                                                    +      .addListener("change", (change) => this.changesFeed.next(change.doc))
                                                                                                                    +      .catch((err) => {
                                                                                                                    +        if (
                                                                                                                    +          err.statusCode === HttpStatusCode.Unauthorized ||
                                                                                                                    +          err.statusCode === HttpStatusCode.GatewayTimeout
                                                                                                                    +        ) {
                                                                                                                    +          Logging.warn(err);
                                                                                                                    +        } else {
                                                                                                                    +          Logging.error(err);
                                                                                                                    +        }
                                                                                                                    +
                                                                                                                    +        // retry
                                                                                                                    +        setTimeout(() => this.subscribeChanges(), 10000);
                                                                                                                    +      });
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Destroy the database and all saved data
                                                                                                                    +   */
                                                                                                                    +  async destroy(): Promise<any> {
                                                                                                                    +    await Promise.all(this.indexPromises);
                                                                                                                    +    if (this.pouchDB) {
                                                                                                                    +      return this.pouchDB.destroy();
                                                                                                                    +    }
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Reset the database state so a new one can be opened.
                                                                                                                    +   */
                                                                                                                    +  reset() {
                                                                                                                    +    this.pouchDB = undefined;
                                                                                                                    +    this.changesFeed = undefined;
                                                                                                                    +    this.databaseInitialized = new Subject();
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Query data from the database based on a more complex, indexed request.
                                                                                                                    +   * (see {@link Database})
                                                                                                                    +   *
                                                                                                                    +   * This is directly calling the PouchDB implementation of this function.
                                                                                                                    +   * Also see the documentation there: {@link https://pouchdb.com/api.html#query_database}
                                                                                                                    +   *
                                                                                                                    +   * @param fun The name of a previously saved database index
                                                                                                                    +   * @param options Additional options for the query, like a `key`. See the PouchDB docs for details.
                                                                                                                    +   */
                                                                                                                    +  query(
                                                                                                                    +    fun: string | ((doc: any, emit: any) => void),
                                                                                                                    +    options: QueryOptions,
                                                                                                                    +  ): Promise<any> {
                                                                                                                    +    return this.getPouchDBOnceReady()
                                                                                                                    +      .then((pouchDB) => pouchDB.query(fun, options))
                                                                                                                    +      .catch((err) => {
                                                                                                                    +        throw new DatabaseException(
                                                                                                                    +          err,
                                                                                                                    +          typeof fun === "string" ? fun : undefined,
                                                                                                                    +        );
                                                                                                                    +      });
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Create a database index to `query()` certain data more efficiently in the future.
                                                                                                                    +   * (see {@link Database})
                                                                                                                    +   *
                                                                                                                    +   * Also see the PouchDB documentation regarding indices and queries: {@link https://pouchdb.com/api.html#query_database}
                                                                                                                    +   *
                                                                                                                    +   * @param designDoc The PouchDB style design document for the map/reduce query
                                                                                                                    +   */
                                                                                                                    +  saveDatabaseIndex(designDoc: any): Promise<void> {
                                                                                                                    +    const creationPromise = this.createOrUpdateDesignDoc(designDoc);
                                                                                                                    +    this.indexPromises.push(creationPromise);
                                                                                                                    +    return creationPromise;
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  private async createOrUpdateDesignDoc(designDoc): Promise<void> {
                                                                                                                    +    const existingDesignDoc = await this.get(designDoc._id, {}, true);
                                                                                                                    +    if (!existingDesignDoc) {
                                                                                                                    +      Logging.debug("creating new database index");
                                                                                                                    +    } else if (
                                                                                                                    +      JSON.stringify(existingDesignDoc.views) !==
                                                                                                                    +      JSON.stringify(designDoc.views)
                                                                                                                    +    ) {
                                                                                                                    +      Logging.debug("replacing existing database index");
                                                                                                                    +      designDoc._rev = existingDesignDoc._rev;
                                                                                                                    +    } else {
                                                                                                                    +      // already up to date, nothing more to do
                                                                                                                    +      return;
                                                                                                                    +    }
                                                                                                                    +
                                                                                                                    +    await this.put(designDoc, true);
                                                                                                                    +    await this.prebuildViewsOfDesignDoc(designDoc);
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  @PerformanceAnalysisLogging
                                                                                                                    +  private async prebuildViewsOfDesignDoc(designDoc: any): Promise<void> {
                                                                                                                    +    for (const viewName of Object.keys(designDoc.views)) {
                                                                                                                    +      const queryName = designDoc._id.replace(/_design\//, "") + "/" + viewName;
                                                                                                                    +      await this.query(queryName, { key: "1" });
                                                                                                                    +    }
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  /**
                                                                                                                    +   * Attempt to intelligently resolve conflicting document versions automatically.
                                                                                                                    +   * @param newObject
                                                                                                                    +   * @param overwriteChanges
                                                                                                                    +   * @param existingError
                                                                                                                    +   */
                                                                                                                    +  private async resolveConflict(
                                                                                                                    +    newObject: any,
                                                                                                                    +    overwriteChanges = false,
                                                                                                                    +    existingError: any = {},
                                                                                                                    +  ): Promise<any> {
                                                                                                                    +    const existingObject = await this.get(newObject._id);
                                                                                                                    +    const resolvedObject = this.mergeObjects(existingObject, newObject);
                                                                                                                    +    if (resolvedObject) {
                                                                                                                    +      Logging.debug(
                                                                                                                    +        "resolved document conflict automatically (" + resolvedObject._id + ")",
                                                                                                                    +      );
                                                                                                                    +      return this.put(resolvedObject);
                                                                                                                    +    } else if (overwriteChanges) {
                                                                                                                    +      Logging.debug(
                                                                                                                    +        "overwriting conflicting document version (" + newObject._id + ")",
                                                                                                                    +      );
                                                                                                                    +      newObject._rev = existingObject._rev;
                                                                                                                    +      return this.put(newObject);
                                                                                                                    +    } else {
                                                                                                                    +      existingError.message = `${
                                                                                                                    +        existingError.message
                                                                                                                    +      } (unable to resolve) ID: ${JSON.stringify(newObject)}`;
                                                                                                                    +      throw new DatabaseException(existingError);
                                                                                                                    +    }
                                                                                                                    +  }
                                                                                                                    +
                                                                                                                    +  private mergeObjects(_existingObject: any, _newObject: any) {
                                                                                                                    +    // TODO: implement automatic merging of conflicting entity versions
                                                                                                                    +    return undefined;
                                                                                                                    +  }
                                                                                                                    +}
                                                                                                                    +
                                                                                                                    +/**
                                                                                                                    + * This overwrites PouchDB's error class which only logs limited information
                                                                                                                    + */
                                                                                                                    +class DatabaseException extends Error {
                                                                                                                    +  constructor(
                                                                                                                    +    error: PouchDB.Core.Error | { [key: string]: any },
                                                                                                                    +    entityId?: string,
                                                                                                                    +  ) {
                                                                                                                    +    super();
                                                                                                                    +
                                                                                                                    +    if (entityId) {
                                                                                                                    +      error["entityId"] = entityId;
                                                                                                                    +    }
                                                                                                                    +    Object.assign(this, error);
                                                                                                                    +  }
                                                                                                                    +}
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + + + + + + + + + +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    results matching ""

                                                                                                                    +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      No results matching ""

                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DateFilter.html b/documentation/classes/DateFilter.html new file mode 100644 index 0000000000..365a1d0d77 --- /dev/null +++ b/documentation/classes/DateFilter.html @@ -0,0 +1,799 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                      +
                                                                                                                      + + +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      +

                                                                                                                      File

                                                                                                                      +

                                                                                                                      +

                                                                                                                      + src/app/core/filter/filters/dateFilter.ts +

                                                                                                                      + + +

                                                                                                                      +

                                                                                                                      Description

                                                                                                                      +

                                                                                                                      +

                                                                                                                      +

                                                                                                                      Represents a filter for date values. +The filter can either be one of the predefined options or two manually entered dates.

                                                                                                                      + +

                                                                                                                      + +

                                                                                                                      +

                                                                                                                      Extends

                                                                                                                      +

                                                                                                                      +

                                                                                                                      + Filter +

                                                                                                                      + + + +
                                                                                                                      +

                                                                                                                      Index

                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                      +
                                                                                                                      Properties
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      Methods
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      +

                                                                                                                      Constructor

                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                      +constructor(name: string, label: string, rangeOptions: DateRangeFilterConfigOption[]) +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                      NameTypeOptional
                                                                                                                      name + string + + No +
                                                                                                                      label + string + + No +
                                                                                                                      rangeOptions + DateRangeFilterConfigOption[] + + No +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      + +

                                                                                                                      + Properties +

                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + + component + + +
                                                                                                                      + Default value : DateRangeFilterComponent +
                                                                                                                      +
                                                                                                                      Inherited from Filter +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      Defined in Filter:15 +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + Public + + label + + +
                                                                                                                      + Type : string + +
                                                                                                                      + Default value : name +
                                                                                                                      +
                                                                                                                      Inherited from Filter +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      Defined in Filter:19 +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + Public + + name + + +
                                                                                                                      + Type : string + +
                                                                                                                      +
                                                                                                                      Inherited from Filter +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      Defined in Filter:18 +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                      + + + Public + rangeOptions + + +
                                                                                                                      + Type : DateRangeFilterConfigOption[] + +
                                                                                                                      + +
                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + selectedOptionChange + + +
                                                                                                                      + Default value : new EventEmitter<string[]>() +
                                                                                                                      +
                                                                                                                      Inherited from Filter +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      Defined in Filter:45 +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      Triggered when this filter changes value +(e.g. when the user selects a new value in a FilterComponent).

                                                                                                                      +

                                                                                                                      This is part of the filter object because dynamic filter components can't expose @Outputs

                                                                                                                      +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + Public + selectedOptionValues + + +
                                                                                                                      + Type : string[] + +
                                                                                                                      + Default value : [] +
                                                                                                                      +
                                                                                                                      Inherited from Filter +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      Defined in Filter:37 +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      + +

                                                                                                                      + Methods +

                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + getDateRange + + +
                                                                                                                      +getDateRange() +
                                                                                                                      + +
                                                                                                                      +

                                                                                                                      Returns the date range according to the selected option or dates

                                                                                                                      +
                                                                                                                      + +
                                                                                                                      + Returns : DateRange<Date> + +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + getFilter + + +
                                                                                                                      +getFilter() +
                                                                                                                      +
                                                                                                                      Inherited from Filter +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      Defined in Filter:41 +
                                                                                                                      +
                                                                                                                      + +
                                                                                                                      + Returns : DataFilter<T> + +
                                                                                                                      +
                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                      + + + getSelectedOption + + +
                                                                                                                      +getSelectedOption() +
                                                                                                                      + +
                                                                                                                      + +
                                                                                                                      + Returns : any + +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + + + + + +
                                                                                                                      + + +
                                                                                                                      +
                                                                                                                      import { Entity } from "../../entity/model/entity";
                                                                                                                      +import { DateRangeFilterConfigOption } from "../../entity-list/EntityListConfig";
                                                                                                                      +import { DateRange } from "@angular/material/datepicker";
                                                                                                                      +import { calculateDateRange } from "../../basic-datatypes/date/date-range-filter/date-range-filter-panel/date-range-filter-panel.component";
                                                                                                                      +import moment from "moment";
                                                                                                                      +import { DataFilter, Filter } from "./filters";
                                                                                                                      +import { isValidDate } from "../../../utils/utils";
                                                                                                                      +import { DateRangeFilterComponent } from "../../basic-datatypes/date/date-range-filter/date-range-filter.component";
                                                                                                                      +
                                                                                                                      +/**
                                                                                                                      + * Represents a filter for date values.
                                                                                                                      + * The filter can either be one of the predefined options or two manually entered dates.
                                                                                                                      + */
                                                                                                                      +export class DateFilter<T extends Entity> extends Filter<T> {
                                                                                                                      +  override component = DateRangeFilterComponent;
                                                                                                                      +
                                                                                                                      +  constructor(
                                                                                                                      +    public override name: string,
                                                                                                                      +    public override label: string = name,
                                                                                                                      +    public rangeOptions: DateRangeFilterConfigOption[],
                                                                                                                      +  ) {
                                                                                                                      +    super(name, label);
                                                                                                                      +    this.selectedOptionValues = [];
                                                                                                                      +  }
                                                                                                                      +
                                                                                                                      +  /**
                                                                                                                      +   * Returns the date range according to the selected option or dates
                                                                                                                      +   */
                                                                                                                      +  getDateRange(): DateRange<Date> {
                                                                                                                      +    const selectedOption = this.getSelectedOption();
                                                                                                                      +    if (selectedOption) {
                                                                                                                      +      return calculateDateRange(selectedOption);
                                                                                                                      +    }
                                                                                                                      +    const dates = this.selectedOptionValues;
                                                                                                                      +    if (dates?.length == 2) {
                                                                                                                      +      return this.getDateRangeFromDateStrings(dates[0], dates[1]);
                                                                                                                      +    }
                                                                                                                      +    return new DateRange(undefined, undefined);
                                                                                                                      +  }
                                                                                                                      +
                                                                                                                      +  getFilter(): DataFilter<T> {
                                                                                                                      +    const range = this.getDateRange();
                                                                                                                      +    const filterObject: { $gte?: string; $lte?: string } = {};
                                                                                                                      +    if (range.start) {
                                                                                                                      +      filterObject.$gte = moment(range.start).format("YYYY-MM-DD");
                                                                                                                      +    }
                                                                                                                      +    if (range.end) {
                                                                                                                      +      filterObject.$lte = moment(range.end).format("YYYY-MM-DD");
                                                                                                                      +    }
                                                                                                                      +    if (filterObject.$gte || filterObject.$lte) {
                                                                                                                      +      return {
                                                                                                                      +        [this.name]: filterObject,
                                                                                                                      +      } as DataFilter<T>;
                                                                                                                      +    }
                                                                                                                      +    return {} as DataFilter<T>;
                                                                                                                      +  }
                                                                                                                      +
                                                                                                                      +  getSelectedOption() {
                                                                                                                      +    return this.rangeOptions[this.selectedOptionValues as any];
                                                                                                                      +  }
                                                                                                                      +
                                                                                                                      +  private getDateRangeFromDateStrings(
                                                                                                                      +    dateStr1: string,
                                                                                                                      +    dateStr2: string,
                                                                                                                      +  ): DateRange<Date> {
                                                                                                                      +    const date1 = moment(dateStr1).toDate();
                                                                                                                      +    const date2 = moment(dateStr2).toDate();
                                                                                                                      +
                                                                                                                      +    return new DateRange(
                                                                                                                      +      isValidDate(date1) ? date1 : undefined,
                                                                                                                      +      isValidDate(date2) ? date2 : undefined,
                                                                                                                      +    );
                                                                                                                      +  }
                                                                                                                      +}
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + + + + + + + + + +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      results matching ""

                                                                                                                      +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +

                                                                                                                        No results matching ""

                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DateWithAge.html b/documentation/classes/DateWithAge.html new file mode 100644 index 0000000000..2457445b4e --- /dev/null +++ b/documentation/classes/DateWithAge.html @@ -0,0 +1,360 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                        +
                                                                                                                        + + +
                                                                                                                        +
                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                        +
                                                                                                                        +

                                                                                                                        +

                                                                                                                        File

                                                                                                                        +

                                                                                                                        +

                                                                                                                        + src/app/core/basic-datatypes/date-with-age/dateWithAge.ts +

                                                                                                                        + + +

                                                                                                                        +

                                                                                                                        Description

                                                                                                                        +

                                                                                                                        +

                                                                                                                        +

                                                                                                                        Subclass of Date which provides the getter age. +This age is calculated based on the date that this object represents.

                                                                                                                        + +

                                                                                                                        + +

                                                                                                                        +

                                                                                                                        Extends

                                                                                                                        +

                                                                                                                        +

                                                                                                                        + Date +

                                                                                                                        + + + +
                                                                                                                        +

                                                                                                                        Index

                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                        +
                                                                                                                        Properties
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        Accessors
                                                                                                                        +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + + +
                                                                                                                        + +

                                                                                                                        + Properties +

                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                        + + + Static + DATA_TYPE + + +
                                                                                                                        + Type : string + +
                                                                                                                        + Default value : "date-with-age" +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + + + + + + + +
                                                                                                                        +

                                                                                                                        + Accessors +

                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                        + + age +
                                                                                                                        + getage() +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + + +
                                                                                                                        +
                                                                                                                        import { calculateAge } from "../../../utils/utils";
                                                                                                                        +
                                                                                                                        +/**
                                                                                                                        + * Subclass of Date which provides the getter `age`.
                                                                                                                        + * This age is calculated based on the date that this object represents.
                                                                                                                        + */
                                                                                                                        +export class DateWithAge extends Date {
                                                                                                                        +  static DATA_TYPE = "date-with-age";
                                                                                                                        +
                                                                                                                        +  get age() {
                                                                                                                        +    return calculateAge(this);
                                                                                                                        +  }
                                                                                                                        +}
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + + + + + + + + + +
                                                                                                                        +
                                                                                                                        +

                                                                                                                        results matching ""

                                                                                                                        +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +

                                                                                                                          No results matching ""

                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DefaultDatatype.html b/documentation/classes/DefaultDatatype.html new file mode 100644 index 0000000000..823e43f932 --- /dev/null +++ b/documentation/classes/DefaultDatatype.html @@ -0,0 +1,1194 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                          +
                                                                                                                          + + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                          +
                                                                                                                          +

                                                                                                                          +

                                                                                                                          File

                                                                                                                          +

                                                                                                                          +

                                                                                                                          + src/app/core/entity/default-datatype/default.datatype.ts +

                                                                                                                          + + +

                                                                                                                          +

                                                                                                                          Description

                                                                                                                          +

                                                                                                                          +

                                                                                                                          +

                                                                                                                          Extend this class to define new data types (i.e. for properties of entities) +and provide your implementation using Angular DI: +{ provide: DefaultDatatype, useClass: MyCustomDatatype, multi: true },

                                                                                                                          +

                                                                                                                          This class is also used as the default fallback Datatype for the EntitySchemaService that keeps values unchanged between database and entity instance. +This type is automatically used whenever no fitting Datatype can be found for that config or TypeScript type.

                                                                                                                          + +

                                                                                                                          + + + + +
                                                                                                                          +

                                                                                                                          Index

                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          +
                                                                                                                          Properties
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          Methods
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          Accessors
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + +
                                                                                                                          + +

                                                                                                                          + Properties +

                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + Static + dataType + + +
                                                                                                                          + Type : string + +
                                                                                                                          + Default value : "" +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          Key for this datatype that must be specified in the DatabaseField annotation to use this transformation.

                                                                                                                          +

                                                                                                                          for example @DatabaseField({dataType: 'foo'}) myField will trigger the datatype implementation with name "foo".

                                                                                                                          +

                                                                                                                          If you set the name to a TypeScript type, class properties with this type will automatically use +that EntitySchemaDatatype without the need to explicitly state the dataType config in the annotation +(e.g. @DatabaseField() myField: string is triggering the EntitySchemaDatatype with name "string".

                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + editComponent + + +
                                                                                                                          + Type : string + +
                                                                                                                          + Default value : "EditText" +
                                                                                                                          + +
                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + Optional + importConfigComponent + + +
                                                                                                                          + Type : string + +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + Static + label + + +
                                                                                                                          + Type : string + +
                                                                                                                          + Default value : $localize`:datatype-label:any` +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          The human-readable name for this dataType, used in config UIs.

                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + viewComponent + + +
                                                                                                                          + Type : string + +
                                                                                                                          + Default value : "DisplayText" +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          The default component how this datatype should be displayed in lists and forms.

                                                                                                                          +

                                                                                                                          The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          + +

                                                                                                                          + Methods +

                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + Async + anonymize + + +
                                                                                                                          + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                          +
                                                                                                                          + +
                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          NameTypeOptionalDescription
                                                                                                                          value + EntityType + + No + +

                                                                                                                          The original value to be anonymized

                                                                                                                          + +
                                                                                                                          schemaField + EntitySchemaField + + No + +
                                                                                                                          parent + any + + No + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + Returns : Promise<any> + +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                          +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                          +
                                                                                                                          + +
                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                          NameTypeOptional
                                                                                                                          col + ColumnMapping + + No +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + Returns : string + +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + Async + importMapFunction + + +
                                                                                                                          + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          The function used to map values from the import data to values in the entities to be created.

                                                                                                                          +
                                                                                                                          + +
                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          NameTypeOptionalDescription
                                                                                                                          val + any + + No + +

                                                                                                                          The value from an imported cell to be mapped

                                                                                                                          + +
                                                                                                                          schemaField + EntitySchemaField + + No + +

                                                                                                                          The schema field definition for the target property into which the value is mapped

                                                                                                                          + +
                                                                                                                          additional + any + + Yes + +

                                                                                                                          config as returned by the configComponent

                                                                                                                          + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + Returns : Promise<EntityType | []> + +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + transformToDatabaseFormat + + +
                                                                                                                          +transformToDatabaseFormat(value: EntityType, schemaField?: EntitySchemaField, parent?: Entity) +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          Transformation function taking a value in the format that is used in entity instances and returning the value +in the format used in database objects.

                                                                                                                          +Example :
                                                                                                                               This can be set as a parameter to the `@DatabaseField()` annotation in Entity classes.
                                                                                                                          + +
                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          NameTypeOptionalDescription
                                                                                                                          value + EntityType + + No + +

                                                                                                                          The value (in Entity format) to be transformed

                                                                                                                          + +
                                                                                                                          schemaField + EntitySchemaField + + Yes + +

                                                                                                                          The EntitySchemaField configuration providing details of how the value should be transformed. +This can be set as a parameter to the @DatabaseField() annotation in Entity classes.

                                                                                                                          + +
                                                                                                                          parent + Entity + + Yes + +

                                                                                                                          The full entity instance this value is part of (e.g. to allow cross-related transformations)

                                                                                                                          + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + Returns : DBType + +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                          + + + transformToObjectFormat + + +
                                                                                                                          +transformToObjectFormat(value: DBType, schemaField?: EntitySchemaField, parent?: any) +
                                                                                                                          + +
                                                                                                                          +

                                                                                                                          Transformation function taking a value in the format that is used in database objects and returning the value +in the format used in entity instances.

                                                                                                                          +Example :
                                                                                                                               This can be set as a parameter to the `@DatabaseField()` annotation in Entity classes.
                                                                                                                          + +
                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                          NameTypeOptionalDescription
                                                                                                                          value + DBType + + No + +

                                                                                                                          The value (in database format) to be transformed

                                                                                                                          + +
                                                                                                                          schemaField + EntitySchemaField + + Yes + +

                                                                                                                          The EntitySchemaField configuration providing details of how the value should be transformed. +This can be set as a parameter to the @DatabaseField() annotation in Entity classes.

                                                                                                                          + +
                                                                                                                          parent + any + + Yes + +

                                                                                                                          The full entity instance this value is part of (e.g. to allow cross-related transformations)

                                                                                                                          + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + Returns : EntityType + +
                                                                                                                          +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + + + + +
                                                                                                                          +

                                                                                                                          + Accessors +

                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                          + + dataType +
                                                                                                                          + getdataType() +
                                                                                                                          + +
                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                          + + label +
                                                                                                                          + getlabel() +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + +
                                                                                                                          +
                                                                                                                          import { EntitySchemaField } from "../schema/entity-schema-field";
                                                                                                                          +import { Entity } from "../model/entity";
                                                                                                                          +import { ColumnMapping } from "../../import/column-mapping";
                                                                                                                          +import { asArray } from "../../../utils/utils";
                                                                                                                          +
                                                                                                                          +/**
                                                                                                                          + * Extend this class to define new data types (i.e. for properties of entities)
                                                                                                                          + * and provide your implementation using Angular DI:
                                                                                                                          + * `{ provide: DefaultDatatype, useClass: MyCustomDatatype, multi: true },`
                                                                                                                          + *
                                                                                                                          + * This class is also used as the default fallback Datatype for the EntitySchemaService that keeps values unchanged between database and entity instance.
                                                                                                                          + * This type is automatically used whenever no fitting Datatype can be found for that config or TypeScript type.
                                                                                                                          + */
                                                                                                                          +export class DefaultDatatype<EntityType = any, DBType = any> {
                                                                                                                          +  /**
                                                                                                                          +   * Key for this datatype that must be specified in the DatabaseField annotation to use this transformation.
                                                                                                                          +   *
                                                                                                                          +   * for example `@DatabaseField({dataType: 'foo'}) myField` will trigger the datatype implementation with `name` "foo".
                                                                                                                          +   *
                                                                                                                          +   * If you set the name to a TypeScript type, class properties with this type will automatically use
                                                                                                                          +   * that EntitySchemaDatatype without the need to explicitly state the dataType config in the annotation
                                                                                                                          +   * (e.g. `@DatabaseField() myField: string` is triggering the EntitySchemaDatatype with `name` "string".
                                                                                                                          +   */
                                                                                                                          +  static dataType: string = "";
                                                                                                                          +  get dataType(): string {
                                                                                                                          +    return (this.constructor as typeof DefaultDatatype).dataType;
                                                                                                                          +  }
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * The human-readable name for this dataType, used in config UIs.
                                                                                                                          +   */
                                                                                                                          +  static label: string = $localize`:datatype-label:any`;
                                                                                                                          +  get label(): string {
                                                                                                                          +    return (this.constructor as typeof DefaultDatatype).label;
                                                                                                                          +  }
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * The default component how this datatype should be displayed in lists and forms.
                                                                                                                          +   *
                                                                                                                          +   * The edit component has to be a registered component. Components that are registered contain the `DynamicComponent`
                                                                                                                          +   * decorator
                                                                                                                          +   */
                                                                                                                          +  viewComponent = "DisplayText";
                                                                                                                          +  editComponent = "EditText";
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * Transformation function taking a value in the format that is used in entity instances and returning the value
                                                                                                                          +   * in the format used in database objects.
                                                                                                                          +   *
                                                                                                                          +   * @param value The value (in Entity format) to be transformed
                                                                                                                          +   * @param schemaField The EntitySchemaField configuration providing details of how the value should be transformed.
                                                                                                                          +   *          This can be set as a parameter to the `@DatabaseField()` annotation in Entity classes.
                                                                                                                          +   * @param parent The full entity instance this value is part of (e.g. to allow cross-related transformations)
                                                                                                                          +   */
                                                                                                                          +  transformToDatabaseFormat(
                                                                                                                          +    value: EntityType,
                                                                                                                          +    schemaField?: EntitySchemaField,
                                                                                                                          +    parent?: Entity,
                                                                                                                          +  ): DBType {
                                                                                                                          +    return value as any;
                                                                                                                          +  }
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * Transformation function taking a value in the format that is used in database objects and returning the value
                                                                                                                          +   * in the format used in entity instances.
                                                                                                                          +   *
                                                                                                                          +   * @param value The value (in database format) to be transformed
                                                                                                                          +   * @param schemaField The EntitySchemaField configuration providing details of how the value should be transformed.
                                                                                                                          +   *          This can be set as a parameter to the `@DatabaseField()` annotation in Entity classes.
                                                                                                                          +   * @param parent The full entity instance this value is part of (e.g. to allow cross-related transformations)
                                                                                                                          +   */
                                                                                                                          +  transformToObjectFormat(
                                                                                                                          +    value: DBType,
                                                                                                                          +    schemaField?: EntitySchemaField,
                                                                                                                          +    parent?: any,
                                                                                                                          +  ): EntityType {
                                                                                                                          +    return value as any;
                                                                                                                          +  }
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * The function used to map values from the import data to values in the entities to be created.
                                                                                                                          +   * @param val The value from an imported cell to be mapped
                                                                                                                          +   * @param schemaField The schema field definition for the target property into which the value is mapped
                                                                                                                          +   * @param additional config as returned by the configComponent
                                                                                                                          +   */
                                                                                                                          +  async importMapFunction(
                                                                                                                          +    val: any,
                                                                                                                          +    schemaField: EntitySchemaField,
                                                                                                                          +    additional?: any,
                                                                                                                          +  ): Promise<EntityType | EntityType[]> {
                                                                                                                          +    if (schemaField.isArray) {
                                                                                                                          +      return asArray(val).map((v) =>
                                                                                                                          +        this.transformToObjectFormat(v, schemaField),
                                                                                                                          +      );
                                                                                                                          +    } else {
                                                                                                                          +      return this.transformToObjectFormat(val, schemaField);
                                                                                                                          +    }
                                                                                                                          +  }
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * A component to be display as a dialog to configure the transformation function
                                                                                                                          +   * (e.g. defining a format or mapping)
                                                                                                                          +   */
                                                                                                                          +  importConfigComponent?: string;
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * Output a label indicating whether the given column mapping needs user configuration for the "additional" config
                                                                                                                          +   * or has a valid, complete "additional" config.
                                                                                                                          +   * returns "undefined" if no user action is required.
                                                                                                                          +   * @param col
                                                                                                                          +   */
                                                                                                                          +  importIncompleteAdditionalConfigBadge(col: ColumnMapping): string {
                                                                                                                          +    return undefined;
                                                                                                                          +  }
                                                                                                                          +
                                                                                                                          +  /**
                                                                                                                          +   * (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.
                                                                                                                          +   * @param value The original value to be anonymized
                                                                                                                          +   */
                                                                                                                          +  async anonymize(
                                                                                                                          +    value: EntityType,
                                                                                                                          +    schemaField: EntitySchemaField,
                                                                                                                          +    parent: any,
                                                                                                                          +  ): Promise<any> {
                                                                                                                          +    return undefined;
                                                                                                                          +  }
                                                                                                                          +}
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + + + + + + + + +
                                                                                                                          +
                                                                                                                          +

                                                                                                                          results matching ""

                                                                                                                          +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +

                                                                                                                            No results matching ""

                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DefaultValueStrategy.html b/documentation/classes/DefaultValueStrategy.html new file mode 100644 index 0000000000..254b02e370 --- /dev/null +++ b/documentation/classes/DefaultValueStrategy.html @@ -0,0 +1,586 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                            +
                                                                                                                            + + +
                                                                                                                            +
                                                                                                                            + + + + + + + + + + + + + + + + +
                                                                                                                            +
                                                                                                                            +

                                                                                                                            +

                                                                                                                            File

                                                                                                                            +

                                                                                                                            +

                                                                                                                            + src/app/core/default-values/default-value-strategy.interface.ts +

                                                                                                                            + + +

                                                                                                                            +

                                                                                                                            Description

                                                                                                                            +

                                                                                                                            +

                                                                                                                            +

                                                                                                                            A special strategy to define and set default values, which can be used by the DefaultValueService, +e.g. dynamic placeholders or inherited values.

                                                                                                                            + +

                                                                                                                            + + + + +
                                                                                                                            +

                                                                                                                            Index

                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                            +
                                                                                                                            Methods
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + + + +
                                                                                                                            + +

                                                                                                                            + Methods +

                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                            + + + Async + initEntityForm + + +
                                                                                                                            + + initEntityForm(form: EntityForm<T>) +
                                                                                                                            + +
                                                                                                                            + Type parameters : +
                                                                                                                              +
                                                                                                                            • T
                                                                                                                            • +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                            NameTypeOptional
                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + Returns : Promise<void> + +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                            + + + Async + onFormValueChanges + + +
                                                                                                                            + + onFormValueChanges(form: EntityForm<T>) +
                                                                                                                            + +
                                                                                                                            + Type parameters : +
                                                                                                                              +
                                                                                                                            • T
                                                                                                                            • +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                            NameTypeOptional
                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + Returns : Promise<void> + +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                            + + + Abstract + setDefaultValue + + +
                                                                                                                            + + setDefaultValue(targetFormControl: AbstractControl, fieldConfig: EntitySchemaField, form: EntityForm<any>) +
                                                                                                                            + +
                                                                                                                            +

                                                                                                                            Calculate and set the default value for a form control, according to the custom strategy.

                                                                                                                            +
                                                                                                                            + +
                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                            NameTypeOptionalDescription
                                                                                                                            targetFormControl + AbstractControl<any | any> + + No + +

                                                                                                                            The form control to set the default value for.

                                                                                                                            + +
                                                                                                                            fieldConfig + EntitySchemaField + + No + +

                                                                                                                            The field configuration of this entity field.

                                                                                                                            + +
                                                                                                                            form + EntityForm<any> + + No + +

                                                                                                                            The overall entity form, including all related fields to support complex, interrelated value calculations.

                                                                                                                            + +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + Returns : void + +
                                                                                                                            +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + + + + + +
                                                                                                                            + + +
                                                                                                                            +
                                                                                                                            import { AbstractControl } from "@angular/forms";
                                                                                                                            +import { EntitySchemaField } from "../entity/schema/entity-schema-field";
                                                                                                                            +import { EntityForm } from "../common-components/entity-form/entity-form.service";
                                                                                                                            +import { DefaultValueConfig } from "../entity/schema/default-value-config";
                                                                                                                            +import { Entity } from "../entity/model/entity";
                                                                                                                            +
                                                                                                                            +/**
                                                                                                                            + * A special strategy to define and set default values, which can be used by the DefaultValueService,
                                                                                                                            + * e.g. dynamic placeholders or inherited values.
                                                                                                                            + */
                                                                                                                            +export abstract class DefaultValueStrategy {
                                                                                                                            +  /**
                                                                                                                            +   * Calculate and set the default value for a form control, according to the custom strategy.
                                                                                                                            +   * @param targetFormControl The form control to set the default value for.
                                                                                                                            +   * @param fieldConfig The field configuration of this entity field.
                                                                                                                            +   * @param form The overall entity form, including all related fields to support complex, interrelated value calculations.
                                                                                                                            +   */
                                                                                                                            +  abstract setDefaultValue(
                                                                                                                            +    targetFormControl: AbstractControl<any, any>,
                                                                                                                            +    fieldConfig: EntitySchemaField,
                                                                                                                            +    form: EntityForm<any>,
                                                                                                                            +  ): void;
                                                                                                                            +
                                                                                                                            +  async onFormValueChanges<T extends Entity>(
                                                                                                                            +    form: EntityForm<T>,
                                                                                                                            +  ): Promise<void> {}
                                                                                                                            +
                                                                                                                            +  async initEntityForm<T extends Entity>(form: EntityForm<T>): Promise<void> {}
                                                                                                                            +}
                                                                                                                            +
                                                                                                                            +/**
                                                                                                                            + * Get the default value configs filtered for the given mode.
                                                                                                                            + * @param defaultValueConfigs
                                                                                                                            + * @param mode
                                                                                                                            + */
                                                                                                                            +export function getConfigsByMode(
                                                                                                                            +  defaultValueConfigs: Map<string, DefaultValueConfig>,
                                                                                                                            +  mode: ("inherited" | "static" | "dynamic")[],
                                                                                                                            +): Map<string, DefaultValueConfig> {
                                                                                                                            +  let configs: Map<string, DefaultValueConfig> = new Map();
                                                                                                                            +
                                                                                                                            +  for (const [key, defaultValueConfig] of defaultValueConfigs) {
                                                                                                                            +    if (mode.indexOf(defaultValueConfig.mode) !== -1) {
                                                                                                                            +      configs.set(key, defaultValueConfig);
                                                                                                                            +    }
                                                                                                                            +  }
                                                                                                                            +
                                                                                                                            +  return configs;
                                                                                                                            +}
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + + + + + + + + + +
                                                                                                                            +
                                                                                                                            +

                                                                                                                            results matching ""

                                                                                                                            +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +

                                                                                                                              No results matching ""

                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoChildConfig.html b/documentation/classes/DemoChildConfig.html new file mode 100644 index 0000000000..85be715acc --- /dev/null +++ b/documentation/classes/DemoChildConfig.html @@ -0,0 +1,368 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                              +
                                                                                                                              + + +
                                                                                                                              +
                                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                                              +
                                                                                                                              +

                                                                                                                              +

                                                                                                                              File

                                                                                                                              +

                                                                                                                              +

                                                                                                                              + src/app/child-dev-project/children/demo-data-generators/demo-child-generator.service.ts +

                                                                                                                              + + + + + + +
                                                                                                                              +

                                                                                                                              Index

                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                              +
                                                                                                                              Properties
                                                                                                                              +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              + + +
                                                                                                                              + +

                                                                                                                              + Properties +

                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                              + + + count + + +
                                                                                                                              + Type : number + +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              + + + + + + + +
                                                                                                                              + + +
                                                                                                                              +
                                                                                                                              import { Entity } from "../../../core/entity/model/entity";
                                                                                                                              +import { religions } from "./fixtures/religions";
                                                                                                                              +import { languages } from "./fixtures/languages";
                                                                                                                              +import { dropoutTypes } from "./fixtures/dropout-types";
                                                                                                                              +import { Injectable } from "@angular/core";
                                                                                                                              +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                              +import { faker } from "../../../core/demo-data/faker";
                                                                                                                              +import { centersWithProbability } from "./fixtures/centers";
                                                                                                                              +import { genders } from "../model/genders";
                                                                                                                              +import { calculateAge } from "../../../utils/utils";
                                                                                                                              +import { DateWithAge } from "../../../core/basic-datatypes/date-with-age/dateWithAge";
                                                                                                                              +import { createEntityOfType } from "../../../core/demo-data/create-entity-of-type";
                                                                                                                              +
                                                                                                                              +export class DemoChildConfig {
                                                                                                                              +  count: number;
                                                                                                                              +}
                                                                                                                              +
                                                                                                                              +@Injectable()
                                                                                                                              +export class DemoChildGenerator extends DemoDataGenerator<Entity> {
                                                                                                                              +  static count: number;
                                                                                                                              +
                                                                                                                              +  /**
                                                                                                                              +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                              +   *   `providers: [DemoUserProvider.provider({count: 150})]`
                                                                                                                              +   * @param config The configuration specifying the number of entities the service should generate.
                                                                                                                              +   */
                                                                                                                              +  static provider(config: DemoChildConfig) {
                                                                                                                              +    return [
                                                                                                                              +      { provide: DemoChildGenerator, useClass: DemoChildGenerator },
                                                                                                                              +      { provide: DemoChildConfig, useValue: config },
                                                                                                                              +    ];
                                                                                                                              +  }
                                                                                                                              +
                                                                                                                              +  static generateEntity(id: string) {
                                                                                                                              +    const child = createEntityOfType("Child", id);
                                                                                                                              +    child.name = faker.person.firstName() + " " + faker.person.lastName();
                                                                                                                              +    child.projectNumber = id;
                                                                                                                              +    child.religion = faker.helpers.arrayElement(religions);
                                                                                                                              +    child.gender = faker.helpers.arrayElement(genders.slice(1)).id;
                                                                                                                              +    child.dateOfBirth = new DateWithAge(faker.dateOfBirth(5, 20));
                                                                                                                              +    child.motherTongue = faker.helpers.arrayElement(languages);
                                                                                                                              +    child.center = faker.helpers.arrayElement(centersWithProbability).id;
                                                                                                                              +    child.phone =
                                                                                                                              +      "+" +
                                                                                                                              +      faker.number.int({ min: 10, max: 99 }) +
                                                                                                                              +      " " +
                                                                                                                              +      faker.number.int({ min: 10000000, max: 99999999 });
                                                                                                                              +
                                                                                                                              +    child.admissionDate = faker.date.past({
                                                                                                                              +      years: calculateAge(child.dateOfBirth) - 4,
                                                                                                                              +    });
                                                                                                                              +
                                                                                                                              +    child["address"] = faker.geoAddress();
                                                                                                                              +
                                                                                                                              +    if (faker.number.int(100) > 90) {
                                                                                                                              +      DemoChildGenerator.makeChildDropout(child);
                                                                                                                              +    }
                                                                                                                              +    return child;
                                                                                                                              +  }
                                                                                                                              +
                                                                                                                              +  private static makeChildDropout(child: Entity & { [key: string]: any }) {
                                                                                                                              +    child.dropoutDate = faker.date.between({
                                                                                                                              +      from: child.admissionDate,
                                                                                                                              +      to: new Date(),
                                                                                                                              +    });
                                                                                                                              +    child.dropoutRemarks = faker.lorem.sentence();
                                                                                                                              +    child.dropoutType = faker.helpers.arrayElement(dropoutTypes);
                                                                                                                              +    child.status = $localize`:Child status:Dropout`;
                                                                                                                              +    child.inactive = true;
                                                                                                                              +  }
                                                                                                                              +
                                                                                                                              +  constructor(public config: DemoChildConfig) {
                                                                                                                              +    super();
                                                                                                                              +  }
                                                                                                                              +
                                                                                                                              +  generateEntities(): Entity[] {
                                                                                                                              +    const data = [];
                                                                                                                              +    for (let i = 1; i <= this.config.count; i++) {
                                                                                                                              +      data.push(DemoChildGenerator.generateEntity(String(i)));
                                                                                                                              +    }
                                                                                                                              +    return data;
                                                                                                                              +  }
                                                                                                                              +}
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + + + + + + + + + +
                                                                                                                              +
                                                                                                                              +

                                                                                                                              results matching ""

                                                                                                                              +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +

                                                                                                                                No results matching ""

                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoDataGenerator.html b/documentation/classes/DemoDataGenerator.html new file mode 100644 index 0000000000..4009b47429 --- /dev/null +++ b/documentation/classes/DemoDataGenerator.html @@ -0,0 +1,491 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                +
                                                                                                                                + + +
                                                                                                                                +
                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                +
                                                                                                                                +

                                                                                                                                +

                                                                                                                                File

                                                                                                                                +

                                                                                                                                +

                                                                                                                                + src/app/core/demo-data/demo-data-generator.ts +

                                                                                                                                + + +

                                                                                                                                +

                                                                                                                                Description

                                                                                                                                +

                                                                                                                                +

                                                                                                                                +

                                                                                                                                Abstract base class for demo data generator backup.

                                                                                                                                +

                                                                                                                                For usage refer to the How-To Guides:

                                                                                                                                + + +

                                                                                                                                + + + + +
                                                                                                                                +

                                                                                                                                Index

                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                +
                                                                                                                                Properties
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                Methods
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                Accessors
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                + + +
                                                                                                                                + +

                                                                                                                                + Properties +

                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                + + + Protected + _entities + + +
                                                                                                                                + Type : T[] + +
                                                                                                                                + +
                                                                                                                                +

                                                                                                                                internally used array of the generated entities

                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + +
                                                                                                                                + +

                                                                                                                                + Methods +

                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                + + + Protected + Abstract + generateEntities + + +
                                                                                                                                + + generateEntities() +
                                                                                                                                + +
                                                                                                                                +

                                                                                                                                Generate new demo entities.

                                                                                                                                +
                                                                                                                                + +
                                                                                                                                + Returns : T[] + +
                                                                                                                                +
                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                + + + reset + + +
                                                                                                                                +reset() +
                                                                                                                                + +
                                                                                                                                +

                                                                                                                                Remove all previously generated entities.

                                                                                                                                +
                                                                                                                                + +
                                                                                                                                + Returns : void + +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + + + + + +
                                                                                                                                +

                                                                                                                                + Accessors +

                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                + + entities +
                                                                                                                                + getentities() +
                                                                                                                                + +
                                                                                                                                +

                                                                                                                                generated demo entities

                                                                                                                                +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + + +
                                                                                                                                +
                                                                                                                                import { Entity } from "../entity/model/entity";
                                                                                                                                +
                                                                                                                                +/**
                                                                                                                                + * Abstract base class for demo data generator backup.
                                                                                                                                + *
                                                                                                                                + * For usage refer to the How-To Guides:
                                                                                                                                + * - [How to Generate Demo Data]{@link /additional-documentation/how-to-guides/generate-demo-data.html}
                                                                                                                                + */
                                                                                                                                +export abstract class DemoDataGenerator<T extends Entity> {
                                                                                                                                +  /** internally used array of the generated entities */
                                                                                                                                +  protected _entities: T[];
                                                                                                                                +
                                                                                                                                +  /**
                                                                                                                                +   * generated demo entities
                                                                                                                                +   */
                                                                                                                                +  get entities() {
                                                                                                                                +    if (!this._entities) {
                                                                                                                                +      this._entities = this.generateEntities();
                                                                                                                                +    }
                                                                                                                                +    return this._entities;
                                                                                                                                +  }
                                                                                                                                +
                                                                                                                                +  /**
                                                                                                                                +   * Generate new demo entities.
                                                                                                                                +   */
                                                                                                                                +  protected abstract generateEntities(): T[];
                                                                                                                                +
                                                                                                                                +  /**
                                                                                                                                +   * Remove all previously generated entities.
                                                                                                                                +   */
                                                                                                                                +  reset() {
                                                                                                                                +    delete this._entities;
                                                                                                                                +  }
                                                                                                                                +}
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + + + + + + + + + +
                                                                                                                                +
                                                                                                                                +

                                                                                                                                results matching ""

                                                                                                                                +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  No results matching ""

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoDataServiceConfig.html b/documentation/classes/DemoDataServiceConfig.html new file mode 100644 index 0000000000..2f3bf50e57 --- /dev/null +++ b/documentation/classes/DemoDataServiceConfig.html @@ -0,0 +1,384 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  + + +
                                                                                                                                  +
                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  +

                                                                                                                                  File

                                                                                                                                  +

                                                                                                                                  +

                                                                                                                                  + src/app/core/demo-data/demo-data.service.ts +

                                                                                                                                  + + +

                                                                                                                                  +

                                                                                                                                  Description

                                                                                                                                  +

                                                                                                                                  +

                                                                                                                                  +

                                                                                                                                  General config object to pass all initially register DemoDataGenerators +with DemoDataModule.forRoot().

                                                                                                                                  +

                                                                                                                                  see docs at DemoDataModule

                                                                                                                                  + +

                                                                                                                                  + + + + +
                                                                                                                                  +

                                                                                                                                  Index

                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  Properties
                                                                                                                                  +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + + +
                                                                                                                                  + +

                                                                                                                                  + Properties +

                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                  + + + dataGeneratorProviders + + +
                                                                                                                                  + Type : (ValueProvider | ClassProvider | FactoryProvider)[] + +
                                                                                                                                  + Default value : [] +
                                                                                                                                  + +
                                                                                                                                  +

                                                                                                                                  Providers for DemoDataGenerator service implementations to be registered for data generation.

                                                                                                                                  +

                                                                                                                                  This may also include providers for services a DemoDataGenerator depends on.

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + + + + + + +
                                                                                                                                  + + +
                                                                                                                                  +
                                                                                                                                  import {
                                                                                                                                  +  ClassProvider,
                                                                                                                                  +  FactoryProvider,
                                                                                                                                  +  Injectable,
                                                                                                                                  +  Injector,
                                                                                                                                  +  ValueProvider,
                                                                                                                                  +} from "@angular/core";
                                                                                                                                  +import { DemoDataGenerator } from "./demo-data-generator";
                                                                                                                                  +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                  +import { Database } from "../database/database";
                                                                                                                                  +
                                                                                                                                  +/**
                                                                                                                                  + * General config object to pass all initially register DemoDataGenerators
                                                                                                                                  + * with `DemoDataModule.forRoot()`.
                                                                                                                                  + *
                                                                                                                                  + * see docs at {@link DemoDataModule}
                                                                                                                                  + */
                                                                                                                                  +export class DemoDataServiceConfig {
                                                                                                                                  +  /**
                                                                                                                                  +   * Providers for DemoDataGenerator service implementations to be registered for data generation.
                                                                                                                                  +   *
                                                                                                                                  +   * This may also include providers for services a DemoDataGenerator depends on.
                                                                                                                                  +   */
                                                                                                                                  +  dataGeneratorProviders: (ValueProvider | ClassProvider | FactoryProvider)[] =
                                                                                                                                  +    [];
                                                                                                                                  +}
                                                                                                                                  +
                                                                                                                                  +/**
                                                                                                                                  + * The DemoDataService is the manager for all provided DemoDataGenerator implementations.
                                                                                                                                  + * It serves as the central service to trigger the demo data generation into the database.
                                                                                                                                  + *
                                                                                                                                  + * To add more demo data generators, refer the documentation
                                                                                                                                  + * [How to Generate Demo Data]{@link /additional-documentation/how-to-guides/generate-demo-data.html}
                                                                                                                                  + */
                                                                                                                                  +@Injectable()
                                                                                                                                  +export class DemoDataService {
                                                                                                                                  +  /** All registered demo data generator services */
                                                                                                                                  +  readonly dataGenerators: DemoDataGenerator<any>[] = [];
                                                                                                                                  +
                                                                                                                                  +  constructor(
                                                                                                                                  +    private entityMapper: EntityMapperService,
                                                                                                                                  +    private injector: Injector,
                                                                                                                                  +    private config: DemoDataServiceConfig,
                                                                                                                                  +    private database: Database,
                                                                                                                                  +  ) {}
                                                                                                                                  +
                                                                                                                                  +  private registerAllProvidedDemoDataGenerators() {
                                                                                                                                  +    for (const provider of this.config.dataGeneratorProviders) {
                                                                                                                                  +      const service = this.injector.get<any>(provider.provide);
                                                                                                                                  +      if (service && service instanceof DemoDataGenerator) {
                                                                                                                                  +        this.dataGenerators.push(service);
                                                                                                                                  +      }
                                                                                                                                  +    }
                                                                                                                                  +  }
                                                                                                                                  +
                                                                                                                                  +  /**
                                                                                                                                  +   * Trigger all registered DemoDataGenerator implementations to generate demo entities
                                                                                                                                  +   * and add all the generated entities to the Database.
                                                                                                                                  +   */
                                                                                                                                  +  async publishDemoData() {
                                                                                                                                  +    if (!(await this.database.isEmpty())) {
                                                                                                                                  +      return;
                                                                                                                                  +    }
                                                                                                                                  +    this.registerAllProvidedDemoDataGenerators();
                                                                                                                                  +
                                                                                                                                  +    // completely generate all data (i.e. call every generator) before starting to save the data
                                                                                                                                  +    // to allow generators to delete unwanted entities of other generators before they are saved
                                                                                                                                  +    // (e.g. the DropoutChildGenerator should be able to delete Attendance records of the Child after its dropout date)
                                                                                                                                  +    this.dataGenerators.forEach((generator) => generator.entities);
                                                                                                                                  +
                                                                                                                                  +    // save the generated data
                                                                                                                                  +    for (const generator of this.dataGenerators) {
                                                                                                                                  +      await this.entityMapper.saveAll(generator.entities);
                                                                                                                                  +      // Wait for other async tasks in the queue e.g. ConfigService setting up config after it has been saved
                                                                                                                                  +      await new Promise((resolve) => setTimeout(resolve));
                                                                                                                                  +    }
                                                                                                                                  +  }
                                                                                                                                  +}
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + + + + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  results matching ""

                                                                                                                                  +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +

                                                                                                                                    No results matching ""

                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoEducationMaterialConfig.html b/documentation/classes/DemoEducationMaterialConfig.html new file mode 100644 index 0000000000..54c2980482 --- /dev/null +++ b/documentation/classes/DemoEducationMaterialConfig.html @@ -0,0 +1,393 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                    +
                                                                                                                                    + + +
                                                                                                                                    +
                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                    +
                                                                                                                                    +

                                                                                                                                    +

                                                                                                                                    File

                                                                                                                                    +

                                                                                                                                    +

                                                                                                                                    + src/app/child-dev-project/children/demo-data-generators/educational-material/demo-educational-material-generator.service.ts +

                                                                                                                                    + + + + + + +
                                                                                                                                    +

                                                                                                                                    Index

                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                    +
                                                                                                                                    Properties
                                                                                                                                    +
                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    + + +
                                                                                                                                    + +

                                                                                                                                    + Properties +

                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                    + + + maxCount + + +
                                                                                                                                    + Type : number + +
                                                                                                                                    + +
                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                    + + + minCount + + +
                                                                                                                                    + Type : number + +
                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    + + + + + + + +
                                                                                                                                    + + +
                                                                                                                                    +
                                                                                                                                    import { DemoChildGenerator } from "../demo-child-generator.service";
                                                                                                                                    +import { DemoDataGenerator } from "../../../../core/demo-data/demo-data-generator";
                                                                                                                                    +import { Injectable } from "@angular/core";
                                                                                                                                    +import { faker } from "../../../../core/demo-data/faker";
                                                                                                                                    +import { materials } from "./materials";
                                                                                                                                    +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                    +import { createEntityOfType } from "../../../../core/demo-data/create-entity-of-type";
                                                                                                                                    +
                                                                                                                                    +export class DemoEducationMaterialConfig {
                                                                                                                                    +  minCount: number;
                                                                                                                                    +  maxCount: number;
                                                                                                                                    +}
                                                                                                                                    +
                                                                                                                                    +/**
                                                                                                                                    + * Generate EducationalMaterial records.
                                                                                                                                    + * Builds upon the generated demo Child entities.
                                                                                                                                    + */
                                                                                                                                    +@Injectable()
                                                                                                                                    +export class DemoEducationalMaterialGeneratorService extends DemoDataGenerator<Entity> {
                                                                                                                                    +  /**
                                                                                                                                    +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                    +   *   `providers: [DemoEducationalMaterialGeneratorService.provider()]`
                                                                                                                                    +   */
                                                                                                                                    +  static provider(config: DemoEducationMaterialConfig) {
                                                                                                                                    +    return [
                                                                                                                                    +      {
                                                                                                                                    +        provide: DemoEducationalMaterialGeneratorService,
                                                                                                                                    +        useClass: DemoEducationalMaterialGeneratorService,
                                                                                                                                    +      },
                                                                                                                                    +      { provide: DemoEducationMaterialConfig, useValue: config },
                                                                                                                                    +    ];
                                                                                                                                    +  }
                                                                                                                                    +
                                                                                                                                    +  constructor(
                                                                                                                                    +    private config: DemoEducationMaterialConfig,
                                                                                                                                    +    private demoChildren: DemoChildGenerator,
                                                                                                                                    +  ) {
                                                                                                                                    +    super();
                                                                                                                                    +  }
                                                                                                                                    +
                                                                                                                                    +  public generateEntities(): Entity[] {
                                                                                                                                    +    const data = [];
                                                                                                                                    +
                                                                                                                                    +    for (const child of this.demoChildren.entities) {
                                                                                                                                    +      const count = faker.number.int({
                                                                                                                                    +        min: this.config.minCount,
                                                                                                                                    +        max: this.config.maxCount,
                                                                                                                                    +      });
                                                                                                                                    +      for (let i = 1; i < count; i++) {
                                                                                                                                    +        data.push(this.generateEducationalMaterialEntity(child));
                                                                                                                                    +      }
                                                                                                                                    +
                                                                                                                                    +      const specialMaterial = this.generateEducationalMaterialEntity(child);
                                                                                                                                    +      specialMaterial.materialType = faker.helpers.arrayElement(
                                                                                                                                    +        materials.filter((material) => material.hasOwnProperty("color")),
                                                                                                                                    +      ).id;
                                                                                                                                    +      specialMaterial.materialAmount = 1;
                                                                                                                                    +      data.push(specialMaterial);
                                                                                                                                    +    }
                                                                                                                                    +
                                                                                                                                    +    return data;
                                                                                                                                    +  }
                                                                                                                                    +
                                                                                                                                    +  private generateEducationalMaterialEntity(
                                                                                                                                    +    child: Entity,
                                                                                                                                    +  ): Entity & { [key: string]: any } {
                                                                                                                                    +    const entity = createEntityOfType("EducationalMaterial");
                                                                                                                                    +
                                                                                                                                    +    entity.child = child.getId();
                                                                                                                                    +    entity.date = faker.date.between({
                                                                                                                                    +      from: child["admissionDate"],
                                                                                                                                    +      to: faker.getEarlierDateOrToday(child["dropoutDate"]),
                                                                                                                                    +    });
                                                                                                                                    +    entity.materialAmount = faker.helpers.arrayElement([1, 1, 1, 2, 3]);
                                                                                                                                    +    entity.materialType = faker.helpers.arrayElement(materials).id;
                                                                                                                                    +
                                                                                                                                    +    return entity;
                                                                                                                                    +  }
                                                                                                                                    +}
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + + + + + + + + + +
                                                                                                                                    +
                                                                                                                                    +

                                                                                                                                    results matching ""

                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +

                                                                                                                                      No results matching ""

                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      +
                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoEventsConfig.html b/documentation/classes/DemoEventsConfig.html new file mode 100644 index 0000000000..d26550d90e --- /dev/null +++ b/documentation/classes/DemoEventsConfig.html @@ -0,0 +1,388 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                      +
                                                                                                                                      + + +
                                                                                                                                      +
                                                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                                                      +
                                                                                                                                      +

                                                                                                                                      +

                                                                                                                                      File

                                                                                                                                      +

                                                                                                                                      +

                                                                                                                                      + src/app/child-dev-project/attendance/demo-data/demo-activity-events-generator.service.ts +

                                                                                                                                      + + + + + + +
                                                                                                                                      +

                                                                                                                                      Index

                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                      +
                                                                                                                                      Properties
                                                                                                                                      +
                                                                                                                                      + +
                                                                                                                                      +
                                                                                                                                      + + +
                                                                                                                                      + +

                                                                                                                                      + Properties +

                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                      + + + forNLastYears + + +
                                                                                                                                      + Type : number + +
                                                                                                                                      + +
                                                                                                                                      +
                                                                                                                                      + + + + + + + +
                                                                                                                                      + + +
                                                                                                                                      +
                                                                                                                                      import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                      +import { Injectable } from "@angular/core";
                                                                                                                                      +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                      +import { RecurringActivity } from "../model/recurring-activity";
                                                                                                                                      +import { AttendanceLogicalStatus } from "../model/attendance-status";
                                                                                                                                      +import { defaultAttendanceStatusTypes } from "../../../core/config/default-config/default-attendance-status-types";
                                                                                                                                      +import { DemoActivityGeneratorService } from "./demo-activity-generator.service";
                                                                                                                                      +import moment from "moment";
                                                                                                                                      +import { EventNote } from "../model/event-note";
                                                                                                                                      +
                                                                                                                                      +export class DemoEventsConfig {
                                                                                                                                      +  forNLastYears: number;
                                                                                                                                      +}
                                                                                                                                      +
                                                                                                                                      +/**
                                                                                                                                      + * Generate Events with participants' attendance details for all RecurringActivities.
                                                                                                                                      + */
                                                                                                                                      +@Injectable()
                                                                                                                                      +export class DemoActivityEventsGeneratorService extends DemoDataGenerator<EventNote> {
                                                                                                                                      +  /**
                                                                                                                                      +   * Create a specific event for a date based on the given activity and fill with random attendance.
                                                                                                                                      +   * @param activity The activity for which to generate a concrete event instance
                                                                                                                                      +   * @param date The date of the generated event
                                                                                                                                      +   */
                                                                                                                                      +  static generateEventForActivity(
                                                                                                                                      +    activity: RecurringActivity,
                                                                                                                                      +    date: Date,
                                                                                                                                      +  ): EventNote {
                                                                                                                                      +    const eventNote = EventNote.create(date, activity.title);
                                                                                                                                      +    eventNote.authors = activity.assignedTo;
                                                                                                                                      +    eventNote.category = activity.type;
                                                                                                                                      +    eventNote.relatesTo = activity.getId();
                                                                                                                                      +
                                                                                                                                      +    for (const participantId of activity.participants) {
                                                                                                                                      +      eventNote.addChild(participantId);
                                                                                                                                      +      const eventAtt = eventNote.getAttendance(participantId);
                                                                                                                                      +      eventAtt.status = faker.helpers.arrayElement(
                                                                                                                                      +        defaultAttendanceStatusTypes,
                                                                                                                                      +      );
                                                                                                                                      +
                                                                                                                                      +      if (eventAtt.status.countAs === AttendanceLogicalStatus.ABSENT) {
                                                                                                                                      +        eventAtt.remarks = faker.helpers.arrayElement([
                                                                                                                                      +          $localize`:Event demo attendance remarks:sick`,
                                                                                                                                      +          $localize`:Event demo attendance remarks:fever`,
                                                                                                                                      +          $localize`:Event demo attendance remarks:no information`,
                                                                                                                                      +        ]);
                                                                                                                                      +      }
                                                                                                                                      +    }
                                                                                                                                      +
                                                                                                                                      +    return eventNote;
                                                                                                                                      +  }
                                                                                                                                      +
                                                                                                                                      +  /**
                                                                                                                                      +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                      +   *   `providers: [DemoActivityEventsGeneratorService.provider()]`
                                                                                                                                      +   */
                                                                                                                                      +  static provider(
                                                                                                                                      +    config: DemoEventsConfig = {
                                                                                                                                      +      forNLastYears: 2,
                                                                                                                                      +    },
                                                                                                                                      +  ) {
                                                                                                                                      +    return [
                                                                                                                                      +      {
                                                                                                                                      +        provide: DemoActivityEventsGeneratorService,
                                                                                                                                      +        useClass: DemoActivityEventsGeneratorService,
                                                                                                                                      +      },
                                                                                                                                      +      { provide: DemoEventsConfig, useValue: config },
                                                                                                                                      +    ];
                                                                                                                                      +  }
                                                                                                                                      +
                                                                                                                                      +  constructor(
                                                                                                                                      +    private config: DemoEventsConfig,
                                                                                                                                      +    private demoActivities: DemoActivityGeneratorService,
                                                                                                                                      +  ) {
                                                                                                                                      +    super();
                                                                                                                                      +  }
                                                                                                                                      +
                                                                                                                                      +  generateEntities(): EventNote[] {
                                                                                                                                      +    const data = [];
                                                                                                                                      +
                                                                                                                                      +    for (const activity of this.demoActivities.entities) {
                                                                                                                                      +      for (
                                                                                                                                      +        let dayOffset = 1;
                                                                                                                                      +        dayOffset < this.config.forNLastYears * 365;
                                                                                                                                      +        dayOffset++
                                                                                                                                      +      ) {
                                                                                                                                      +        const date = moment().subtract(dayOffset, "days");
                                                                                                                                      +        if (date.isoWeekday() === 6 || date.isoWeekday() === 7) {
                                                                                                                                      +          // skip Saturday, Sunday
                                                                                                                                      +          continue;
                                                                                                                                      +        }
                                                                                                                                      +        data.push(
                                                                                                                                      +          DemoActivityEventsGeneratorService.generateEventForActivity(
                                                                                                                                      +            activity,
                                                                                                                                      +            date.toDate(),
                                                                                                                                      +          ),
                                                                                                                                      +        );
                                                                                                                                      +      }
                                                                                                                                      +    }
                                                                                                                                      +
                                                                                                                                      +    return data;
                                                                                                                                      +  }
                                                                                                                                      +}
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + + + + + + + + + +
                                                                                                                                      +
                                                                                                                                      +

                                                                                                                                      results matching ""

                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +

                                                                                                                                        No results matching ""

                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        +
                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoHistoricalDataConfig.html b/documentation/classes/DemoHistoricalDataConfig.html new file mode 100644 index 0000000000..4f413617e1 --- /dev/null +++ b/documentation/classes/DemoHistoricalDataConfig.html @@ -0,0 +1,380 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                        +
                                                                                                                                        + + +
                                                                                                                                        +
                                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                                        +
                                                                                                                                        +

                                                                                                                                        +

                                                                                                                                        File

                                                                                                                                        +

                                                                                                                                        +

                                                                                                                                        + src/app/child-dev-project/children/demo-data-generators/observations/demo-historical-data-generator.ts +

                                                                                                                                        + + + + + + +
                                                                                                                                        +

                                                                                                                                        Index

                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                        +
                                                                                                                                        Properties
                                                                                                                                        +
                                                                                                                                        + +
                                                                                                                                        +
                                                                                                                                        + + +
                                                                                                                                        + +

                                                                                                                                        + Properties +

                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                        + + + maxCountAttributes + + +
                                                                                                                                        + Type : number + +
                                                                                                                                        + +
                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                        + + + minCountAttributes + + +
                                                                                                                                        + Type : number + +
                                                                                                                                        + +
                                                                                                                                        +
                                                                                                                                        + + + + + + + +
                                                                                                                                        + + +
                                                                                                                                        +
                                                                                                                                        import { DemoDataGenerator } from "../../../../core/demo-data/demo-data-generator";
                                                                                                                                        +import { Injectable } from "@angular/core";
                                                                                                                                        +import { DemoChildGenerator } from "../demo-child-generator.service";
                                                                                                                                        +import { faker } from "../../../../core/demo-data/faker";
                                                                                                                                        +import { ratingAnswers } from "./rating-answers";
                                                                                                                                        +import { EntityConfigService } from "../../../../core/entity/entity-config.service";
                                                                                                                                        +import { DemoConfigGeneratorService } from "../../../../core/config/demo-config-generator.service";
                                                                                                                                        +import { EntityConfig } from "../../../../core/entity/entity-config";
                                                                                                                                        +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                        +import { createEntityOfType } from "../../../../core/demo-data/create-entity-of-type";
                                                                                                                                        +
                                                                                                                                        +export class DemoHistoricalDataConfig {
                                                                                                                                        +  minCountAttributes: number;
                                                                                                                                        +  maxCountAttributes: number;
                                                                                                                                        +}
                                                                                                                                        +
                                                                                                                                        +@Injectable()
                                                                                                                                        +export class DemoHistoricalDataGenerator extends DemoDataGenerator<Entity> {
                                                                                                                                        +  static provider(config: DemoHistoricalDataConfig) {
                                                                                                                                        +    return [
                                                                                                                                        +      {
                                                                                                                                        +        provide: DemoHistoricalDataGenerator,
                                                                                                                                        +        useClass: DemoHistoricalDataGenerator,
                                                                                                                                        +      },
                                                                                                                                        +      { provide: DemoHistoricalDataConfig, useValue: config },
                                                                                                                                        +    ];
                                                                                                                                        +  }
                                                                                                                                        +
                                                                                                                                        +  constructor(
                                                                                                                                        +    private childrenGenerator: DemoChildGenerator,
                                                                                                                                        +    private config: DemoHistoricalDataConfig,
                                                                                                                                        +    private configGenerator: DemoConfigGeneratorService,
                                                                                                                                        +  ) {
                                                                                                                                        +    super();
                                                                                                                                        +  }
                                                                                                                                        +
                                                                                                                                        +  protected generateEntities(): Entity[] {
                                                                                                                                        +    const config = this.configGenerator.entities[0];
                                                                                                                                        +    const attributes: any[] = Object.keys(
                                                                                                                                        +      (
                                                                                                                                        +        config.data[
                                                                                                                                        +          EntityConfigService.PREFIX_ENTITY_CONFIG + "HistoricalEntityData"
                                                                                                                                        +        ] as EntityConfig
                                                                                                                                        +      ).attributes,
                                                                                                                                        +    );
                                                                                                                                        +
                                                                                                                                        +    const entities: Entity[] = [];
                                                                                                                                        +    for (const child of this.childrenGenerator.entities) {
                                                                                                                                        +      const countOfData =
                                                                                                                                        +        faker.number.int(this.config.maxCountAttributes) +
                                                                                                                                        +        this.config.minCountAttributes;
                                                                                                                                        +      const historicalDataOfChild = [...Array(countOfData)].map(() => {
                                                                                                                                        +        const historicalData = createEntityOfType("HistoricalEntityData");
                                                                                                                                        +        for (const attribute of attributes) {
                                                                                                                                        +          historicalData[attribute] =
                                                                                                                                        +            faker.helpers.arrayElement(ratingAnswers).id;
                                                                                                                                        +        }
                                                                                                                                        +        historicalData.date = faker.date.past();
                                                                                                                                        +        historicalData.relatedEntity = child.getId();
                                                                                                                                        +        return historicalData;
                                                                                                                                        +      });
                                                                                                                                        +      entities.push(...historicalDataOfChild);
                                                                                                                                        +    }
                                                                                                                                        +    return entities;
                                                                                                                                        +  }
                                                                                                                                        +}
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + + + + + + + + + +
                                                                                                                                        +
                                                                                                                                        +

                                                                                                                                        results matching ""

                                                                                                                                        +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +

                                                                                                                                          No results matching ""

                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          +
                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoNoteConfig.html b/documentation/classes/DemoNoteConfig.html new file mode 100644 index 0000000000..424e664abb --- /dev/null +++ b/documentation/classes/DemoNoteConfig.html @@ -0,0 +1,508 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                          +
                                                                                                                                          + + +
                                                                                                                                          +
                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                          +
                                                                                                                                          +

                                                                                                                                          +

                                                                                                                                          File

                                                                                                                                          +

                                                                                                                                          +

                                                                                                                                          + src/app/child-dev-project/notes/demo-data/demo-note-generator.service.ts +

                                                                                                                                          + + + + + + +
                                                                                                                                          +

                                                                                                                                          Index

                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                          +
                                                                                                                                          Properties
                                                                                                                                          +
                                                                                                                                          + +
                                                                                                                                          +
                                                                                                                                          + + +
                                                                                                                                          + +

                                                                                                                                          + Properties +

                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                          + + + groupNotes + + +
                                                                                                                                          + Type : number + +
                                                                                                                                          + +
                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                          + + + maxNotesPerChild + + +
                                                                                                                                          + Type : number + +
                                                                                                                                          + +
                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                          + + + minNotesPerChild + + +
                                                                                                                                          + Type : number + +
                                                                                                                                          + +
                                                                                                                                          +
                                                                                                                                          + + + + + + + +
                                                                                                                                          + + +
                                                                                                                                          +
                                                                                                                                          import { DemoChildGenerator } from "../../children/demo-data-generators/demo-child-generator.service";
                                                                                                                                          +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                          +import { Injectable } from "@angular/core";
                                                                                                                                          +import { Note } from "../model/note";
                                                                                                                                          +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                          +import { noteIndividualStories } from "./notes_individual-stories";
                                                                                                                                          +import { noteGroupStories } from "./notes_group-stories";
                                                                                                                                          +import { centersUnique } from "../../children/demo-data-generators/fixtures/centers";
                                                                                                                                          +import { absenceRemarks } from "./remarks";
                                                                                                                                          +import moment from "moment";
                                                                                                                                          +import { AttendanceLogicalStatus } from "../../attendance/model/attendance-status";
                                                                                                                                          +import { DemoUserGeneratorService } from "../../../core/user/demo-user-generator.service";
                                                                                                                                          +import { defaultAttendanceStatusTypes } from "../../../core/config/default-config/default-attendance-status-types";
                                                                                                                                          +import { warningLevels } from "../../warning-level";
                                                                                                                                          +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                          +
                                                                                                                                          +export class DemoNoteConfig {
                                                                                                                                          +  minNotesPerChild: number;
                                                                                                                                          +  maxNotesPerChild: number;
                                                                                                                                          +  groupNotes: number;
                                                                                                                                          +}
                                                                                                                                          +
                                                                                                                                          +/**
                                                                                                                                          + * Generate a number of Note entities for each Child.
                                                                                                                                          + * Builds upon the generated demo Child entities.
                                                                                                                                          + */
                                                                                                                                          +@Injectable()
                                                                                                                                          +export class DemoNoteGeneratorService extends DemoDataGenerator<Note> {
                                                                                                                                          +  /**
                                                                                                                                          +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                          +   *   `providers: [DemoNoteGeneratorService.provider()]`
                                                                                                                                          +   */
                                                                                                                                          +  static provider(
                                                                                                                                          +    config: DemoNoteConfig = {
                                                                                                                                          +      minNotesPerChild: 2,
                                                                                                                                          +      maxNotesPerChild: 10,
                                                                                                                                          +      groupNotes: 5,
                                                                                                                                          +    },
                                                                                                                                          +  ) {
                                                                                                                                          +    return [
                                                                                                                                          +      { provide: DemoNoteGeneratorService, useClass: DemoNoteGeneratorService },
                                                                                                                                          +      { provide: DemoNoteConfig, useValue: config },
                                                                                                                                          +    ];
                                                                                                                                          +  }
                                                                                                                                          +
                                                                                                                                          +  constructor(
                                                                                                                                          +    private config: DemoNoteConfig,
                                                                                                                                          +    private demoChildren: DemoChildGenerator,
                                                                                                                                          +    private demoUsers: DemoUserGeneratorService,
                                                                                                                                          +  ) {
                                                                                                                                          +    super();
                                                                                                                                          +  }
                                                                                                                                          +
                                                                                                                                          +  public generateEntities(): Note[] {
                                                                                                                                          +    const data = [];
                                                                                                                                          +
                                                                                                                                          +    for (const child of this.demoChildren.entities) {
                                                                                                                                          +      if (!child.isActive) {
                                                                                                                                          +        continue;
                                                                                                                                          +      }
                                                                                                                                          +
                                                                                                                                          +      let numberOfNotes = faker.number.int({
                                                                                                                                          +        min: this.config.minNotesPerChild,
                                                                                                                                          +        max: this.config.maxNotesPerChild,
                                                                                                                                          +      });
                                                                                                                                          +
                                                                                                                                          +      // generate a recent note for the last week for some children to have data for dashboard
                                                                                                                                          +      if (numberOfNotes > 0 && faker.number.int(100) < 40) {
                                                                                                                                          +        data.push(
                                                                                                                                          +          this.generateNoteForChild(
                                                                                                                                          +            child,
                                                                                                                                          +            faker.date.between({
                                                                                                                                          +              from: moment().subtract(6, "days").toDate(),
                                                                                                                                          +              to: moment().toDate(),
                                                                                                                                          +            }),
                                                                                                                                          +          ),
                                                                                                                                          +        );
                                                                                                                                          +        numberOfNotes--;
                                                                                                                                          +      }
                                                                                                                                          +
                                                                                                                                          +      for (let i = 0; i < numberOfNotes; i++) {
                                                                                                                                          +        data.push(this.generateNoteForChild(child));
                                                                                                                                          +      }
                                                                                                                                          +    }
                                                                                                                                          +
                                                                                                                                          +    for (const center of centersUnique) {
                                                                                                                                          +      const children: Entity[] = this.demoChildren.entities.filter(
                                                                                                                                          +        (c) => c["center"] === center,
                                                                                                                                          +      );
                                                                                                                                          +      for (let i = 0; i < this.config.groupNotes; i++) {
                                                                                                                                          +        data.push(this.generateGroupNote(children));
                                                                                                                                          +      }
                                                                                                                                          +    }
                                                                                                                                          +
                                                                                                                                          +    return data;
                                                                                                                                          +  }
                                                                                                                                          +
                                                                                                                                          +  private generateNoteForChild(child: Entity, date?: Date): Note {
                                                                                                                                          +    const note = new Note();
                                                                                                                                          +
                                                                                                                                          +    const selectedStory = faker.helpers.arrayElement(noteIndividualStories);
                                                                                                                                          +    Object.assign(note, selectedStory);
                                                                                                                                          +
                                                                                                                                          +    note.addChild(child.getId());
                                                                                                                                          +    note.authors = [
                                                                                                                                          +      faker.helpers.arrayElement(this.demoUsers.entities).getId(),
                                                                                                                                          +    ];
                                                                                                                                          +
                                                                                                                                          +    if (!date) {
                                                                                                                                          +      date = faker.date.between({
                                                                                                                                          +        from: child["admissionDate"],
                                                                                                                                          +        to: faker.getEarlierDateOrToday(child["dropoutDate"]),
                                                                                                                                          +      });
                                                                                                                                          +    }
                                                                                                                                          +    note.date = date;
                                                                                                                                          +
                                                                                                                                          +    this.removeFollowUpMarkerForOldNotes(note);
                                                                                                                                          +
                                                                                                                                          +    return note;
                                                                                                                                          +  }
                                                                                                                                          +
                                                                                                                                          +  /**
                                                                                                                                          +   * Set all older notes to be "resolved" in order to keep the list of notes needing follow-up limited in the demo.
                                                                                                                                          +   */
                                                                                                                                          +  private removeFollowUpMarkerForOldNotes(note: Note) {
                                                                                                                                          +    const lastMonths = new Date();
                                                                                                                                          +    lastMonths.setMonth(lastMonths.getMonth() - 1);
                                                                                                                                          +    if (note.date < lastMonths) {
                                                                                                                                          +      note.warningLevel = warningLevels.find((level) => level.id === "OK");
                                                                                                                                          +    }
                                                                                                                                          +  }
                                                                                                                                          +
                                                                                                                                          +  private generateGroupNote(children: Entity[]) {
                                                                                                                                          +    const note = new Note();
                                                                                                                                          +
                                                                                                                                          +    const selectedStory = faker.helpers.arrayElement(noteGroupStories);
                                                                                                                                          +    Object.assign(note, selectedStory);
                                                                                                                                          +
                                                                                                                                          +    note.children = children.map((c) => c.getId());
                                                                                                                                          +    children.forEach((child) => {
                                                                                                                                          +      const attendance = note.getAttendance(child.getId());
                                                                                                                                          +      // get an approximate presence of 85%
                                                                                                                                          +      if (faker.number.int(100) <= 15) {
                                                                                                                                          +        attendance.status = defaultAttendanceStatusTypes.find(
                                                                                                                                          +          (t) => t.countAs === AttendanceLogicalStatus.ABSENT,
                                                                                                                                          +        );
                                                                                                                                          +        attendance.remarks = faker.helpers.arrayElement(absenceRemarks);
                                                                                                                                          +      } else {
                                                                                                                                          +        attendance.status = defaultAttendanceStatusTypes.find(
                                                                                                                                          +          (t) => t.countAs === AttendanceLogicalStatus.PRESENT,
                                                                                                                                          +        );
                                                                                                                                          +      }
                                                                                                                                          +    });
                                                                                                                                          +
                                                                                                                                          +    note.authors = [
                                                                                                                                          +      faker.helpers.arrayElement(this.demoUsers.entities).getId(),
                                                                                                                                          +    ];
                                                                                                                                          +
                                                                                                                                          +    note.date = faker.date.past({ years: 1 });
                                                                                                                                          +
                                                                                                                                          +    this.removeFollowUpMarkerForOldNotes(note);
                                                                                                                                          +
                                                                                                                                          +    return note;
                                                                                                                                          +  }
                                                                                                                                          +}
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + + + + + + + + + +
                                                                                                                                          +
                                                                                                                                          +

                                                                                                                                          results matching ""

                                                                                                                                          +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +

                                                                                                                                            No results matching ""

                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            + +
                                                                                                                                            +
                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoSchoolConfig.html b/documentation/classes/DemoSchoolConfig.html new file mode 100644 index 0000000000..8412f10a53 --- /dev/null +++ b/documentation/classes/DemoSchoolConfig.html @@ -0,0 +1,351 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                            +
                                                                                                                                            + + +
                                                                                                                                            +
                                                                                                                                            + + + + + + + + + + + + + + + + +
                                                                                                                                            +
                                                                                                                                            +

                                                                                                                                            +

                                                                                                                                            File

                                                                                                                                            +

                                                                                                                                            +

                                                                                                                                            + src/app/child-dev-project/children/demo-data-generators/demo-school-generator.service.ts +

                                                                                                                                            + + + + + + +
                                                                                                                                            +

                                                                                                                                            Index

                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                            +
                                                                                                                                            Properties
                                                                                                                                            +
                                                                                                                                            + +
                                                                                                                                            +
                                                                                                                                            + + +
                                                                                                                                            + +

                                                                                                                                            + Properties +

                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                            + + + count + + +
                                                                                                                                            + Type : number + +
                                                                                                                                            + +
                                                                                                                                            +
                                                                                                                                            + + + + + + + +
                                                                                                                                            + + +
                                                                                                                                            +
                                                                                                                                            import { faker } from "../../../core/demo-data/faker";
                                                                                                                                            +import { Injectable } from "@angular/core";
                                                                                                                                            +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                            +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                            +import { createEntityOfType } from "../../../core/demo-data/create-entity-of-type";
                                                                                                                                            +
                                                                                                                                            +export class DemoSchoolConfig {
                                                                                                                                            +  count: number;
                                                                                                                                            +}
                                                                                                                                            +
                                                                                                                                            +@Injectable()
                                                                                                                                            +export class DemoSchoolGenerator extends DemoDataGenerator<Entity> {
                                                                                                                                            +  /**
                                                                                                                                            +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                            +   *   `providers: [DemoSchoolGenerator.provider({count: 10})]`
                                                                                                                                            +   * @param config A config object specifying the number of entities the service should generate.
                                                                                                                                            +   */
                                                                                                                                            +  static provider(config: DemoSchoolConfig) {
                                                                                                                                            +    return [
                                                                                                                                            +      { provide: DemoSchoolGenerator, useClass: DemoSchoolGenerator },
                                                                                                                                            +      { provide: DemoSchoolConfig, useValue: config },
                                                                                                                                            +    ];
                                                                                                                                            +  }
                                                                                                                                            +
                                                                                                                                            +  private readonly normalSchool = $localize`:School demo name that is connected with a school name:School`;
                                                                                                                                            +  private readonly highSchool = $localize`:School demo name that is connected with a school name:High School`;
                                                                                                                                            +
                                                                                                                                            +  constructor(public config: DemoSchoolConfig) {
                                                                                                                                            +    super();
                                                                                                                                            +  }
                                                                                                                                            +
                                                                                                                                            +  generateEntities(): Entity[] {
                                                                                                                                            +    const data = [];
                                                                                                                                            +
                                                                                                                                            +    for (let i = 1; i <= this.config.count; i++) {
                                                                                                                                            +      const school = createEntityOfType("School", String(i));
                                                                                                                                            +      school["language"] = faker.helpers.arrayElement([
                                                                                                                                            +        $localize`:Language of a school:Hindi`,
                                                                                                                                            +        $localize`:Language of a school:English`,
                                                                                                                                            +        $localize`:Language of a school:Bengali`,
                                                                                                                                            +      ]);
                                                                                                                                            +      const schoolNameWithType = $localize`:School demo name order for connecting the school name and (High) School|e.g. Example School:${faker.person.firstName()} ${faker.helpers.arrayElement(
                                                                                                                                            +        [this.normalSchool, this.highSchool],
                                                                                                                                            +      )}`;
                                                                                                                                            +      const schoolNameWithLanguage = $localize`${faker.person.firstName()} ${
                                                                                                                                            +        school["language"]
                                                                                                                                            +      } Medium`;
                                                                                                                                            +      school.name = faker.helpers.arrayElement([
                                                                                                                                            +        schoolNameWithType,
                                                                                                                                            +        schoolNameWithLanguage,
                                                                                                                                            +      ]);
                                                                                                                                            +      school["phone"] = faker.phone.number();
                                                                                                                                            +      school["privateSchool"] = faker.datatype.boolean();
                                                                                                                                            +      school["timing"] = faker.helpers.arrayElement([
                                                                                                                                            +        $localize`:School demo timing:6 a.m. - 11 a.m.`,
                                                                                                                                            +        $localize`:School demo timing:11 a.m. - 4 p.m.`,
                                                                                                                                            +        $localize`:School demo timing:6:30-11:00 and 11:30-16:00`,
                                                                                                                                            +      ]);
                                                                                                                                            +
                                                                                                                                            +      school["address"] = faker.geoAddress();
                                                                                                                                            +
                                                                                                                                            +      data.push(school);
                                                                                                                                            +    }
                                                                                                                                            +    return data;
                                                                                                                                            +  }
                                                                                                                                            +}
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            + + + + + + + + + +
                                                                                                                                            +
                                                                                                                                            +

                                                                                                                                            results matching ""

                                                                                                                                            +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +

                                                                                                                                              No results matching ""

                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              + +
                                                                                                                                              +
                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DemoTodoConfig.html b/documentation/classes/DemoTodoConfig.html new file mode 100644 index 0000000000..b8f0ce6915 --- /dev/null +++ b/documentation/classes/DemoTodoConfig.html @@ -0,0 +1,419 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                              +
                                                                                                                                              + + +
                                                                                                                                              +
                                                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                                                              +
                                                                                                                                              +

                                                                                                                                              +

                                                                                                                                              File

                                                                                                                                              +

                                                                                                                                              +

                                                                                                                                              + src/app/features/todos/model/demo-todo-generator.service.ts +

                                                                                                                                              + + + + + + +
                                                                                                                                              +

                                                                                                                                              Index

                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                              +
                                                                                                                                              Properties
                                                                                                                                              +
                                                                                                                                              + +
                                                                                                                                              +
                                                                                                                                              + + +
                                                                                                                                              + +

                                                                                                                                              + Properties +

                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                              + + + maxPerChild + + +
                                                                                                                                              + Type : number + +
                                                                                                                                              + +
                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                              + + + minPerChild + + +
                                                                                                                                              + Type : number + +
                                                                                                                                              + +
                                                                                                                                              +
                                                                                                                                              + + + + + + + +
                                                                                                                                              + + +
                                                                                                                                              +
                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                              +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                              +import { DemoChildGenerator } from "../../../child-dev-project/children/demo-data-generators/demo-child-generator.service";
                                                                                                                                              +import { DemoUserGeneratorService } from "../../../core/user/demo-user-generator.service";
                                                                                                                                              +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                              +import moment from "moment/moment";
                                                                                                                                              +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                              +import { Todo } from "./todo";
                                                                                                                                              +
                                                                                                                                              +export class DemoTodoConfig {
                                                                                                                                              +  minPerChild: number;
                                                                                                                                              +  maxPerChild: number;
                                                                                                                                              +}
                                                                                                                                              +
                                                                                                                                              +@Injectable()
                                                                                                                                              +export class DemoTodoGeneratorService extends DemoDataGenerator<Todo> {
                                                                                                                                              +  static provider(
                                                                                                                                              +    config: DemoTodoConfig = {
                                                                                                                                              +      minPerChild: 1,
                                                                                                                                              +      maxPerChild: 2,
                                                                                                                                              +    },
                                                                                                                                              +  ) {
                                                                                                                                              +    return [
                                                                                                                                              +      { provide: DemoTodoGeneratorService, useClass: DemoTodoGeneratorService },
                                                                                                                                              +      { provide: DemoTodoConfig, useValue: config },
                                                                                                                                              +    ];
                                                                                                                                              +  }
                                                                                                                                              +
                                                                                                                                              +  constructor(
                                                                                                                                              +    private config: DemoTodoConfig,
                                                                                                                                              +    private demoChildren: DemoChildGenerator,
                                                                                                                                              +    private demoUsers: DemoUserGeneratorService,
                                                                                                                                              +  ) {
                                                                                                                                              +    super();
                                                                                                                                              +  }
                                                                                                                                              +
                                                                                                                                              +  public generateEntities(): Todo[] {
                                                                                                                                              +    const data = [];
                                                                                                                                              +
                                                                                                                                              +    for (const child of this.demoChildren.entities) {
                                                                                                                                              +      if (!child.isActive) {
                                                                                                                                              +        continue;
                                                                                                                                              +      }
                                                                                                                                              +
                                                                                                                                              +      let numberOfRecords = faker.number.int({
                                                                                                                                              +        min: this.config.minPerChild,
                                                                                                                                              +        max: this.config.maxPerChild,
                                                                                                                                              +      });
                                                                                                                                              +
                                                                                                                                              +      for (let i = 0; i < numberOfRecords; i++) {
                                                                                                                                              +        data.push(this.generateTodoForEntity(child));
                                                                                                                                              +      }
                                                                                                                                              +    }
                                                                                                                                              +
                                                                                                                                              +    return data;
                                                                                                                                              +  }
                                                                                                                                              +
                                                                                                                                              +  private generateTodoForEntity(entity: Entity): Todo {
                                                                                                                                              +    const todo = new Todo(faker.string.alphanumeric(20));
                                                                                                                                              +
                                                                                                                                              +    const selectedStory = faker.helpers.arrayElement(stories);
                                                                                                                                              +    todo.subject = selectedStory.subject;
                                                                                                                                              +    todo.description = selectedStory.description;
                                                                                                                                              +
                                                                                                                                              +    todo.deadline = faker.date.between({
                                                                                                                                              +      from: moment().subtract(5, "days").toDate(),
                                                                                                                                              +      to: moment().add(90, "days").toDate(),
                                                                                                                                              +    });
                                                                                                                                              +    faker.helpers.maybe(
                                                                                                                                              +      () =>
                                                                                                                                              +        (todo.startDate = faker.date.between({
                                                                                                                                              +          from: moment(todo.deadline).subtract(25, "days").toDate(),
                                                                                                                                              +          to: todo.deadline,
                                                                                                                                              +        })),
                                                                                                                                              +      { probability: 0.5 },
                                                                                                                                              +    );
                                                                                                                                              +
                                                                                                                                              +    todo.relatedEntities = [entity.getId()];
                                                                                                                                              +
                                                                                                                                              +    todo.assignedTo = [
                                                                                                                                              +      faker.helpers.arrayElement(this.demoUsers.entities).getId(),
                                                                                                                                              +    ];
                                                                                                                                              +
                                                                                                                                              +    return todo;
                                                                                                                                              +  }
                                                                                                                                              +}
                                                                                                                                              +
                                                                                                                                              +const stories: Partial<Todo>[] = [
                                                                                                                                              +  {
                                                                                                                                              +    subject: $localize`:demo todo record:get signed agreement`,
                                                                                                                                              +    description: $localize`:demo todo record:We have fixed all the details but still have to put it in writing.`,
                                                                                                                                              +  },
                                                                                                                                              +  {
                                                                                                                                              +    subject: $localize`:demo todo record:follow up`,
                                                                                                                                              +    description: $localize`:demo todo record:Call to follow up on the recent developments.`,
                                                                                                                                              +  },
                                                                                                                                              +  {
                                                                                                                                              +    subject: $localize`:demo todo record:call family`,
                                                                                                                                              +    description: $localize`:demo todo record:Check about the latest incident.`,
                                                                                                                                              +  },
                                                                                                                                              +  {
                                                                                                                                              +    subject: $localize`:demo todo record:plan career counselling`,
                                                                                                                                              +    description: $localize`:demo todo record:Personalized plan for the next discussion has to be prepared.`,
                                                                                                                                              +  },
                                                                                                                                              +];
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              + + + + + + + + + +
                                                                                                                                              +
                                                                                                                                              +

                                                                                                                                              results matching ""

                                                                                                                                              +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                No results matching ""

                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DiscreteDatatype.html b/documentation/classes/DiscreteDatatype.html new file mode 100644 index 0000000000..af7d389e07 --- /dev/null +++ b/documentation/classes/DiscreteDatatype.html @@ -0,0 +1,1075 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                +
                                                                                                                                                + + +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                +

                                                                                                                                                File

                                                                                                                                                +

                                                                                                                                                +

                                                                                                                                                + src/app/core/basic-datatypes/discrete/discrete.datatype.ts +

                                                                                                                                                + + +

                                                                                                                                                +

                                                                                                                                                Description

                                                                                                                                                +

                                                                                                                                                +

                                                                                                                                                +

                                                                                                                                                Abstract base for datatypes that hold a discrete set of values.

                                                                                                                                                +

                                                                                                                                                This provides import config and mapping definitions that work across all such types.

                                                                                                                                                + +

                                                                                                                                                + +

                                                                                                                                                +

                                                                                                                                                Extends

                                                                                                                                                +

                                                                                                                                                +

                                                                                                                                                + DefaultDatatype +

                                                                                                                                                + + + +
                                                                                                                                                +

                                                                                                                                                Index

                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                +
                                                                                                                                                Properties
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                Methods
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + + +
                                                                                                                                                + +

                                                                                                                                                + Properties +

                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + + importConfigComponent + + +
                                                                                                                                                + Type : string + +
                                                                                                                                                + Default value : "DiscreteImportConfig" +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:15 +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + Static + dataType + + +
                                                                                                                                                + Type : string + +
                                                                                                                                                + Default value : "" +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:41 +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                Key for this datatype that must be specified in the DatabaseField annotation to use this transformation.

                                                                                                                                                +

                                                                                                                                                for example @DatabaseField({dataType: 'foo'}) myField will trigger the datatype implementation with name "foo".

                                                                                                                                                +

                                                                                                                                                If you set the name to a TypeScript type, class properties with this type will automatically use +that EntitySchemaDatatype without the need to explicitly state the dataType config in the annotation +(e.g. @DatabaseField() myField: string is triggering the EntitySchemaDatatype with name "string".

                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + editComponent + + +
                                                                                                                                                + Type : string + +
                                                                                                                                                + Default value : "EditText" +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:61 +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + Static + label + + +
                                                                                                                                                + Type : string + +
                                                                                                                                                + Default value : $localize`:datatype-label:any` +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:49 +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                The human-readable name for this dataType, used in config UIs.

                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + viewComponent + + +
                                                                                                                                                + Type : string + +
                                                                                                                                                + Default value : "DisplayText" +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:60 +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                The default component how this datatype should be displayed in lists and forms.

                                                                                                                                                +

                                                                                                                                                The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                + +

                                                                                                                                                + Methods +

                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                + + importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:37 +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                NameTypeOptional
                                                                                                                                                col + ColumnMapping + + No +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + Returns : string + +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + + Async + importMapFunction + + +
                                                                                                                                                + + importMapFunction(val, schemaField: EntitySchemaField, additional: literal type) +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:29 +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                NameTypeOptional
                                                                                                                                                val + + No +
                                                                                                                                                schemaField + EntitySchemaField + + No +
                                                                                                                                                additional + literal type + + No +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + Returns : unknown + +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + Abstract + + transformToDatabaseFormat + + +
                                                                                                                                                + + transformToDatabaseFormat(value, schemaField?: EntitySchemaField, parent?: Entity) +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:17 +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                NameTypeOptional
                                                                                                                                                value + + No +
                                                                                                                                                schemaField + EntitySchemaField + + Yes +
                                                                                                                                                parent + Entity + + Yes +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + Returns : any + +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + Abstract + + transformToObjectFormat + + +
                                                                                                                                                + + transformToObjectFormat(value, schemaField?: EntitySchemaField, parent?: any) +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:23 +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                NameTypeOptional
                                                                                                                                                value + + No +
                                                                                                                                                schemaField + EntitySchemaField + + Yes +
                                                                                                                                                parent + any + + Yes +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + Returns : any + +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                + + + Async + anonymize + + +
                                                                                                                                                + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                +
                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                Defined in DefaultDatatype:137 +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                value + EntityType + + No + +

                                                                                                                                                The original value to be anonymized

                                                                                                                                                + +
                                                                                                                                                schemaField + EntitySchemaField + + No + +
                                                                                                                                                parent + any + + No + +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + Returns : Promise<any> + +
                                                                                                                                                +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + + + + + +
                                                                                                                                                + + +
                                                                                                                                                +
                                                                                                                                                import { DefaultDatatype } from "../../entity/default-datatype/default.datatype";
                                                                                                                                                +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                +import { ColumnMapping } from "../../import/column-mapping";
                                                                                                                                                +import { Entity } from "../../entity/model/entity";
                                                                                                                                                +
                                                                                                                                                +/**
                                                                                                                                                + * Abstract base for datatypes that hold a discrete set of values.
                                                                                                                                                + *
                                                                                                                                                + * This provides import config and mapping definitions that work across all such types.
                                                                                                                                                + */
                                                                                                                                                +export abstract class DiscreteDatatype<
                                                                                                                                                +  EntityType,
                                                                                                                                                +  DBType,
                                                                                                                                                +> extends DefaultDatatype<EntityType, DBType> {
                                                                                                                                                +  override importConfigComponent = "DiscreteImportConfig";
                                                                                                                                                +
                                                                                                                                                +  abstract override transformToDatabaseFormat(
                                                                                                                                                +    value,
                                                                                                                                                +    schemaField?: EntitySchemaField,
                                                                                                                                                +    parent?: Entity,
                                                                                                                                                +  );
                                                                                                                                                +
                                                                                                                                                +  abstract override transformToObjectFormat(
                                                                                                                                                +    value,
                                                                                                                                                +    schemaField?: EntitySchemaField,
                                                                                                                                                +    parent?: any,
                                                                                                                                                +  );
                                                                                                                                                +
                                                                                                                                                +  override async importMapFunction(
                                                                                                                                                +    val,
                                                                                                                                                +    schemaField: EntitySchemaField,
                                                                                                                                                +    additional: { [key: string]: any },
                                                                                                                                                +  ) {
                                                                                                                                                +    return super.importMapFunction(additional?.[val], schemaField);
                                                                                                                                                +  }
                                                                                                                                                +
                                                                                                                                                +  override importIncompleteAdditionalConfigBadge(col: ColumnMapping): string {
                                                                                                                                                +    if (!col.additional) {
                                                                                                                                                +      return "?";
                                                                                                                                                +    }
                                                                                                                                                +    const unmappedValues = Object.values(col.additional).filter(
                                                                                                                                                +      (v) => v === undefined,
                                                                                                                                                +    );
                                                                                                                                                +    if (unmappedValues.length > 0) {
                                                                                                                                                +      return unmappedValues.length.toString();
                                                                                                                                                +    }
                                                                                                                                                +    return undefined;
                                                                                                                                                +  }
                                                                                                                                                +}
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + + + + + + + + + +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                results matching ""

                                                                                                                                                +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +

                                                                                                                                                  No results matching ""

                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/DuplicateEnumOptionException.html b/documentation/classes/DuplicateEnumOptionException.html new file mode 100644 index 0000000000..15eca486e4 --- /dev/null +++ b/documentation/classes/DuplicateEnumOptionException.html @@ -0,0 +1,357 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                  +
                                                                                                                                                  + + +
                                                                                                                                                  +
                                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                                  +
                                                                                                                                                  +

                                                                                                                                                  +

                                                                                                                                                  File

                                                                                                                                                  +

                                                                                                                                                  +

                                                                                                                                                  + src/app/core/basic-datatypes/configurable-enum/configurable-enum.ts +

                                                                                                                                                  + + +

                                                                                                                                                  +

                                                                                                                                                  Description

                                                                                                                                                  +

                                                                                                                                                  +

                                                                                                                                                  +

                                                                                                                                                  Error thrown when trying to add an option that already exists in the enum values.

                                                                                                                                                  + +

                                                                                                                                                  + +

                                                                                                                                                  +

                                                                                                                                                  Extends

                                                                                                                                                  +

                                                                                                                                                  +

                                                                                                                                                  + Error +

                                                                                                                                                  + + + + +
                                                                                                                                                  +

                                                                                                                                                  Constructor

                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                  +constructor(newOptionInput) +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + +
                                                                                                                                                  NameOptional
                                                                                                                                                  newOptionInput + No +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  + + + + + + + + +
                                                                                                                                                  + + +
                                                                                                                                                  +
                                                                                                                                                  import { Entity } from "../../entity/model/entity";
                                                                                                                                                  +import { DatabaseEntity } from "../../entity/database-entity.decorator";
                                                                                                                                                  +import { ConfigurableEnumValue } from "./configurable-enum.interface";
                                                                                                                                                  +import { DatabaseField } from "../../entity/database-field.decorator";
                                                                                                                                                  +import { Logging } from "../../logging/logging.service";
                                                                                                                                                  +
                                                                                                                                                  +@DatabaseEntity("ConfigurableEnum")
                                                                                                                                                  +export class ConfigurableEnum extends Entity {
                                                                                                                                                  +  @DatabaseField() values: ConfigurableEnumValue[] = [];
                                                                                                                                                  +
                                                                                                                                                  +  constructor(id?: string, values: ConfigurableEnumValue[] = []) {
                                                                                                                                                  +    super(id);
                                                                                                                                                  +    this.values = values;
                                                                                                                                                  +  }
                                                                                                                                                  +
                                                                                                                                                  +  /**
                                                                                                                                                  +   * Add a new valid option to the enum values, if it is not a duplicate or invalid.
                                                                                                                                                  +   * Returns the newly added option upon success.
                                                                                                                                                  +   * @param newOptionInput String or option object to be added
                                                                                                                                                  +   */
                                                                                                                                                  +  addOption(
                                                                                                                                                  +    newOptionInput: ConfigurableEnumValue | string,
                                                                                                                                                  +  ): ConfigurableEnumValue | undefined {
                                                                                                                                                  +    const option: ConfigurableEnumValue =
                                                                                                                                                  +      typeof newOptionInput === "string"
                                                                                                                                                  +        ? this.convertStringToOption(newOptionInput)
                                                                                                                                                  +        : newOptionInput;
                                                                                                                                                  +
                                                                                                                                                  +    if (!option || !(option?.id && option?.label)) {
                                                                                                                                                  +      Logging.debug(
                                                                                                                                                  +        "Trying to add invalid enum option",
                                                                                                                                                  +        newOptionInput,
                                                                                                                                                  +        option,
                                                                                                                                                  +      );
                                                                                                                                                  +      return;
                                                                                                                                                  +    }
                                                                                                                                                  +
                                                                                                                                                  +    // check for duplicates
                                                                                                                                                  +    if (this.values.some((v) => v.label === option.label)) {
                                                                                                                                                  +      throw new DuplicateEnumOptionException(newOptionInput);
                                                                                                                                                  +    }
                                                                                                                                                  +    if (this.values.some((v) => v.id === option.id)) {
                                                                                                                                                  +      option.id = option.id + "_";
                                                                                                                                                  +    }
                                                                                                                                                  +
                                                                                                                                                  +    this.values.push(option);
                                                                                                                                                  +    return option;
                                                                                                                                                  +  }
                                                                                                                                                  +
                                                                                                                                                  +  private convertStringToOption(
                                                                                                                                                  +    newOption: string,
                                                                                                                                                  +  ): ConfigurableEnumValue | undefined {
                                                                                                                                                  +    newOption = newOption.trim();
                                                                                                                                                  +    if (newOption.length === 0) {
                                                                                                                                                  +      return;
                                                                                                                                                  +    }
                                                                                                                                                  +
                                                                                                                                                  +    return {
                                                                                                                                                  +      id: newOption.toUpperCase(),
                                                                                                                                                  +      label: newOption,
                                                                                                                                                  +    };
                                                                                                                                                  +  }
                                                                                                                                                  +}
                                                                                                                                                  +
                                                                                                                                                  +/**
                                                                                                                                                  + * Error thrown when trying to add an option that already exists in the enum values.
                                                                                                                                                  + */
                                                                                                                                                  +export class DuplicateEnumOptionException extends Error {
                                                                                                                                                  +  constructor(newOptionInput) {
                                                                                                                                                  +    super("Enum Option already exists");
                                                                                                                                                  +
                                                                                                                                                  +    this["newOptionInput"] = newOptionInput;
                                                                                                                                                  +  }
                                                                                                                                                  +}
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                  +
                                                                                                                                                  +

                                                                                                                                                  results matching ""

                                                                                                                                                  +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +

                                                                                                                                                    No results matching ""

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Entity.html b/documentation/classes/Entity.html new file mode 100644 index 0000000000..6623a883e8 --- /dev/null +++ b/documentation/classes/Entity.html @@ -0,0 +1,2279 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                    +
                                                                                                                                                    + + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                                    +
                                                                                                                                                    +

                                                                                                                                                    +

                                                                                                                                                    File

                                                                                                                                                    +

                                                                                                                                                    +

                                                                                                                                                    + src/app/core/entity/model/entity.ts +

                                                                                                                                                    + + +

                                                                                                                                                    +

                                                                                                                                                    Description

                                                                                                                                                    +

                                                                                                                                                    +

                                                                                                                                                    +

                                                                                                                                                    "Entity" is a base class for all domain model classes. +It implements the basic general properties and methods that are required for all Entity types +e.g. supporting the Entity Schema system or basic database logic.

                                                                                                                                                    +

                                                                                                                                                    Entity classes do not deal with database actions, use EntityMapperService with its find/save/delete functions.

                                                                                                                                                    +

                                                                                                                                                    Do not use the Entity class directly. Instead, implement your own Entity types, writing classes that extend "Entity". +A How-To Guide on how to implement your own types is available:

                                                                                                                                                    + + +

                                                                                                                                                    + + + + +
                                                                                                                                                    +

                                                                                                                                                    Index

                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    +
                                                                                                                                                    Properties
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    Methods
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    Accessors
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Constructor

                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                    +constructor(id: string) +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Creates an entity object with the given id. This id is final and won't be changeable after this object has been +created.

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                    id + string + + No + +

                                                                                                                                                    a unique id for this entity; if no id is passed a uuid is generated automatically

                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + +

                                                                                                                                                    + Properties +

                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + Optional + _isCustomizedType + + +
                                                                                                                                                    + Type : boolean + +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    True if this type's schema has been customized dynamically from the config.

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + + _rev + + +
                                                                                                                                                    + Type : string + +
                                                                                                                                                    + Decorators : +
                                                                                                                                                    + + @DatabaseField({anonymize: 'retain'})
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    internal database doc revision, used to detect conflicts by PouchDB/CouchDB

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + + anonymized + + +
                                                                                                                                                    + Type : boolean + +
                                                                                                                                                    + Decorators : +
                                                                                                                                                    + + @DatabaseField({anonymize: 'retain'})
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Whether this entity has been anonymized and therefore cannot be re-activated.

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + Optional + blockComponent + + +
                                                                                                                                                    + Type : string + +
                                                                                                                                                    + +
                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + color + + +
                                                                                                                                                    + Type : string + +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    color used for to highlight this entity type across the app

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + + created + + +
                                                                                                                                                    + Type : UpdateMetadata + +
                                                                                                                                                    + Decorators : +
                                                                                                                                                    + + @DatabaseField({anonymize: 'retain'})
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + ENTITY_TYPE + + +
                                                                                                                                                    + Type : string + +
                                                                                                                                                    + Default value : "Entity" +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    The entity's type. +In classes extending Entity this is usually overridden by the class annotation @DatabaseEntity('NewEntity'). +The type needs to be used as routing path in lower case. The routing path can be defined in the configuration file.

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + hasPII + + +
                                                                                                                                                    + Type : boolean + +
                                                                                                                                                    + Default value : false +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    whether this entity type can contain "personally identifiable information" (PII) +and therefore should follow strict data protection requirements +and offer a function to anonymize records.

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + icon + + +
                                                                                                                                                    + Type : IconName + +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    icon id used for this entity

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + + inactive + + +
                                                                                                                                                    + Type : boolean + +
                                                                                                                                                    + Decorators : +
                                                                                                                                                    + + @DatabaseField({anonymize: 'retain'})
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + schema + + +
                                                                                                                                                    + Type : EntitySchema + +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    EntitySchema defining property transformations from/to the database. +This is auto-generated from the property annotations @DatabaseField().

                                                                                                                                                    +

                                                                                                                                                    see /additional-documentation/how-to-guides/create-a-new-entity-type.html

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + toStringAttributes + + +
                                                                                                                                                    + Type : [] + +
                                                                                                                                                    + Default value : ["entityId"] +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Defining which attribute values of an entity should be shown in the .toString() method.

                                                                                                                                                    +

                                                                                                                                                    The default is the ID of the entity (entityId). +This can be overwritten in subclasses or through the config.

                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + + updated + + +
                                                                                                                                                    + Type : UpdateMetadata + +
                                                                                                                                                    + Decorators : +
                                                                                                                                                    + + @DatabaseField({anonymize: 'retain'})
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + +

                                                                                                                                                    + Methods +

                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + assertValid + + +
                                                                                                                                                    +assertValid() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Checks if the entity is valid and if the check fails, throws an error explaining the failed check.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : void + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Public + copy + + +
                                                                                                                                                    + + copy(generateNewId: boolean) +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Shallow copy of the entity. +The resulting entity will be of the same type as this +(taking into account subclassing)

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptionalDefault value
                                                                                                                                                    generateNewId + boolean + + No + + false +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + createPrefixedId + + +
                                                                                                                                                    + + createPrefixedId(type: string, id: string) +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Create a prefixed id by adding the type prefix if it isn't already part of the given id.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                    type + string + + No + +

                                                                                                                                                    The type prefix to be added.

                                                                                                                                                    + +
                                                                                                                                                    id + string + + No + +

                                                                                                                                                    The id to be extended with a prefix.

                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + extractEntityIdFromId + + +
                                                                                                                                                    + + extractEntityIdFromId(id: string) +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Extract entityId without prefix.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                    id + string + + No + +

                                                                                                                                                    An entity's id including prefix.

                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Static + extractTypeFromId + + +
                                                                                                                                                    + + extractTypeFromId(id: string) +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Extract the ENTITY_TYPE from an id.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                    id + string + + No + +

                                                                                                                                                    An entity's id including prefix.

                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Public + getColor + + +
                                                                                                                                                    + + getColor() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Used by some generic UI components to set the color for the entity instance. +Override this method as needed.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + getConstructor + + +
                                                                                                                                                    +getConstructor() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Get the class (Entity or the actual subclass of the instance) to call static methods on the correct class considering inheritance

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : EntityConstructor<> + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Public + getId + + +
                                                                                                                                                    + + getId(withoutPrefix) +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Returns the id of this entity.

                                                                                                                                                    +

                                                                                                                                                    Note that an id is final and can't be changed after the object has been instantiated, hence there is no +setId() method.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameOptionalDefault value
                                                                                                                                                    withoutPrefix + No + + false +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    +

                                                                                                                                                    the unique id of this entity

                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + getSchema + + +
                                                                                                                                                    +getSchema() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Get the entity schema of this class

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : EntitySchema + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Public + getType + + +
                                                                                                                                                    + + getType() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Returns the type which is used to categorize this entity in the database.

                                                                                                                                                    +

                                                                                                                                                    Important: Do not overwrite this method! Types are handled internally.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    +

                                                                                                                                                    the entity's type (which is the class name).

                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + + Public + getWarningLevel + + +
                                                                                                                                                    + + getWarningLevel() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Override getWarningLevel() to define when the entity is in a critical condition and should be color-coded +and highlighted in generic components of the UI.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : WarningLevel + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + +
                                                                                                                                                    +

                                                                                                                                                    + Accessors +

                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + label +
                                                                                                                                                    + getlabel() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    human-readable name/label of the entity in the UI

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    + setlabel(value: string) +
                                                                                                                                                    + +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptional
                                                                                                                                                    value + string + + No +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : void + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + labelPlural +
                                                                                                                                                    + getlabelPlural() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    human-readable label for uses of plural of the entity in the UI

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    + setlabelPlural(value: string) +
                                                                                                                                                    + +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptional
                                                                                                                                                    value + string + + No +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : void + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + route +
                                                                                                                                                    + getroute() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Base route of the entity (list/details) view for this entity type.

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : string + +
                                                                                                                                                    +
                                                                                                                                                    + setroute(value: string) +
                                                                                                                                                    + +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptional
                                                                                                                                                    value + string + + No +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : void + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + isNew +
                                                                                                                                                    + getisNew() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    whether this entity object is newly created and not yet saved to database

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : boolean + +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    + + isActive +
                                                                                                                                                    + getisActive() +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    Check, if this entity is considered active or archived.

                                                                                                                                                    +

                                                                                                                                                    This is taken from the property "inactive". +If the property doesn't exist, the default is true.

                                                                                                                                                    +

                                                                                                                                                    Some subclasses overwrite this functionality, but this logic is considered deprecated (!) now +and implementations have to make sure that "inactive" property takes precedence!

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Returns : boolean + +
                                                                                                                                                    +
                                                                                                                                                    + setisActive(isActive: boolean) +
                                                                                                                                                    + +
                                                                                                                                                    +

                                                                                                                                                    If existing entities with isActive: false exist, then these values are assigned to the property "active".

                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                    NameTypeOptional
                                                                                                                                                    isActive + boolean + + No +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + Returns : void + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + +
                                                                                                                                                    +
                                                                                                                                                    import { v4 as uuid } from "uuid";
                                                                                                                                                    +import { EntitySchema } from "../schema/entity-schema";
                                                                                                                                                    +import { DatabaseField } from "../database-field.decorator";
                                                                                                                                                    +import {
                                                                                                                                                    +  getWarningLevelColor,
                                                                                                                                                    +  WarningLevel,
                                                                                                                                                    +} from "../../../child-dev-project/warning-level";
                                                                                                                                                    +import { IconName } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                    +import { UpdateMetadata } from "./update-metadata";
                                                                                                                                                    +
                                                                                                                                                    +/**
                                                                                                                                                    + * This represents a static class of type <T>.
                                                                                                                                                    + * It can be used for passing a class from which new objects should be created.
                                                                                                                                                    + * It can also be used to check the ENTITY_TYPE of a class
                                                                                                                                                    + * For example usage check the {@link EntityMapperService}.
                                                                                                                                                    + */
                                                                                                                                                    +export type EntityConstructor<T extends Entity = Entity> = (new (
                                                                                                                                                    +  id?: string,
                                                                                                                                                    +) => T) &
                                                                                                                                                    +  typeof Entity;
                                                                                                                                                    +
                                                                                                                                                    +/**
                                                                                                                                                    + * "Entity" is a base class for all domain model classes.
                                                                                                                                                    + * It implements the basic general properties and methods that are required for all Entity types
                                                                                                                                                    + * e.g. supporting the Entity Schema system or basic database logic.
                                                                                                                                                    + *
                                                                                                                                                    + * Entity classes do not deal with database actions, use {@link EntityMapperService} with its find/save/delete functions.
                                                                                                                                                    + *
                                                                                                                                                    + * Do not use the Entity class directly. Instead, implement your own Entity types, writing classes that extend "Entity".
                                                                                                                                                    + * A How-To Guide on how to implement your own types is available:
                                                                                                                                                    + * - [How to Create a new Entity Type]{@link /additional-documentation/how-to-guides/create-a-new-entity-type.html}
                                                                                                                                                    + */
                                                                                                                                                    +export class Entity {
                                                                                                                                                    +  /**
                                                                                                                                                    +   * The entity's type.
                                                                                                                                                    +   * In classes extending Entity this is usually overridden by the class annotation `@DatabaseEntity('NewEntity')`.
                                                                                                                                                    +   * The type needs to be used as routing path in lower case. The routing path can be defined in the configuration file.
                                                                                                                                                    +   */
                                                                                                                                                    +  static ENTITY_TYPE = "Entity";
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * EntitySchema defining property transformations from/to the database.
                                                                                                                                                    +   * This is auto-generated from the property annotations `@DatabaseField()`.
                                                                                                                                                    +   *
                                                                                                                                                    +   * see {@link /additional-documentation/how-to-guides/create-a-new-entity-type.html}
                                                                                                                                                    +   */
                                                                                                                                                    +  static schema: EntitySchema;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * True if this type's schema has been customized dynamically from the config.
                                                                                                                                                    +   */
                                                                                                                                                    +  static _isCustomizedType?: boolean; // todo should be private or renamed to "isCustomizedType"
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Defining which attribute values of an entity should be shown in the `.toString()` method.
                                                                                                                                                    +   *
                                                                                                                                                    +   * The default is the ID of the entity (`entityId`).
                                                                                                                                                    +   * This can be overwritten in subclasses or through the config.
                                                                                                                                                    +   */
                                                                                                                                                    +  static toStringAttributes = ["entityId"];
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * human-readable name/label of the entity in the UI
                                                                                                                                                    +   */
                                                                                                                                                    +  static get label(): string {
                                                                                                                                                    +    return this._label ?? this.ENTITY_TYPE;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  static set label(value: string) {
                                                                                                                                                    +    this._label = value;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  private static _label: string;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * human-readable label for uses of plural of the entity in the UI
                                                                                                                                                    +   */
                                                                                                                                                    +  static get labelPlural(): string {
                                                                                                                                                    +    return this._labelPlural ?? this.label;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  static set labelPlural(value: string) {
                                                                                                                                                    +    this._labelPlural = value;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  private static _labelPlural: string;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * icon id used for this entity
                                                                                                                                                    +   */
                                                                                                                                                    +  static icon: IconName;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * color used for to highlight this entity type across the app
                                                                                                                                                    +   */
                                                                                                                                                    +  static color: string;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Base route of the entity (list/details) view for this entity type.
                                                                                                                                                    +   */
                                                                                                                                                    +  static get route(): string {
                                                                                                                                                    +    let route = this._route ?? this.ENTITY_TYPE.toLowerCase();
                                                                                                                                                    +    if (!route.startsWith("/")) {
                                                                                                                                                    +      route = "/" + route;
                                                                                                                                                    +    }
                                                                                                                                                    +    return route;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  static set route(value: string) {
                                                                                                                                                    +    this._route = value;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  private static _route: string;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Extract the ENTITY_TYPE from an id.
                                                                                                                                                    +   * @param id An entity's id including prefix.
                                                                                                                                                    +   */
                                                                                                                                                    +  static extractTypeFromId(id: string): string {
                                                                                                                                                    +    const split = id.indexOf(":");
                                                                                                                                                    +    return id.substring(0, split);
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Extract entityId without prefix.
                                                                                                                                                    +   * @param id An entity's id including prefix.
                                                                                                                                                    +   */
                                                                                                                                                    +  static extractEntityIdFromId(id: string): string {
                                                                                                                                                    +    const split = id.indexOf(":");
                                                                                                                                                    +    return id.substring(split + 1);
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Create a prefixed id by adding the type prefix if it isn't already part of the given id.
                                                                                                                                                    +   * @param type The type prefix to be added.
                                                                                                                                                    +   * @param id The id to be extended with a prefix.
                                                                                                                                                    +   */
                                                                                                                                                    +  static createPrefixedId(type: string, id: string): string {
                                                                                                                                                    +    id = String(id);
                                                                                                                                                    +    const prefix = type + ":";
                                                                                                                                                    +    if (!id.startsWith(prefix)) {
                                                                                                                                                    +      return prefix + id;
                                                                                                                                                    +    } else {
                                                                                                                                                    +      return id;
                                                                                                                                                    +    }
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  static blockComponent?: string;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * whether this entity type can contain "personally identifiable information" (PII)
                                                                                                                                                    +   * and therefore should follow strict data protection requirements
                                                                                                                                                    +   * and offer a function to anonymize records.
                                                                                                                                                    +   */
                                                                                                                                                    +  static hasPII: boolean = false;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Internal database id.
                                                                                                                                                    +   * This is usually combined from the ENTITY_TYPE as a prefix with the entityId field `EntityType:entityId`
                                                                                                                                                    +   * @example "Entity:123"
                                                                                                                                                    +   */
                                                                                                                                                    +  @DatabaseField({ anonymize: "retain" }) private _id: string;
                                                                                                                                                    +
                                                                                                                                                    +  /** internal database doc revision, used to detect conflicts by PouchDB/CouchDB */
                                                                                                                                                    +  @DatabaseField({ anonymize: "retain" }) _rev: string;
                                                                                                                                                    +
                                                                                                                                                    +  @DatabaseField({
                                                                                                                                                    +    anonymize: "retain",
                                                                                                                                                    +  })
                                                                                                                                                    +  created: UpdateMetadata;
                                                                                                                                                    +
                                                                                                                                                    +  @DatabaseField({
                                                                                                                                                    +    anonymize: "retain",
                                                                                                                                                    +  })
                                                                                                                                                    +  updated: UpdateMetadata;
                                                                                                                                                    +
                                                                                                                                                    +  @DatabaseField({ anonymize: "retain" })
                                                                                                                                                    +  inactive: boolean;
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Whether this entity has been anonymized and therefore cannot be re-activated.
                                                                                                                                                    +   */
                                                                                                                                                    +  @DatabaseField({ anonymize: "retain" })
                                                                                                                                                    +  anonymized: boolean;
                                                                                                                                                    +
                                                                                                                                                    +  /** whether this entity object is newly created and not yet saved to database */
                                                                                                                                                    +  get isNew(): boolean {
                                                                                                                                                    +    return !this._rev;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /** actual id without prefix */
                                                                                                                                                    +  private get entityId(): string {
                                                                                                                                                    +    return Entity.extractEntityIdFromId(this._id);
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Set id without prefix.
                                                                                                                                                    +   * @param newEntityId The new id without prefix.
                                                                                                                                                    +   */
                                                                                                                                                    +  private set entityId(newEntityId: string) {
                                                                                                                                                    +    this._id = Entity.createPrefixedId(this.getType(), newEntityId);
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Check, if this entity is considered active or archived.
                                                                                                                                                    +   *
                                                                                                                                                    +   * This is taken from the property "inactive".
                                                                                                                                                    +   * If the property doesn't exist, the default is `true`.
                                                                                                                                                    +   *
                                                                                                                                                    +   * Some subclasses overwrite this functionality, but this logic is considered deprecated (!) now
                                                                                                                                                    +   * and implementations have to make sure that "inactive" property takes precedence!
                                                                                                                                                    +   */
                                                                                                                                                    +  get isActive(): boolean {
                                                                                                                                                    +    if (this.inactive !== undefined) {
                                                                                                                                                    +      return !this.inactive;
                                                                                                                                                    +    }
                                                                                                                                                    +    if (this["active"] !== undefined) {
                                                                                                                                                    +      return this["active"];
                                                                                                                                                    +    }
                                                                                                                                                    +    return true;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * If existing entities with `isActive: false` exist, then these values are assigned to the property "active".
                                                                                                                                                    +   * @param isActive
                                                                                                                                                    +   */
                                                                                                                                                    +  set isActive(isActive: boolean) {
                                                                                                                                                    +    this["active"] = isActive;
                                                                                                                                                    +    this.inactive = !isActive;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Creates an entity object with the given id. This id is final and won't be changeable after this object has been
                                                                                                                                                    +   * created.
                                                                                                                                                    +   *
                                                                                                                                                    +   * @param id a unique id for this entity; if no id is passed a uuid is generated automatically
                                                                                                                                                    +   */
                                                                                                                                                    +  constructor(id: string = uuid()) {
                                                                                                                                                    +    this.entityId = id;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Get the class (Entity or the actual subclass of the instance) to call static methods on the correct class considering inheritance
                                                                                                                                                    +   */
                                                                                                                                                    +  getConstructor(): EntityConstructor<this> {
                                                                                                                                                    +    return this.constructor as EntityConstructor<this>;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Get the entity schema of this class
                                                                                                                                                    +   */
                                                                                                                                                    +  getSchema(): EntitySchema {
                                                                                                                                                    +    return this.getConstructor().schema;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Returns the id of this entity.
                                                                                                                                                    +   *
                                                                                                                                                    +   * Note that an id is final and can't be changed after the object has been instantiated, hence there is no
                                                                                                                                                    +   * <code>setId()</code> method.
                                                                                                                                                    +   *
                                                                                                                                                    +   * @returns {string} the unique id of this entity
                                                                                                                                                    +   */
                                                                                                                                                    +  public getId(withoutPrefix = false): string {
                                                                                                                                                    +    return withoutPrefix ? this.entityId : this._id;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Returns the type which is used to categorize this entity in the database.
                                                                                                                                                    +   *
                                                                                                                                                    +   * <b>Important: Do not overwrite this method! Types are handled internally.</b>
                                                                                                                                                    +   *
                                                                                                                                                    +   * @returns {string} the entity's type (which is the class name).
                                                                                                                                                    +   */
                                                                                                                                                    +  public getType(): string {
                                                                                                                                                    +    return this.getConstructor().ENTITY_TYPE;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Returns a string representation or summary of the instance.
                                                                                                                                                    +   * This can be configured with the static `toStringAttributes` for each subclass.
                                                                                                                                                    +   *
                                                                                                                                                    +   * @returns {string} the instance's string representation.
                                                                                                                                                    +   */
                                                                                                                                                    +  public toString(): string {
                                                                                                                                                    +    if (
                                                                                                                                                    +      this.anonymized &&
                                                                                                                                                    +      this.getConstructor().toStringAttributes.every(
                                                                                                                                                    +        (attr) => this[attr] === undefined,
                                                                                                                                                    +      )
                                                                                                                                                    +    ) {
                                                                                                                                                    +      return $localize`:Entity.toString fallback for anonymized record:[anonymized ${
                                                                                                                                                    +        this.getConstructor().label
                                                                                                                                                    +      }]`;
                                                                                                                                                    +    }
                                                                                                                                                    +
                                                                                                                                                    +    return this.getConstructor()
                                                                                                                                                    +      .toStringAttributes.map((attr) => this[attr])
                                                                                                                                                    +      .join(" ");
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Used by some generic UI components to set the color for the entity instance.
                                                                                                                                                    +   * Override this method as needed.
                                                                                                                                                    +   */
                                                                                                                                                    +  public getColor(): string {
                                                                                                                                                    +    return getWarningLevelColor(this.getWarningLevel());
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Override getWarningLevel() to define when the entity is in a critical condition and should be color-coded
                                                                                                                                                    +   * and highlighted in generic components of the UI.
                                                                                                                                                    +   */
                                                                                                                                                    +  public getWarningLevel(): WarningLevel {
                                                                                                                                                    +    return WarningLevel.NONE;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Shallow copy of the entity.
                                                                                                                                                    +   * The resulting entity will be of the same type as this
                                                                                                                                                    +   * (taking into account subclassing)
                                                                                                                                                    +   */
                                                                                                                                                    +  public copy(generateNewId: boolean = false): this {
                                                                                                                                                    +    const other = new (this.getConstructor())(this._id);
                                                                                                                                                    +    Object.assign(other, this);
                                                                                                                                                    +
                                                                                                                                                    +    if (generateNewId) {
                                                                                                                                                    +      delete other._rev;
                                                                                                                                                    +      other.entityId = uuid();
                                                                                                                                                    +    }
                                                                                                                                                    +
                                                                                                                                                    +    return other;
                                                                                                                                                    +  }
                                                                                                                                                    +
                                                                                                                                                    +  /**
                                                                                                                                                    +   * Checks if the entity is valid and if the check fails, throws an error explaining the failed check.
                                                                                                                                                    +   */
                                                                                                                                                    +  assertValid(): void {
                                                                                                                                                    +    return;
                                                                                                                                                    +  }
                                                                                                                                                    +}
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                    +
                                                                                                                                                    +

                                                                                                                                                    results matching ""

                                                                                                                                                    +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      No results matching ""

                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/EntityFilter.html b/documentation/classes/EntityFilter.html new file mode 100644 index 0000000000..100a1160e0 --- /dev/null +++ b/documentation/classes/EntityFilter.html @@ -0,0 +1,895 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                      +
                                                                                                                                                      + + +
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      +

                                                                                                                                                      File

                                                                                                                                                      +

                                                                                                                                                      +

                                                                                                                                                      + src/app/core/filter/filters/entityFilter.ts +

                                                                                                                                                      + + + +

                                                                                                                                                      +

                                                                                                                                                      Extends

                                                                                                                                                      +

                                                                                                                                                      +

                                                                                                                                                      + SelectableFilter +

                                                                                                                                                      + + + +
                                                                                                                                                      +

                                                                                                                                                      Index

                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      +
                                                                                                                                                      Properties
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      Methods
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +

                                                                                                                                                      Constructor

                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                      +constructor(name: string, label: string, filterEntities: Entity[]) +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      NameTypeOptional
                                                                                                                                                      name + string + + No +
                                                                                                                                                      label + string + + No +
                                                                                                                                                      filterEntities + Entity[] + + No +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      + +

                                                                                                                                                      + Properties +

                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + Public + + label + + +
                                                                                                                                                      + Type : string + +
                                                                                                                                                      + Default value : name +
                                                                                                                                                      +
                                                                                                                                                      Inherited from Filter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in Filter:100 +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      The user-friendly label describing this filter-selection +(optional, defaults to the name of the selection)
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + Public + + name + + +
                                                                                                                                                      + Type : string + +
                                                                                                                                                      +
                                                                                                                                                      Inherited from Filter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in Filter:98 +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      The name or id describing this filter
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + Public + options + + +
                                                                                                                                                      + Type : FilterSelectionOption<T>[] + +
                                                                                                                                                      +
                                                                                                                                                      Inherited from SelectableFilter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in SelectableFilter:99 +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      An array of different filtering variants to chose between
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + component + + +
                                                                                                                                                      + Type : Type<any> + +
                                                                                                                                                      + Default value : ListFilterComponent +
                                                                                                                                                      +
                                                                                                                                                      Inherited from Filter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in Filter:35 +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      The component used to display filter option to the user.

                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + selectedOptionChange + + +
                                                                                                                                                      + Default value : new EventEmitter<string[]>() +
                                                                                                                                                      +
                                                                                                                                                      Inherited from Filter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in Filter:45 +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      Triggered when this filter changes value +(e.g. when the user selects a new value in a FilterComponent).

                                                                                                                                                      +

                                                                                                                                                      This is part of the filter object because dynamic filter components can't expose @Outputs

                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + Public + selectedOptionValues + + +
                                                                                                                                                      + Type : string[] + +
                                                                                                                                                      + Default value : [] +
                                                                                                                                                      +
                                                                                                                                                      Inherited from Filter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in Filter:37 +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      + +

                                                                                                                                                      + Methods +

                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + Static + generateOptions + + +
                                                                                                                                                      + + generateOptions(valuesToMatchAsOptions: (string | number)[], attributeName: string) +
                                                                                                                                                      +
                                                                                                                                                      Inherited from SelectableFilter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in SelectableFilter:77 +
                                                                                                                                                      +
                                                                                                                                                      + Type parameters : +
                                                                                                                                                        +
                                                                                                                                                      • T
                                                                                                                                                      • +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      Generate filter options dynamically from the given value to be matched.

                                                                                                                                                      +

                                                                                                                                                      This is a utility function to make it easier to generate FilterSelectionOptions for standard cases +if you simply want each option to filter items having the given attribute matching different values. +If you have more sophisticated filtering needs, use the constructor to set FilterSelectionOptions that +you created yourself.

                                                                                                                                                      +Example :
                                                                                                                                                         A separate FilterSelectionOption is created for each value with a filter
                                                                                                                                                      +   that is true of a data item's property exactly matches that value.
                                                                                                                                                      + +
                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                      valuesToMatchAsOptions + (string | number)[] + + No + +

                                                                                                                                                      An array of values to be matched. +A separate FilterSelectionOption is created for each value with a filter +that is true of a data item's property exactly matches that value.

                                                                                                                                                      + +
                                                                                                                                                      attributeName + string + + No + +

                                                                                                                                                      The name of the property of a data item that is compared to the value in the filter function.

                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + Returns : FilterSelectionOption[] + +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + Public + getFilter + + +
                                                                                                                                                      + + getFilter() +
                                                                                                                                                      +
                                                                                                                                                      Inherited from Filter +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      Defined in Filter:120 +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      Get the filter query for the given option. +If the given key is undefined or invalid, the returned filter matches any elements.

                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      + Returns : DataFilter<T> + +
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      + + + getOption + + +
                                                                                                                                                      +getOption(key: string) +
                                                                                                                                                      +
                                                                                                                                                      Inherited from SelectableFilter +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +

                                                                                                                                                      Get the full filter option by its key.

                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                      key + string + + No + +

                                                                                                                                                      The identifier of the requested option

                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + + + + + +
                                                                                                                                                      + + +
                                                                                                                                                      +
                                                                                                                                                      import { Entity } from "../../entity/model/entity";
                                                                                                                                                      +import { FilterSelectionOption, SelectableFilter } from "./filters";
                                                                                                                                                      +
                                                                                                                                                      +export class EntityFilter<T extends Entity> extends SelectableFilter<T> {
                                                                                                                                                      +  constructor(name: string, label: string, filterEntities: Entity[]) {
                                                                                                                                                      +    filterEntities.sort((a, b) => a.toString().localeCompare(b.toString()));
                                                                                                                                                      +    const options: FilterSelectionOption<T>[] = filterEntities.map(
                                                                                                                                                      +      (filterEntity) => ({
                                                                                                                                                      +        key: filterEntity.getId(),
                                                                                                                                                      +        label: filterEntity.toString(),
                                                                                                                                                      +        filter: {
                                                                                                                                                      +          $or: [
                                                                                                                                                      +            { [name]: filterEntity.getId() },
                                                                                                                                                      +            { [name]: { $elemMatch: { $eq: filterEntity.getId() } } },
                                                                                                                                                      +          ],
                                                                                                                                                      +        },
                                                                                                                                                      +      }),
                                                                                                                                                      +    );
                                                                                                                                                      +    super(name, options, label);
                                                                                                                                                      +  }
                                                                                                                                                      +}
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      results matching ""

                                                                                                                                                      +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +

                                                                                                                                                        No results matching ""

                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/EntityRegistry.html b/documentation/classes/EntityRegistry.html new file mode 100644 index 0000000000..4b70387502 --- /dev/null +++ b/documentation/classes/EntityRegistry.html @@ -0,0 +1,692 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                        +
                                                                                                                                                        + + +
                                                                                                                                                        +
                                                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                                                        +
                                                                                                                                                        +

                                                                                                                                                        +

                                                                                                                                                        File

                                                                                                                                                        +

                                                                                                                                                        +

                                                                                                                                                        + src/app/core/entity/database-entity.decorator.ts +

                                                                                                                                                        + + + +

                                                                                                                                                        +

                                                                                                                                                        Extends

                                                                                                                                                        +

                                                                                                                                                        +

                                                                                                                                                        + Registry +

                                                                                                                                                        + + + +
                                                                                                                                                        +

                                                                                                                                                        Index

                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                        +
                                                                                                                                                        Methods
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        + + + +
                                                                                                                                                        + +

                                                                                                                                                        + Methods +

                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        + + + getEntityTypes + + +
                                                                                                                                                        +getEntityTypes(onlyUserFacing) +
                                                                                                                                                        + +
                                                                                                                                                        +

                                                                                                                                                        Get an array of entity types, optionally filtered to exclude internal, administrative types.

                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        NameOptionalDefault valueDescription
                                                                                                                                                        onlyUserFacing + No + + false + +

                                                                                                                                                        Whether to only include types that are explicitly defined and customized in the config, from which we infer they are user-facing.

                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + Returns : literal type[] + +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        + + + Public + add + + +
                                                                                                                                                        + + add(key: string, mapping: T) +
                                                                                                                                                        +
                                                                                                                                                        Inherited from Registry +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        Defined in Registry:17 +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        NameTypeOptional
                                                                                                                                                        key + string + + No +
                                                                                                                                                        mapping + T + + No +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + Returns : void + +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        + + + Public + addAll + + +
                                                                                                                                                        + + addAll(tuples: []) +
                                                                                                                                                        +
                                                                                                                                                        Inherited from Registry +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        Defined in Registry:31 +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        NameTypeOptional
                                                                                                                                                        tuples + [] + + No +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + Returns : void + +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        + + + Public + allowDuplicates + + +
                                                                                                                                                        + + allowDuplicates() +
                                                                                                                                                        +
                                                                                                                                                        Inherited from Registry +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        Defined in Registry:49 +
                                                                                                                                                        +
                                                                                                                                                        +

                                                                                                                                                        Calling this will allow the same keys to be added multiple times without thrown errors. +This is useful for storybook where live-updates re-trigger the decorator while the registry is cached.

                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        + Returns : void + +
                                                                                                                                                        +
                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        + + + Public + + get + + +
                                                                                                                                                        + + get(key: string) +
                                                                                                                                                        +
                                                                                                                                                        Inherited from Registry +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        Defined in Registry:35 +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                        NameTypeOptional
                                                                                                                                                        key + string + + No +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + Returns : T + +
                                                                                                                                                        +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + + + + + +
                                                                                                                                                        + + +
                                                                                                                                                        +
                                                                                                                                                        import { Entity, EntityConstructor } from "./model/entity";
                                                                                                                                                        +import { Registry } from "../config/registry/dynamic-registry";
                                                                                                                                                        +import { getEntitySchema } from "./database-field.decorator";
                                                                                                                                                        +
                                                                                                                                                        +export class EntityRegistry extends Registry<EntityConstructor> {
                                                                                                                                                        +  /**
                                                                                                                                                        +   * Get an array of entity types, optionally filtered to exclude internal, administrative types.
                                                                                                                                                        +   * @param onlyUserFacing Whether to only include types that are explicitly defined and customized in the config, from which we infer they are user-facing.
                                                                                                                                                        +   */
                                                                                                                                                        +  getEntityTypes(
                                                                                                                                                        +    onlyUserFacing = false,
                                                                                                                                                        +  ): { key: string; value: EntityConstructor }[] {
                                                                                                                                                        +    let entities = Array.from(this.entries()).map(([key, value]) => ({
                                                                                                                                                        +      key,
                                                                                                                                                        +      value,
                                                                                                                                                        +    }));
                                                                                                                                                        +    if (onlyUserFacing) {
                                                                                                                                                        +      entities = entities.filter(({ key, value }) => value._isCustomizedType);
                                                                                                                                                        +    }
                                                                                                                                                        +    return entities;
                                                                                                                                                        +  }
                                                                                                                                                        +}
                                                                                                                                                        +
                                                                                                                                                        +export const entityRegistry = new EntityRegistry((key, constructor) => {
                                                                                                                                                        +  if (!(new constructor() instanceof Entity)) {
                                                                                                                                                        +    throw Error(
                                                                                                                                                        +      `Tried to register an entity-type that is not a subclass of Entity\n` +
                                                                                                                                                        +        `type: ${key}; constructor: ${constructor}`,
                                                                                                                                                        +    );
                                                                                                                                                        +  }
                                                                                                                                                        +});
                                                                                                                                                        +
                                                                                                                                                        +/**
                                                                                                                                                        + * Decorator (Annotation `@DatabaseEntity()`) to set the string ENTITY_TYPE to an Entity Type.
                                                                                                                                                        + * The entity should also be added to the {@link databaseEntities} array of the surrounding module.
                                                                                                                                                        + *
                                                                                                                                                        + * also see {@link /additional-documentation/how-to-guides/create-a-new-entity-type.html}
                                                                                                                                                        + *
                                                                                                                                                        + * @param entityType The string key for this Entity Type, used as id prefix.
                                                                                                                                                        + */
                                                                                                                                                        +export function DatabaseEntity(entityType: string) {
                                                                                                                                                        +  return (constructor) => {
                                                                                                                                                        +    entityRegistry.add(entityType, constructor);
                                                                                                                                                        +    constructor.ENTITY_TYPE = entityType;
                                                                                                                                                        +
                                                                                                                                                        +    // append parent schema definitions
                                                                                                                                                        +    const parentConstructor = Object.getPrototypeOf(constructor);
                                                                                                                                                        +    const schema = getEntitySchema(constructor);
                                                                                                                                                        +    parentConstructor.schema.forEach((value, key) => schema.set(key, value));
                                                                                                                                                        +  };
                                                                                                                                                        +}
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                        +
                                                                                                                                                        +

                                                                                                                                                        results matching ""

                                                                                                                                                        +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +

                                                                                                                                                          No results matching ""

                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/EventAttendance.html b/documentation/classes/EventAttendance.html new file mode 100644 index 0000000000..8fc6fc1c4d --- /dev/null +++ b/documentation/classes/EventAttendance.html @@ -0,0 +1,605 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                          +
                                                                                                                                                          + + +
                                                                                                                                                          +
                                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                                          +
                                                                                                                                                          +

                                                                                                                                                          +

                                                                                                                                                          File

                                                                                                                                                          +

                                                                                                                                                          +

                                                                                                                                                          + src/app/child-dev-project/attendance/model/event-attendance.ts +

                                                                                                                                                          + + +

                                                                                                                                                          +

                                                                                                                                                          Description

                                                                                                                                                          +

                                                                                                                                                          +

                                                                                                                                                          +

                                                                                                                                                          Simple relationship object to represent an individual child's status at an event including context information. +TODO overwork this concept to either be a sublass of Entity or not (at the moment it uses a lot of casting, e.g. to be used in the entity subrecord)

                                                                                                                                                          + +

                                                                                                                                                          + + + + +
                                                                                                                                                          +

                                                                                                                                                          Index

                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                          +
                                                                                                                                                          Properties
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          Methods
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                            +
                                                                                                                                                          • + Public + copy +
                                                                                                                                                          • +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          Accessors
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +

                                                                                                                                                          Constructor

                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                          +constructor(status: AttendanceStatusType, remarks: string) +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                          NameTypeOptional
                                                                                                                                                          status + AttendanceStatusType + + No +
                                                                                                                                                          remarks + string + + No +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          + +

                                                                                                                                                          + Properties +

                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                          + + + Static + DATA_TYPE + + +
                                                                                                                                                          + Type : string + +
                                                                                                                                                          + Default value : "event-attendance" +
                                                                                                                                                          + +
                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                          + + + + remarks + + +
                                                                                                                                                          + Type : string + +
                                                                                                                                                          + Decorators : +
                                                                                                                                                          + + @DatabaseField()
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          + +

                                                                                                                                                          + Methods +

                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                          + + + Public + copy + + +
                                                                                                                                                          + + copy() +
                                                                                                                                                          + +
                                                                                                                                                          + +
                                                                                                                                                          + Returns : EventAttendance + +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + + + + + +
                                                                                                                                                          +

                                                                                                                                                          + Accessors +

                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                          + + status +
                                                                                                                                                          + getstatus() +
                                                                                                                                                          + +
                                                                                                                                                          + setstatus(value) +
                                                                                                                                                          + +
                                                                                                                                                          + +
                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + +
                                                                                                                                                          NameOptional
                                                                                                                                                          value + No +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + Returns : void + +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + + +
                                                                                                                                                          +
                                                                                                                                                          import {
                                                                                                                                                          +  ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                          +  AttendanceStatusType,
                                                                                                                                                          +  NullAttendanceStatusType,
                                                                                                                                                          +} from "./attendance-status";
                                                                                                                                                          +import { DatabaseField } from "../../../core/entity/database-field.decorator";
                                                                                                                                                          +
                                                                                                                                                          +/**
                                                                                                                                                          + * Simple relationship object to represent an individual child's status at an event including context information.
                                                                                                                                                          + * TODO overwork this concept to either be a sublass of Entity or not (at the moment it uses a lot of casting, e.g. to be used in the entity subrecord)
                                                                                                                                                          + */
                                                                                                                                                          +export class EventAttendance {
                                                                                                                                                          +  static DATA_TYPE = "event-attendance";
                                                                                                                                                          +
                                                                                                                                                          +  private _status: AttendanceStatusType;
                                                                                                                                                          +  @DatabaseField({
                                                                                                                                                          +    dataType: "configurable-enum",
                                                                                                                                                          +    additional: ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                          +  })
                                                                                                                                                          +  get status(): AttendanceStatusType {
                                                                                                                                                          +    return this._status;
                                                                                                                                                          +  }
                                                                                                                                                          +
                                                                                                                                                          +  set status(value) {
                                                                                                                                                          +    if (typeof value === "object") {
                                                                                                                                                          +      if (value.isInvalidOption) {
                                                                                                                                                          +        value.shortName = "?";
                                                                                                                                                          +        value.countAs = NullAttendanceStatusType.countAs;
                                                                                                                                                          +      }
                                                                                                                                                          +      this._status = value;
                                                                                                                                                          +    } else {
                                                                                                                                                          +      this._status = NullAttendanceStatusType;
                                                                                                                                                          +    }
                                                                                                                                                          +  }
                                                                                                                                                          +
                                                                                                                                                          +  @DatabaseField() remarks: string;
                                                                                                                                                          +
                                                                                                                                                          +  constructor(
                                                                                                                                                          +    status: AttendanceStatusType = NullAttendanceStatusType,
                                                                                                                                                          +    remarks: string = "",
                                                                                                                                                          +  ) {
                                                                                                                                                          +    this.status = status;
                                                                                                                                                          +    this.remarks = remarks;
                                                                                                                                                          +  }
                                                                                                                                                          +
                                                                                                                                                          +  public copy(): EventAttendance {
                                                                                                                                                          +    return Object.assign(new EventAttendance(), this);
                                                                                                                                                          +  }
                                                                                                                                                          +}
                                                                                                                                                          +
                                                                                                                                                          +/**
                                                                                                                                                          + * A full registry of event-attendance entries for multiple participants.
                                                                                                                                                          + *
                                                                                                                                                          + * TODO: this class can become the basis for a more generic attendance data that is not hard-wired to Note entities.
                                                                                                                                                          + */
                                                                                                                                                          +export class EventAttendanceMap extends Map<string, EventAttendance> {
                                                                                                                                                          +  static DATA_TYPE = "event-attendance-map";
                                                                                                                                                          +
                                                                                                                                                          +  constructor() {
                                                                                                                                                          +    super();
                                                                                                                                                          +  }
                                                                                                                                                          +}
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                          +
                                                                                                                                                          +

                                                                                                                                                          results matching ""

                                                                                                                                                          +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +

                                                                                                                                                            No results matching ""

                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/EventAttendanceMap.html b/documentation/classes/EventAttendanceMap.html new file mode 100644 index 0000000000..51444312b9 --- /dev/null +++ b/documentation/classes/EventAttendanceMap.html @@ -0,0 +1,386 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                            +
                                                                                                                                                            + + +
                                                                                                                                                            +
                                                                                                                                                            + + + + + + + + + + + + + + + + +
                                                                                                                                                            +
                                                                                                                                                            +

                                                                                                                                                            +

                                                                                                                                                            File

                                                                                                                                                            +

                                                                                                                                                            +

                                                                                                                                                            + src/app/child-dev-project/attendance/model/event-attendance.ts +

                                                                                                                                                            + + +

                                                                                                                                                            +

                                                                                                                                                            Description

                                                                                                                                                            +

                                                                                                                                                            +

                                                                                                                                                            +

                                                                                                                                                            A full registry of event-attendance entries for multiple participants.

                                                                                                                                                            +

                                                                                                                                                            TODO: this class can become the basis for a more generic attendance data that is not hard-wired to Note entities.

                                                                                                                                                            + +

                                                                                                                                                            + +

                                                                                                                                                            +

                                                                                                                                                            Extends

                                                                                                                                                            +

                                                                                                                                                            +

                                                                                                                                                            + Map +

                                                                                                                                                            + + + +
                                                                                                                                                            +

                                                                                                                                                            Index

                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                            +
                                                                                                                                                            Properties
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            +

                                                                                                                                                            Constructor

                                                                                                                                                            + + + + + + + + + + +
                                                                                                                                                            +constructor() +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            + +

                                                                                                                                                            + Properties +

                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                            + + + Static + DATA_TYPE + + +
                                                                                                                                                            + Type : string + +
                                                                                                                                                            + Default value : "event-attendance-map" +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + + + + + + + +
                                                                                                                                                            + + +
                                                                                                                                                            +
                                                                                                                                                            import {
                                                                                                                                                            +  ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                            +  AttendanceStatusType,
                                                                                                                                                            +  NullAttendanceStatusType,
                                                                                                                                                            +} from "./attendance-status";
                                                                                                                                                            +import { DatabaseField } from "../../../core/entity/database-field.decorator";
                                                                                                                                                            +
                                                                                                                                                            +/**
                                                                                                                                                            + * Simple relationship object to represent an individual child's status at an event including context information.
                                                                                                                                                            + * TODO overwork this concept to either be a sublass of Entity or not (at the moment it uses a lot of casting, e.g. to be used in the entity subrecord)
                                                                                                                                                            + */
                                                                                                                                                            +export class EventAttendance {
                                                                                                                                                            +  static DATA_TYPE = "event-attendance";
                                                                                                                                                            +
                                                                                                                                                            +  private _status: AttendanceStatusType;
                                                                                                                                                            +  @DatabaseField({
                                                                                                                                                            +    dataType: "configurable-enum",
                                                                                                                                                            +    additional: ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                            +  })
                                                                                                                                                            +  get status(): AttendanceStatusType {
                                                                                                                                                            +    return this._status;
                                                                                                                                                            +  }
                                                                                                                                                            +
                                                                                                                                                            +  set status(value) {
                                                                                                                                                            +    if (typeof value === "object") {
                                                                                                                                                            +      if (value.isInvalidOption) {
                                                                                                                                                            +        value.shortName = "?";
                                                                                                                                                            +        value.countAs = NullAttendanceStatusType.countAs;
                                                                                                                                                            +      }
                                                                                                                                                            +      this._status = value;
                                                                                                                                                            +    } else {
                                                                                                                                                            +      this._status = NullAttendanceStatusType;
                                                                                                                                                            +    }
                                                                                                                                                            +  }
                                                                                                                                                            +
                                                                                                                                                            +  @DatabaseField() remarks: string;
                                                                                                                                                            +
                                                                                                                                                            +  constructor(
                                                                                                                                                            +    status: AttendanceStatusType = NullAttendanceStatusType,
                                                                                                                                                            +    remarks: string = "",
                                                                                                                                                            +  ) {
                                                                                                                                                            +    this.status = status;
                                                                                                                                                            +    this.remarks = remarks;
                                                                                                                                                            +  }
                                                                                                                                                            +
                                                                                                                                                            +  public copy(): EventAttendance {
                                                                                                                                                            +    return Object.assign(new EventAttendance(), this);
                                                                                                                                                            +  }
                                                                                                                                                            +}
                                                                                                                                                            +
                                                                                                                                                            +/**
                                                                                                                                                            + * A full registry of event-attendance entries for multiple participants.
                                                                                                                                                            + *
                                                                                                                                                            + * TODO: this class can become the basis for a more generic attendance data that is not hard-wired to Note entities.
                                                                                                                                                            + */
                                                                                                                                                            +export class EventAttendanceMap extends Map<string, EventAttendance> {
                                                                                                                                                            +  static DATA_TYPE = "event-attendance-map";
                                                                                                                                                            +
                                                                                                                                                            +  constructor() {
                                                                                                                                                            +    super();
                                                                                                                                                            +  }
                                                                                                                                                            +}
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                            +
                                                                                                                                                            +

                                                                                                                                                            results matching ""

                                                                                                                                                            +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +

                                                                                                                                                              No results matching ""

                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/EventNote.html b/documentation/classes/EventNote.html new file mode 100644 index 0000000000..3c87bb2582 --- /dev/null +++ b/documentation/classes/EventNote.html @@ -0,0 +1,360 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                              +
                                                                                                                                                              + + +
                                                                                                                                                              +
                                                                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                                                                              +
                                                                                                                                                              +

                                                                                                                                                              +

                                                                                                                                                              File

                                                                                                                                                              +

                                                                                                                                                              +

                                                                                                                                                              + src/app/child-dev-project/attendance/model/event-note.ts +

                                                                                                                                                              + + + + + + +
                                                                                                                                                              +

                                                                                                                                                              Index

                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                              +
                                                                                                                                                              Methods
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              + + + +
                                                                                                                                                              + +

                                                                                                                                                              + Methods +

                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                              + + + Static + + create + + +
                                                                                                                                                              + + create(date: Date, subject: string) +
                                                                                                                                                              + +
                                                                                                                                                              + +
                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                              NameTypeOptionalDefault value
                                                                                                                                                              date + Date + + No + +
                                                                                                                                                              subject + string + + No + + "" +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + Returns : EventNote + +
                                                                                                                                                              +
                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + + + + + +
                                                                                                                                                              + + +
                                                                                                                                                              +
                                                                                                                                                              import { DatabaseEntity } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                              +import { Note } from "../../notes/model/note";
                                                                                                                                                              +
                                                                                                                                                              +@DatabaseEntity("EventNote")
                                                                                                                                                              +export class EventNote extends Note {
                                                                                                                                                              +  static override create(date: Date, subject: string = ""): EventNote {
                                                                                                                                                              +    const instance = new EventNote();
                                                                                                                                                              +    instance.date = date;
                                                                                                                                                              +    instance.subject = subject;
                                                                                                                                                              +    return instance;
                                                                                                                                                              +  }
                                                                                                                                                              +}
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                              +
                                                                                                                                                              +

                                                                                                                                                              results matching ""

                                                                                                                                                              +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +

                                                                                                                                                                No results matching ""

                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/FileService.html b/documentation/classes/FileService.html new file mode 100644 index 0000000000..01b628a3e9 --- /dev/null +++ b/documentation/classes/FileService.html @@ -0,0 +1,895 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                +
                                                                                                                                                                + + +
                                                                                                                                                                +
                                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                                +
                                                                                                                                                                +

                                                                                                                                                                +

                                                                                                                                                                File

                                                                                                                                                                +

                                                                                                                                                                +

                                                                                                                                                                + src/app/features/file/file.service.ts +

                                                                                                                                                                + + +

                                                                                                                                                                +

                                                                                                                                                                Description

                                                                                                                                                                +

                                                                                                                                                                +

                                                                                                                                                                +

                                                                                                                                                                This service allow handles the logic for files/attachments. +Files can be uploaded, shown and removed.

                                                                                                                                                                + +

                                                                                                                                                                + + + + +
                                                                                                                                                                +

                                                                                                                                                                Index

                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                +
                                                                                                                                                                Methods
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +

                                                                                                                                                                Constructor

                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                + Protected + constructor(entityMapper: EntityMapperService, entities: EntityRegistry, syncState: SyncStateSubject) +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                NameTypeOptional
                                                                                                                                                                entityMapper + EntityMapperService + + No +
                                                                                                                                                                entities + EntityRegistry + + No +
                                                                                                                                                                syncState + SyncStateSubject + + No +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + + +
                                                                                                                                                                + +

                                                                                                                                                                + Methods +

                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                + + + Abstract + loadFile + + +
                                                                                                                                                                + + loadFile(entity: Entity, property: string) +
                                                                                                                                                                + +
                                                                                                                                                                + +
                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                NameTypeOptional
                                                                                                                                                                entity + Entity + + No +
                                                                                                                                                                property + string + + No +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + Returns : Observable<SafeUrl> + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                + + + Abstract + removeAllFiles + + +
                                                                                                                                                                + + removeAllFiles(entity: Entity) +
                                                                                                                                                                + +
                                                                                                                                                                +

                                                                                                                                                                Removes all files linked with an entity

                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                NameTypeOptional
                                                                                                                                                                entity + Entity + + No +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + Returns : Observable<any> + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                + + + Abstract + removeFile + + +
                                                                                                                                                                + + removeFile(entity: Entity, property: string) +
                                                                                                                                                                + +
                                                                                                                                                                +

                                                                                                                                                                Removes the file

                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                entity + Entity + + No + +
                                                                                                                                                                property + string + + No + +

                                                                                                                                                                of the entity which points to a file

                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + Returns : Observable<any> + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                + + + Abstract + showFile + + +
                                                                                                                                                                + + showFile(entity: Entity, property: string) +
                                                                                                                                                                + +
                                                                                                                                                                +

                                                                                                                                                                If a file is available, downloads this file and shows it in a new tab.

                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                entity + Entity + + No + +
                                                                                                                                                                property + string + + No + +

                                                                                                                                                                where a file previously has been uploaded

                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + Returns : void + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                + + + Abstract + uploadFile + + +
                                                                                                                                                                + + uploadFile(file: File, entity: Entity, property: string) +
                                                                                                                                                                + +
                                                                                                                                                                +

                                                                                                                                                                Uploads the file

                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                file + File + + No + +

                                                                                                                                                                to be uploaded

                                                                                                                                                                + +
                                                                                                                                                                entity + Entity + + No + +
                                                                                                                                                                property + string + + No + +

                                                                                                                                                                where the information about the file should be stored

                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + Returns : Observable<any> + +
                                                                                                                                                                +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + + + + + +
                                                                                                                                                                + + +
                                                                                                                                                                +
                                                                                                                                                                import { Entity, EntityConstructor } from "../../core/entity/model/entity";
                                                                                                                                                                +import { Observable } from "rxjs";
                                                                                                                                                                +import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                +import { EntityRegistry } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                +import { filter } from "rxjs/operators";
                                                                                                                                                                +import { Logging } from "../../core/logging/logging.service";
                                                                                                                                                                +import { SafeUrl } from "@angular/platform-browser";
                                                                                                                                                                +import { FileDatatype } from "./file.datatype";
                                                                                                                                                                +import { waitForChangeTo } from "../../core/session/session-states/session-utils";
                                                                                                                                                                +import { SyncState } from "../../core/session/session-states/sync-state.enum";
                                                                                                                                                                +import { SyncStateSubject } from "../../core/session/session-type";
                                                                                                                                                                +
                                                                                                                                                                +/**
                                                                                                                                                                + * This service allow handles the logic for files/attachments.
                                                                                                                                                                + * Files can be uploaded, shown and removed.
                                                                                                                                                                + */
                                                                                                                                                                +export abstract class FileService {
                                                                                                                                                                +  protected constructor(
                                                                                                                                                                +    protected entityMapper: EntityMapperService,
                                                                                                                                                                +    protected entities: EntityRegistry,
                                                                                                                                                                +    protected syncState: SyncStateSubject,
                                                                                                                                                                +  ) {
                                                                                                                                                                +    // TODO maybe registration is too late (only when component is rendered)
                                                                                                                                                                +    this.syncState
                                                                                                                                                                +      // Only start listening to changes once the initial sync has been completed
                                                                                                                                                                +      .pipe(waitForChangeTo(SyncState.COMPLETED))
                                                                                                                                                                +      .subscribe(() => this.deleteFilesOfDeletedEntities());
                                                                                                                                                                +  }
                                                                                                                                                                +
                                                                                                                                                                +  private deleteFilesOfDeletedEntities() {
                                                                                                                                                                +    const entitiesWithFiles = this.getEntitiesWithFileDataType();
                                                                                                                                                                +    entitiesWithFiles.forEach((entity) => {
                                                                                                                                                                +      this.entityMapper
                                                                                                                                                                +        .receiveUpdates(entity)
                                                                                                                                                                +        .pipe(filter(({ type }) => type === "remove"))
                                                                                                                                                                +        .subscribe(({ entity, type }) => {
                                                                                                                                                                +          this.removeAllFiles(entity).subscribe({
                                                                                                                                                                +            next: () => Logging.debug(`deleted all files of ${entity}`),
                                                                                                                                                                +            error: (err) =>
                                                                                                                                                                +              Logging.debug(`no files found for ${entity}: ${err}`),
                                                                                                                                                                +          });
                                                                                                                                                                +        });
                                                                                                                                                                +    });
                                                                                                                                                                +  }
                                                                                                                                                                +
                                                                                                                                                                +  private getEntitiesWithFileDataType() {
                                                                                                                                                                +    const entitiesWithFiles: EntityConstructor[] = [];
                                                                                                                                                                +    for (const entity of this.entities.values()) {
                                                                                                                                                                +      if (
                                                                                                                                                                +        this.entityHasFileProperty(entity) &&
                                                                                                                                                                +        !entitiesWithFiles.includes(entity)
                                                                                                                                                                +      ) {
                                                                                                                                                                +        entitiesWithFiles.push(entity);
                                                                                                                                                                +      }
                                                                                                                                                                +    }
                                                                                                                                                                +    return entitiesWithFiles;
                                                                                                                                                                +  }
                                                                                                                                                                +
                                                                                                                                                                +  private entityHasFileProperty(entity: EntityConstructor): boolean {
                                                                                                                                                                +    for (const prop of entity.schema.values()) {
                                                                                                                                                                +      if (prop.dataType === FileDatatype.dataType) {
                                                                                                                                                                +        return true;
                                                                                                                                                                +      }
                                                                                                                                                                +    }
                                                                                                                                                                +    return false;
                                                                                                                                                                +  }
                                                                                                                                                                +
                                                                                                                                                                +  /**
                                                                                                                                                                +   * Removes the file
                                                                                                                                                                +   * @param entity
                                                                                                                                                                +   * @param property of the entity which points to a file
                                                                                                                                                                +   */
                                                                                                                                                                +  abstract removeFile(entity: Entity, property: string): Observable<any>;
                                                                                                                                                                +
                                                                                                                                                                +  /**
                                                                                                                                                                +   * Removes all files linked with an entity
                                                                                                                                                                +   * @param entity
                                                                                                                                                                +   */
                                                                                                                                                                +  abstract removeAllFiles(entity: Entity): Observable<any>;
                                                                                                                                                                +
                                                                                                                                                                +  /**
                                                                                                                                                                +   * If a file is available, downloads this file and shows it in a new tab.
                                                                                                                                                                +   * @param entity
                                                                                                                                                                +   * @param property where a file previously has been uploaded
                                                                                                                                                                +   */
                                                                                                                                                                +  abstract showFile(entity: Entity, property: string): void;
                                                                                                                                                                +
                                                                                                                                                                +  abstract loadFile(entity: Entity, property: string): Observable<SafeUrl>;
                                                                                                                                                                +
                                                                                                                                                                +  /**
                                                                                                                                                                +   * Uploads the file
                                                                                                                                                                +   * @param file to be uploaded
                                                                                                                                                                +   * @param entity
                                                                                                                                                                +   * @param property where the information about the file should be stored
                                                                                                                                                                +   */
                                                                                                                                                                +  abstract uploadFile(
                                                                                                                                                                +    file: File,
                                                                                                                                                                +    entity: Entity,
                                                                                                                                                                +    property: string,
                                                                                                                                                                +  ): Observable<any>;
                                                                                                                                                                +}
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                +
                                                                                                                                                                +

                                                                                                                                                                results matching ""

                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  No results matching ""

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Filter.html b/documentation/classes/Filter.html new file mode 100644 index 0000000000..2d3172a8b9 --- /dev/null +++ b/documentation/classes/Filter.html @@ -0,0 +1,693 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  + + +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  +

                                                                                                                                                                  File

                                                                                                                                                                  +

                                                                                                                                                                  +

                                                                                                                                                                  + src/app/core/filter/filters/filters.ts +

                                                                                                                                                                  + + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Index

                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  Properties
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  Methods
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +

                                                                                                                                                                  Constructor

                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                  + Protected + constructor(name: string, label: string) +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                  name + string + + No +
                                                                                                                                                                  label + string + + No +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  + +

                                                                                                                                                                  + Properties +

                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  + + + component + + +
                                                                                                                                                                  + Type : Type<any> + +
                                                                                                                                                                  + Default value : ListFilterComponent +
                                                                                                                                                                  + +
                                                                                                                                                                  +

                                                                                                                                                                  The component used to display filter option to the user.

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  + + + Public + label + + +
                                                                                                                                                                  + Type : string + +
                                                                                                                                                                  + Default value : name +
                                                                                                                                                                  + +
                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                  + + + Public + name + + +
                                                                                                                                                                  + Type : string + +
                                                                                                                                                                  + +
                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  + + + selectedOptionChange + + +
                                                                                                                                                                  + Default value : new EventEmitter<string[]>() +
                                                                                                                                                                  + +
                                                                                                                                                                  +

                                                                                                                                                                  Triggered when this filter changes value +(e.g. when the user selects a new value in a FilterComponent).

                                                                                                                                                                  +

                                                                                                                                                                  This is part of the filter object because dynamic filter components can't expose @Outputs

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  + + + Public + selectedOptionValues + + +
                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  + +

                                                                                                                                                                  + Methods +

                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  + + + Abstract + getFilter + + +
                                                                                                                                                                  + + getFilter() +
                                                                                                                                                                  + +
                                                                                                                                                                  + +
                                                                                                                                                                  + Returns : DataFilter<T> + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + + +
                                                                                                                                                                  + + +
                                                                                                                                                                  +
                                                                                                                                                                  import { Entity } from "../../entity/model/entity";
                                                                                                                                                                  +import { MongoQuery } from "@casl/ability";
                                                                                                                                                                  +import { ListFilterComponent } from "../list-filter/list-filter.component";
                                                                                                                                                                  +import { EventEmitter, Type } from "@angular/core";
                                                                                                                                                                  +
                                                                                                                                                                  +/**
                                                                                                                                                                  + * This filter can be used to filter an array of entities.
                                                                                                                                                                  + * It has to follow the MongoDB Query Syntax {@link https://www.mongodb.com/docs/manual/reference/operator/query/}.
                                                                                                                                                                  + *
                                                                                                                                                                  + * The filter is parsed using ucast {@link https://github.com/stalniy/ucast/tree/master/packages/mongo2js}
                                                                                                                                                                  + */
                                                                                                                                                                  +export type DataFilter<T> = MongoQuery<T> | {};
                                                                                                                                                                  +
                                                                                                                                                                  +export abstract class Filter<T extends Entity> {
                                                                                                                                                                  +  /**
                                                                                                                                                                  +   * The component used to display filter option to the user.
                                                                                                                                                                  +   */
                                                                                                                                                                  +  component: Type<any> = ListFilterComponent;
                                                                                                                                                                  +
                                                                                                                                                                  +  public selectedOptionValues: string[] = [];
                                                                                                                                                                  +
                                                                                                                                                                  +  /**
                                                                                                                                                                  +   * Triggered when this filter changes value
                                                                                                                                                                  +   * (e.g. when the user selects a new value in a FilterComponent).
                                                                                                                                                                  +   *
                                                                                                                                                                  +   * This is part of the filter object because dynamic filter components can't expose @Outputs
                                                                                                                                                                  +   */
                                                                                                                                                                  +  selectedOptionChange = new EventEmitter<string[]>();
                                                                                                                                                                  +
                                                                                                                                                                  +  protected constructor(
                                                                                                                                                                  +    public name: string,
                                                                                                                                                                  +    public label: string = name,
                                                                                                                                                                  +  ) {}
                                                                                                                                                                  +
                                                                                                                                                                  +  abstract getFilter(): DataFilter<T>;
                                                                                                                                                                  +}
                                                                                                                                                                  +
                                                                                                                                                                  +/**
                                                                                                                                                                  + * Generic configuration for a filter with different selectable {@link FilterSelectionOption} options.
                                                                                                                                                                  + *
                                                                                                                                                                  + * This is a reusable format for any kind of dropdown or selection component that offers the user a choice
                                                                                                                                                                  + * to narrow down a list of data items.
                                                                                                                                                                  + * As the filter function is provided as part of each {@link FilterSelectionOption}
                                                                                                                                                                  + * an instance of this FilterSelection class can manage all filter selection logic.
                                                                                                                                                                  + */
                                                                                                                                                                  +export class SelectableFilter<T extends Entity> extends Filter<T> {
                                                                                                                                                                  +  /**
                                                                                                                                                                  +   * Generate filter options dynamically from the given value to be matched.
                                                                                                                                                                  +   *
                                                                                                                                                                  +   * This is a utility function to make it easier to generate {@link FilterSelectionOption}s for standard cases
                                                                                                                                                                  +   * if you simply want each option to filter items having the given attribute matching different values.
                                                                                                                                                                  +   * If you have more sophisticated filtering needs, use the constructor to set {@link FilterSelectionOption}s that
                                                                                                                                                                  +   * you created yourself.
                                                                                                                                                                  +   *
                                                                                                                                                                  +   * @param valuesToMatchAsOptions An array of values to be matched.
                                                                                                                                                                  +   *        A separate FilterSelectionOption is created for each value with a filter
                                                                                                                                                                  +   *        that is true of a data item's property exactly matches that value.
                                                                                                                                                                  +   * @param attributeName The name of the property of a data item that is compared to the value in the filter function.
                                                                                                                                                                  +   */
                                                                                                                                                                  +  public static generateOptions<T extends Entity>(
                                                                                                                                                                  +    valuesToMatchAsOptions: (string | number)[],
                                                                                                                                                                  +    attributeName: string,
                                                                                                                                                                  +  ): FilterSelectionOption<T>[] {
                                                                                                                                                                  +    return valuesToMatchAsOptions
                                                                                                                                                                  +      .filter((k) => !!k)
                                                                                                                                                                  +      .map((k) => ({
                                                                                                                                                                  +        key: k.toString().toLowerCase(),
                                                                                                                                                                  +        label: k.toString(),
                                                                                                                                                                  +        filter: { [attributeName]: k } as DataFilter<T>,
                                                                                                                                                                  +      }));
                                                                                                                                                                  +  }
                                                                                                                                                                  +
                                                                                                                                                                  +  /**
                                                                                                                                                                  +   * Create a FilterSelection with different options to be selected.
                                                                                                                                                                  +   * @param name The name or id describing this filter
                                                                                                                                                                  +   * @param options An array of different filtering variants to chose between
                                                                                                                                                                  +   * @param label The user-friendly label describing this filter-selection
                                                                                                                                                                  +   * (optional, defaults to the name of the selection)
                                                                                                                                                                  +   */
                                                                                                                                                                  +  constructor(
                                                                                                                                                                  +    public override name: string,
                                                                                                                                                                  +    public options: FilterSelectionOption<T>[],
                                                                                                                                                                  +    public override label: string = name,
                                                                                                                                                                  +  ) {
                                                                                                                                                                  +    super(name, label);
                                                                                                                                                                  +    this.selectedOptionValues = [];
                                                                                                                                                                  +  }
                                                                                                                                                                  +
                                                                                                                                                                  +  /**
                                                                                                                                                                  +   * Get the full filter option by its key.
                                                                                                                                                                  +   * @param key The identifier of the requested option
                                                                                                                                                                  +   */
                                                                                                                                                                  +  getOption(key: string): FilterSelectionOption<T> | undefined {
                                                                                                                                                                  +    return this.options.find((option: FilterSelectionOption<T>): boolean => {
                                                                                                                                                                  +      return option.key === key;
                                                                                                                                                                  +    });
                                                                                                                                                                  +  }
                                                                                                                                                                  +
                                                                                                                                                                  +  /**
                                                                                                                                                                  +   * Get the filter query for the given option.
                                                                                                                                                                  +   * If the given key is undefined or invalid, the returned filter matches any elements.
                                                                                                                                                                  +   */
                                                                                                                                                                  +  public getFilter(): DataFilter<T> {
                                                                                                                                                                  +    const filters: DataFilter<T>[] = this.selectedOptionValues
                                                                                                                                                                  +      .map((value: string) => this.getOption(value))
                                                                                                                                                                  +      .filter((value: FilterSelectionOption<T>) => value !== undefined)
                                                                                                                                                                  +      .map((previousValue: FilterSelectionOption<T>) => {
                                                                                                                                                                  +        return previousValue.filter as DataFilter<T>;
                                                                                                                                                                  +      });
                                                                                                                                                                  +
                                                                                                                                                                  +    if (filters.length === 0) {
                                                                                                                                                                  +      return {} as DataFilter<T>;
                                                                                                                                                                  +    }
                                                                                                                                                                  +    return {
                                                                                                                                                                  +      $or: [...filters],
                                                                                                                                                                  +    } as unknown as DataFilter<T>;
                                                                                                                                                                  +  }
                                                                                                                                                                  +}
                                                                                                                                                                  +
                                                                                                                                                                  +/**
                                                                                                                                                                  + * Represents one specific option to filter data in a certain way.
                                                                                                                                                                  + * used by {@link SelectableFilter}
                                                                                                                                                                  + */
                                                                                                                                                                  +export interface FilterSelectionOption<T> {
                                                                                                                                                                  +  /** identifier for this option in the parent FilterSelection instance */
                                                                                                                                                                  +  key: string;
                                                                                                                                                                  +
                                                                                                                                                                  +  /** label displayed for this option to the user in the UI */
                                                                                                                                                                  +  label: string;
                                                                                                                                                                  +
                                                                                                                                                                  +  /** Optional color */
                                                                                                                                                                  +  color?: string;
                                                                                                                                                                  +
                                                                                                                                                                  +  /**
                                                                                                                                                                  +   * The filter query which should be used if this filter is selected
                                                                                                                                                                  +   */
                                                                                                                                                                  +  filter: DataFilter<T>;
                                                                                                                                                                  +}
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  results matching ""

                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +

                                                                                                                                                                    No results matching ""

                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ImportMetadata.html b/documentation/classes/ImportMetadata.html new file mode 100644 index 0000000000..d7c490d6c3 --- /dev/null +++ b/documentation/classes/ImportMetadata.html @@ -0,0 +1,534 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                    +
                                                                                                                                                                    + + +
                                                                                                                                                                    +
                                                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                                                    +
                                                                                                                                                                    +

                                                                                                                                                                    +

                                                                                                                                                                    File

                                                                                                                                                                    +

                                                                                                                                                                    +

                                                                                                                                                                    + src/app/core/import/import-metadata.ts +

                                                                                                                                                                    + + +

                                                                                                                                                                    +

                                                                                                                                                                    Description

                                                                                                                                                                    +

                                                                                                                                                                    +

                                                                                                                                                                    +

                                                                                                                                                                    Details of a previously executed import of data saved to the database to keep a history.

                                                                                                                                                                    + +

                                                                                                                                                                    + + + + +
                                                                                                                                                                    +

                                                                                                                                                                    Index

                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                    +
                                                                                                                                                                    Properties
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    Methods
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    Accessors
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    + + +
                                                                                                                                                                    + +

                                                                                                                                                                    + Properties +

                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                    + + + + config + + +
                                                                                                                                                                    + Type : ImportSettings + +
                                                                                                                                                                    + Decorators : +
                                                                                                                                                                    + + @DatabaseField()
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                    + + + + ids + + +
                                                                                                                                                                    + Type : string[] + +
                                                                                                                                                                    + Decorators : +
                                                                                                                                                                    + + @DatabaseField()
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    + +

                                                                                                                                                                    + Methods +

                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                    + + + Static + create + + +
                                                                                                                                                                    + + create(contents: Partial<ImportMetadata>) +
                                                                                                                                                                    + +
                                                                                                                                                                    + +
                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                    contents + Partial<ImportMetadata> + + No +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                    +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + + + + + +
                                                                                                                                                                    +

                                                                                                                                                                    + Accessors +

                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                    + + date +
                                                                                                                                                                    + getdate() +
                                                                                                                                                                    + +
                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                    + + user +
                                                                                                                                                                    + getuser() +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + + +
                                                                                                                                                                    +
                                                                                                                                                                    import { DatabaseEntity } from "../entity/database-entity.decorator";
                                                                                                                                                                    +import { Entity } from "../entity/model/entity";
                                                                                                                                                                    +import { DatabaseField } from "../entity/database-field.decorator";
                                                                                                                                                                    +import { ColumnMapping } from "./column-mapping";
                                                                                                                                                                    +import { AdditionalImportAction } from "./import-additional-actions/additional-import-action";
                                                                                                                                                                    +
                                                                                                                                                                    +/**
                                                                                                                                                                    + * Details of a previously executed import of data saved to the database to keep a history.
                                                                                                                                                                    + */
                                                                                                                                                                    +@DatabaseEntity("ImportMetadata")
                                                                                                                                                                    +export class ImportMetadata extends Entity {
                                                                                                                                                                    +  static create(contents: Partial<ImportMetadata>) {
                                                                                                                                                                    +    return Object.assign(new ImportMetadata(), contents);
                                                                                                                                                                    +  }
                                                                                                                                                                    +
                                                                                                                                                                    +  get date(): Date {
                                                                                                                                                                    +    return this.created?.at;
                                                                                                                                                                    +  }
                                                                                                                                                                    +
                                                                                                                                                                    +  get user(): string {
                                                                                                                                                                    +    return this.created?.by;
                                                                                                                                                                    +  }
                                                                                                                                                                    +
                                                                                                                                                                    +  @DatabaseField() config: ImportSettings;
                                                                                                                                                                    +
                                                                                                                                                                    +  @DatabaseField() ids: string[];
                                                                                                                                                                    +}
                                                                                                                                                                    +
                                                                                                                                                                    +/**
                                                                                                                                                                    + * Settings required to execute an import including type and mappings.
                                                                                                                                                                    + */
                                                                                                                                                                    +export interface ImportSettings {
                                                                                                                                                                    +  entityType: string;
                                                                                                                                                                    +  columnMapping: ColumnMapping[];
                                                                                                                                                                    +  additionalActions?: AdditionalImportAction[];
                                                                                                                                                                    +}
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                    +
                                                                                                                                                                    +

                                                                                                                                                                    results matching ""

                                                                                                                                                                    +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      No results matching ""

                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/InvalidFormFieldError.html b/documentation/classes/InvalidFormFieldError.html new file mode 100644 index 0000000000..a22bff542e --- /dev/null +++ b/documentation/classes/InvalidFormFieldError.html @@ -0,0 +1,263 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                      +
                                                                                                                                                                      + + +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      +

                                                                                                                                                                      File

                                                                                                                                                                      +

                                                                                                                                                                      +

                                                                                                                                                                      + src/app/core/common-components/entity-form/invalid-form-field.error.ts +

                                                                                                                                                                      + + +

                                                                                                                                                                      +

                                                                                                                                                                      Description

                                                                                                                                                                      +

                                                                                                                                                                      +

                                                                                                                                                                      +

                                                                                                                                                                      Custom error indicating details of a failed form validation.

                                                                                                                                                                      + +

                                                                                                                                                                      + +

                                                                                                                                                                      +

                                                                                                                                                                      Extends

                                                                                                                                                                      +

                                                                                                                                                                      +

                                                                                                                                                                      + Error +

                                                                                                                                                                      + + + + +
                                                                                                                                                                      +

                                                                                                                                                                      Constructor

                                                                                                                                                                      + + + + + + + + + + +
                                                                                                                                                                      +constructor() +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                      + + +
                                                                                                                                                                      +
                                                                                                                                                                      export class InvalidFormFieldError extends Error {
                                                                                                                                                                      +  constructor() {
                                                                                                                                                                      +    super("Invalid form fields");
                                                                                                                                                                      +    Object.setPrototypeOf(this, InvalidFormFieldError.prototype);
                                                                                                                                                                      +  }
                                                                                                                                                                      +}
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      results matching ""

                                                                                                                                                                      +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        No results matching ""

                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/LatestEntityLoader.html b/documentation/classes/LatestEntityLoader.html new file mode 100644 index 0000000000..54cbc628d7 --- /dev/null +++ b/documentation/classes/LatestEntityLoader.html @@ -0,0 +1,538 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        +

                                                                                                                                                                        File

                                                                                                                                                                        +

                                                                                                                                                                        +

                                                                                                                                                                        + src/app/core/entity/latest-entity-loader.ts +

                                                                                                                                                                        + + +

                                                                                                                                                                        +

                                                                                                                                                                        Description

                                                                                                                                                                        +

                                                                                                                                                                        +

                                                                                                                                                                        +

                                                                                                                                                                        Implement an Angular Service extending this base class +when you need to work with continuous updates of a specific entity from the database. +(e.g. SiteSettings & SiteSettingsService)

                                                                                                                                                                        + +

                                                                                                                                                                        + + + + +
                                                                                                                                                                        +

                                                                                                                                                                        Index

                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                        +
                                                                                                                                                                        Properties
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        Methods
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +

                                                                                                                                                                        Constructor

                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                        + Protected + constructor(entityCtor: EntityConstructor<T>, entityID: string, entityMapper: EntityMapperService) +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                        entityCtor + EntityConstructor<T> + + No +
                                                                                                                                                                        entityID + string + + No +
                                                                                                                                                                        entityMapper + EntityMapperService + + No +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        + +

                                                                                                                                                                        + Properties +

                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                        + + + entityUpdated + + +
                                                                                                                                                                        + Default value : new Subject<T>() +
                                                                                                                                                                        + +
                                                                                                                                                                        +

                                                                                                                                                                        subscribe to this and execute any actions required when the entity changes

                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        + +

                                                                                                                                                                        + Methods +

                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                        + + + Async + loadOnce + + +
                                                                                                                                                                        + + loadOnce() +
                                                                                                                                                                        + +
                                                                                                                                                                        +

                                                                                                                                                                        Do an initial load of the entity to be available through the entityUpdated property +(without watching for continuous updates).

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        + Returns : Promise<T | undefined> + +
                                                                                                                                                                        +
                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                        + + + Async + startLoading + + +
                                                                                                                                                                        + + startLoading() +
                                                                                                                                                                        + +
                                                                                                                                                                        +

                                                                                                                                                                        Initialize the loader to make the entity available and emit continuous updates +through the entityUpdated property

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        + Returns : unknown + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + + + + + +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        import { EntityMapperService } from "./entity-mapper/entity-mapper.service";
                                                                                                                                                                        +import { Logging } from "../logging/logging.service";
                                                                                                                                                                        +import { filter } from "rxjs/operators";
                                                                                                                                                                        +import { Entity, EntityConstructor } from "./model/entity";
                                                                                                                                                                        +import { HttpStatusCode } from "@angular/common/http";
                                                                                                                                                                        +import { Subject } from "rxjs";
                                                                                                                                                                        +
                                                                                                                                                                        +/**
                                                                                                                                                                        + * Implement an Angular Service extending this base class
                                                                                                                                                                        + * when you need to work with continuous updates of a specific entity from the database.
                                                                                                                                                                        + * (e.g. SiteSettings & SiteSettingsService)
                                                                                                                                                                        + */
                                                                                                                                                                        +export abstract class LatestEntityLoader<T extends Entity> {
                                                                                                                                                                        +  /** subscribe to this and execute any actions required when the entity changes */
                                                                                                                                                                        +  entityUpdated = new Subject<T>();
                                                                                                                                                                        +
                                                                                                                                                                        +  protected constructor(
                                                                                                                                                                        +    private entityCtor: EntityConstructor<T>,
                                                                                                                                                                        +    private entityID: string,
                                                                                                                                                                        +    protected entityMapper: EntityMapperService,
                                                                                                                                                                        +  ) {}
                                                                                                                                                                        +
                                                                                                                                                                        +  /**
                                                                                                                                                                        +   * Initialize the loader to make the entity available and emit continuous updates
                                                                                                                                                                        +   * through the `entityUpdated` property
                                                                                                                                                                        +   */
                                                                                                                                                                        +  async startLoading() {
                                                                                                                                                                        +    const initialValue = await this.loadOnce();
                                                                                                                                                                        +    this.entityMapper
                                                                                                                                                                        +      .receiveUpdates(this.entityCtor)
                                                                                                                                                                        +      .pipe(filter(({ entity }) => entity.getId(true) === this.entityID))
                                                                                                                                                                        +      .subscribe(({ entity }) => this.entityUpdated.next(entity));
                                                                                                                                                                        +    return initialValue;
                                                                                                                                                                        +  }
                                                                                                                                                                        +
                                                                                                                                                                        +  /**
                                                                                                                                                                        +   * Do an initial load of the entity to be available through the `entityUpdated` property
                                                                                                                                                                        +   * (without watching for continuous updates).
                                                                                                                                                                        +   */
                                                                                                                                                                        +  async loadOnce(): Promise<T | undefined> {
                                                                                                                                                                        +    try {
                                                                                                                                                                        +      const entity = await this.entityMapper.load(
                                                                                                                                                                        +        this.entityCtor,
                                                                                                                                                                        +        this.entityID,
                                                                                                                                                                        +      );
                                                                                                                                                                        +      this.entityUpdated.next(entity);
                                                                                                                                                                        +      return entity;
                                                                                                                                                                        +    } catch (err) {
                                                                                                                                                                        +      if (err?.status !== HttpStatusCode.NotFound) {
                                                                                                                                                                        +        Logging.error(
                                                                                                                                                                        +          `Initial loading of entity "${this.entityCtor.ENTITY_TYPE}:${this.entityID}" failed [Service based on LatestEntityLoader]`,
                                                                                                                                                                        +          err,
                                                                                                                                                                        +        );
                                                                                                                                                                        +      }
                                                                                                                                                                        +      return undefined;
                                                                                                                                                                        +    }
                                                                                                                                                                        +  }
                                                                                                                                                                        +}
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        results matching ""

                                                                                                                                                                        +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          No results matching ""

                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/LoggingService.html b/documentation/classes/LoggingService.html new file mode 100644 index 0000000000..14c7ea81e8 --- /dev/null +++ b/documentation/classes/LoggingService.html @@ -0,0 +1,1381 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                          +
                                                                                                                                                                          + + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          +

                                                                                                                                                                          File

                                                                                                                                                                          +

                                                                                                                                                                          +

                                                                                                                                                                          + src/app/core/logging/logging.service.ts +

                                                                                                                                                                          + + +

                                                                                                                                                                          +

                                                                                                                                                                          Description

                                                                                                                                                                          +

                                                                                                                                                                          +

                                                                                                                                                                          +

                                                                                                                                                                          Centrally managed logging to allow log messages to be filtered by level and even sent to a remote logging service +that allows developers to monitor and analyse problems.

                                                                                                                                                                          +

                                                                                                                                                                          Logging to the remote monitoring server is set only for warnings and errors.

                                                                                                                                                                          +

                                                                                                                                                                          To allow remote logging, call Sentry.init during bootstrap in your AppModule or somewhere early on during startup.

                                                                                                                                                                          +

                                                                                                                                                                          Import the constant Logging to use this from anywhere (without Angular DI).

                                                                                                                                                                          + +

                                                                                                                                                                          + + + + +
                                                                                                                                                                          +

                                                                                                                                                                          Index

                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                          +
                                                                                                                                                                          Methods
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + +
                                                                                                                                                                          + +

                                                                                                                                                                          + Methods +

                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + addContext + + +
                                                                                                                                                                          +addContext(key: string, value: any, asTag: boolean) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Update a piece of context information that will be attached to all log messages for easier debugging, +especially in remote logging.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptionalDefault valueDescription
                                                                                                                                                                          key + string + + No + + +

                                                                                                                                                                          Identifier of the key-value pair

                                                                                                                                                                          + +
                                                                                                                                                                          value + any + + No + + +

                                                                                                                                                                          Value of the key-value pair

                                                                                                                                                                          + +
                                                                                                                                                                          asTag + boolean + + No + + false + +

                                                                                                                                                                          If this should be added as indexed tag rather than simple context (see https://docs.sentry.io/platforms/javascript/enriching-events/tags/)

                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + Public + debug + + +
                                                                                                                                                                          + + debug(message: any, ...context: any[]) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Log the message with "debug" level - for very detailed, non-essential information.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptionalDescription
                                                                                                                                                                          message + any + + No + +
                                                                                                                                                                          context + any[] + + No + +

                                                                                                                                                                          Additional context for debugging

                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + Public + error + + +
                                                                                                                                                                          + + error(message: any, ...context: any[]) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Log the message with "error" level - for unexpected critical events that cannot be handled and will affect functions.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                          message + any + + No +
                                                                                                                                                                          context + any[] + + No +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + getAngularTracingProviders + + +
                                                                                                                                                                          +getAngularTracingProviders() +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Get the Angular providers to set up additional logging and tracing, +that should be added to the providers array of the AppModule.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Returns : Provider[] + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + Public + info + + +
                                                                                                                                                                          + + info(message: any) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Log the message with "info" level - for relevant information that occurs during regular functioning of the app.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                          message + any + + No +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + initAngularLogging + + +
                                                                                                                                                                          +initAngularLogging(loginState: LoginStateSubject, sessionInfo: SessionSubject) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Register any additional logging context integrations that need Angular services.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                          loginState + LoginStateSubject + + No +
                                                                                                                                                                          sessionInfo + SessionSubject + + No +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : () => any + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + initRemoteLogging + + +
                                                                                                                                                                          +initRemoteLogging(options: Sentry.BrowserOptions) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Initialize the remote logging module with the given options. +If set up this will be used to send errors to a remote endpoint for analysis.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                          options + Sentry.BrowserOptions + + No +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + Public + log + + +
                                                                                                                                                                          + + log(message: any, logLevel: LogLevel, ...context: any[]) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Generic logging of a message.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptionalDefault valueDescription
                                                                                                                                                                          message + any + + No + + +

                                                                                                                                                                          Message to be logged

                                                                                                                                                                          + +
                                                                                                                                                                          logLevel + LogLevel + + No + + LogLevel.INFO + +

                                                                                                                                                                          Optional log level - default is "info"

                                                                                                                                                                          + +
                                                                                                                                                                          context + any[] + + No + + +

                                                                                                                                                                          Additional context for debugging

                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + setLoggingContextUser + + +
                                                                                                                                                                          +setLoggingContextUser(username: string) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Update the username to be attached to all log messages for easier debugging, +especially in remote logging.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                          username + string + + No +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          + + + Public + warn + + +
                                                                                                                                                                          + + warn(message: any, ...context: any[]) +
                                                                                                                                                                          + +
                                                                                                                                                                          +

                                                                                                                                                                          Log the message with "warning" level - for unexpected events that the app can still handle gracefully.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                          message + any + + No +
                                                                                                                                                                          context + any[] + + No +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + +
                                                                                                                                                                          + + +
                                                                                                                                                                          +
                                                                                                                                                                          import { LogLevel } from "./log-level";
                                                                                                                                                                          +import * as Sentry from "@sentry/angular";
                                                                                                                                                                          +import { environment } from "../../../environments/environment";
                                                                                                                                                                          +import { APP_INITIALIZER, ErrorHandler, Provider } from "@angular/core";
                                                                                                                                                                          +import { Router } from "@angular/router";
                                                                                                                                                                          +import { LoginState } from "../session/session-states/login-state.enum";
                                                                                                                                                                          +import { LoginStateSubject } from "../session/session-type";
                                                                                                                                                                          +import { SessionSubject } from "../session/auth/session-info";
                                                                                                                                                                          +
                                                                                                                                                                          +/* eslint-disable no-console */
                                                                                                                                                                          +
                                                                                                                                                                          +/**
                                                                                                                                                                          + * Centrally managed logging to allow log messages to be filtered by level and even sent to a remote logging service
                                                                                                                                                                          + * that allows developers to monitor and analyse problems.
                                                                                                                                                                          + *
                                                                                                                                                                          + * Logging to the remote monitoring server is set only for warnings and errors.
                                                                                                                                                                          + *
                                                                                                                                                                          + * To allow remote logging, call Sentry.init during bootstrap in your AppModule or somewhere early on during startup.
                                                                                                                                                                          + *
                                                                                                                                                                          + * Import the constant `Logging` to use this from anywhere (without Angular DI).
                                                                                                                                                                          + */
                                                                                                                                                                          +export class LoggingService {
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Initialize the remote logging module with the given options.
                                                                                                                                                                          +   * If set up this will be used to send errors to a remote endpoint for analysis.
                                                                                                                                                                          +   * @param options
                                                                                                                                                                          +   */
                                                                                                                                                                          +  initRemoteLogging(options: Sentry.BrowserOptions) {
                                                                                                                                                                          +    if (!options.dsn) {
                                                                                                                                                                          +      // abort if no target url is set
                                                                                                                                                                          +      return;
                                                                                                                                                                          +    }
                                                                                                                                                                          +
                                                                                                                                                                          +    const defaultOptions = {
                                                                                                                                                                          +      release: "ndb-core@" + environment.appVersion,
                                                                                                                                                                          +      transport: Sentry.makeBrowserOfflineTransport(Sentry.makeFetchTransport),
                                                                                                                                                                          +      beforeBreadcrumb: enhanceSentryBreadcrumb,
                                                                                                                                                                          +    };
                                                                                                                                                                          +    Sentry.init(Object.assign(defaultOptions, options));
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Register any additional logging context integrations that need Angular services.
                                                                                                                                                                          +   * @param loginState
                                                                                                                                                                          +   * @param sessionInfo
                                                                                                                                                                          +   */
                                                                                                                                                                          +  initAngularLogging(
                                                                                                                                                                          +    loginState: LoginStateSubject,
                                                                                                                                                                          +    sessionInfo: SessionSubject,
                                                                                                                                                                          +  ) {
                                                                                                                                                                          +    return () =>
                                                                                                                                                                          +      loginState.subscribe((newState) => {
                                                                                                                                                                          +        if (newState === LoginState.LOGGED_IN) {
                                                                                                                                                                          +          const username = sessionInfo.value?.id;
                                                                                                                                                                          +          Logging.setLoggingContextUser(username);
                                                                                                                                                                          +        } else {
                                                                                                                                                                          +          Logging.setLoggingContextUser(undefined);
                                                                                                                                                                          +        }
                                                                                                                                                                          +      });
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Get the Angular providers to set up additional logging and tracing,
                                                                                                                                                                          +   * that should be added to the providers array of the AppModule.
                                                                                                                                                                          +   */
                                                                                                                                                                          +  getAngularTracingProviders(): Provider[] {
                                                                                                                                                                          +    return [
                                                                                                                                                                          +      /* Sentry setup */
                                                                                                                                                                          +      {
                                                                                                                                                                          +        provide: ErrorHandler,
                                                                                                                                                                          +        useValue: Sentry.createErrorHandler(),
                                                                                                                                                                          +      },
                                                                                                                                                                          +      {
                                                                                                                                                                          +        provide: Sentry.TraceService,
                                                                                                                                                                          +        deps: [Router],
                                                                                                                                                                          +      },
                                                                                                                                                                          +      {
                                                                                                                                                                          +        provide: APP_INITIALIZER,
                                                                                                                                                                          +        useFactory: () => () => {},
                                                                                                                                                                          +        deps: [Sentry.TraceService],
                                                                                                                                                                          +        multi: true,
                                                                                                                                                                          +      },
                                                                                                                                                                          +      {
                                                                                                                                                                          +        provide: APP_INITIALIZER,
                                                                                                                                                                          +        useFactory: Logging.initAngularLogging,
                                                                                                                                                                          +        deps: [LoginStateSubject, SessionSubject],
                                                                                                                                                                          +        multi: true,
                                                                                                                                                                          +      },
                                                                                                                                                                          +    ];
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Update a piece of context information that will be attached to all log messages for easier debugging,
                                                                                                                                                                          +   * especially in remote logging.
                                                                                                                                                                          +   * @param key Identifier of the key-value pair
                                                                                                                                                                          +   * @param value Value of the key-value pair
                                                                                                                                                                          +   * @param asTag If this should be added as indexed tag rather than simple context (see https://docs.sentry.io/platforms/javascript/enriching-events/tags/)
                                                                                                                                                                          +   */
                                                                                                                                                                          +  addContext(key: string, value: any, asTag: boolean = false) {
                                                                                                                                                                          +    if (asTag) {
                                                                                                                                                                          +      Sentry.setTag(key, value);
                                                                                                                                                                          +    } else {
                                                                                                                                                                          +      if (typeof value !== "object") {
                                                                                                                                                                          +        value = { value: value };
                                                                                                                                                                          +      }
                                                                                                                                                                          +      Sentry.getCurrentScope().setContext(key, value);
                                                                                                                                                                          +    }
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Update the username to be attached to all log messages for easier debugging,
                                                                                                                                                                          +   * especially in remote logging.
                                                                                                                                                                          +   * @param username
                                                                                                                                                                          +   */
                                                                                                                                                                          +  setLoggingContextUser(username: string) {
                                                                                                                                                                          +    Sentry.setUser({ username: username });
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Log the message with "debug" level - for very detailed, non-essential information.
                                                                                                                                                                          +   * @param message
                                                                                                                                                                          +   * @param context Additional context for debugging
                                                                                                                                                                          +   */
                                                                                                                                                                          +  public debug(message: any, ...context: any[]) {
                                                                                                                                                                          +    this.log(message, LogLevel.DEBUG, ...context);
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Log the message with "info" level - for relevant information that occurs during regular functioning of the app.
                                                                                                                                                                          +   * @param message
                                                                                                                                                                          +   */
                                                                                                                                                                          +  public info(message: any) {
                                                                                                                                                                          +    this.log(message, LogLevel.INFO);
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Log the message with "warning" level - for unexpected events that the app can still handle gracefully.
                                                                                                                                                                          +   * @param message
                                                                                                                                                                          +   * @param context
                                                                                                                                                                          +   */
                                                                                                                                                                          +  public warn(message: any, ...context: any[]) {
                                                                                                                                                                          +    this.log(message, LogLevel.WARN, ...context);
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Log the message with "error" level - for unexpected critical events that cannot be handled and will affect functions.
                                                                                                                                                                          +   * @param message
                                                                                                                                                                          +   * @param context
                                                                                                                                                                          +   */
                                                                                                                                                                          +  public error(message: any, ...context: any[]) {
                                                                                                                                                                          +    this.log(message, LogLevel.ERROR, ...context);
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * Generic logging of a message.
                                                                                                                                                                          +   * @param message Message to be logged
                                                                                                                                                                          +   * @param logLevel Optional log level - default is "info"
                                                                                                                                                                          +   * @param context Additional context for debugging
                                                                                                                                                                          +   */
                                                                                                                                                                          +  public log(
                                                                                                                                                                          +    message: any,
                                                                                                                                                                          +    logLevel: LogLevel = LogLevel.INFO,
                                                                                                                                                                          +    ...context: any[]
                                                                                                                                                                          +  ) {
                                                                                                                                                                          +    this.logToConsole(message, logLevel, ...context);
                                                                                                                                                                          +
                                                                                                                                                                          +    if (logLevel !== LogLevel.DEBUG && logLevel !== LogLevel.INFO) {
                                                                                                                                                                          +      this.logToRemoteMonitoring(message, logLevel);
                                                                                                                                                                          +    }
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  private logToConsole(message: any, logLevel: LogLevel, ...context: any[]) {
                                                                                                                                                                          +    switch (+logLevel) {
                                                                                                                                                                          +      case LogLevel.DEBUG:
                                                                                                                                                                          +        console.debug(message, ...context);
                                                                                                                                                                          +        break;
                                                                                                                                                                          +      case LogLevel.INFO:
                                                                                                                                                                          +        console.info(message, ...context);
                                                                                                                                                                          +        break;
                                                                                                                                                                          +      case LogLevel.WARN:
                                                                                                                                                                          +        console.warn(message, ...context);
                                                                                                                                                                          +        break;
                                                                                                                                                                          +      case LogLevel.ERROR:
                                                                                                                                                                          +        console.error(message, ...context);
                                                                                                                                                                          +        break;
                                                                                                                                                                          +      default:
                                                                                                                                                                          +        console.log(message, ...context);
                                                                                                                                                                          +        break;
                                                                                                                                                                          +    }
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  private logToRemoteMonitoring(message: any, logLevel: LogLevel) {
                                                                                                                                                                          +    if (logLevel === LogLevel.ERROR) {
                                                                                                                                                                          +      if (message instanceof Error) {
                                                                                                                                                                          +        Sentry.captureException(message);
                                                                                                                                                                          +      } else {
                                                                                                                                                                          +        Sentry.captureException(
                                                                                                                                                                          +          new Error(message?.message ?? message?.error ?? message),
                                                                                                                                                                          +        );
                                                                                                                                                                          +      }
                                                                                                                                                                          +    } else {
                                                                                                                                                                          +      Sentry.captureMessage(message, this.translateLogLevel(logLevel));
                                                                                                                                                                          +    }
                                                                                                                                                                          +  }
                                                                                                                                                                          +
                                                                                                                                                                          +  private translateLogLevel(logLevel: LogLevel): Sentry.SeverityLevel {
                                                                                                                                                                          +    switch (+logLevel) {
                                                                                                                                                                          +      case LogLevel.DEBUG:
                                                                                                                                                                          +        return "debug";
                                                                                                                                                                          +      case LogLevel.INFO:
                                                                                                                                                                          +        return "info";
                                                                                                                                                                          +      case LogLevel.WARN:
                                                                                                                                                                          +        return "warning";
                                                                                                                                                                          +      case LogLevel.ERROR:
                                                                                                                                                                          +        return "error";
                                                                                                                                                                          +      default:
                                                                                                                                                                          +        return "info";
                                                                                                                                                                          +    }
                                                                                                                                                                          +  }
                                                                                                                                                                          +}
                                                                                                                                                                          +
                                                                                                                                                                          +/**
                                                                                                                                                                          + * Add more human-readable descriptions to Sentry breadcrumbs for debugging.
                                                                                                                                                                          + *
                                                                                                                                                                          + * see https://docs.sentry.io/platforms/javascript/enriching-events/breadcrumbs/
                                                                                                                                                                          + */
                                                                                                                                                                          +function enhanceSentryBreadcrumb(
                                                                                                                                                                          +  breadcrumb: Sentry.Breadcrumb,
                                                                                                                                                                          +  hint: SentryBreadcrumbHint,
                                                                                                                                                                          +) {
                                                                                                                                                                          +  if (breadcrumb.category === "ui.click") {
                                                                                                                                                                          +    const event = hint.event;
                                                                                                                                                                          +    const elementText = event.target?.["innerText"] ?? "";
                                                                                                                                                                          +    breadcrumb.message = elementText + " | " + breadcrumb.message;
                                                                                                                                                                          +  }
                                                                                                                                                                          +  return breadcrumb;
                                                                                                                                                                          +}
                                                                                                                                                                          +
                                                                                                                                                                          +/**
                                                                                                                                                                          + * https://docs.sentry.io/platforms/javascript/configuration/filtering/#hints-for-breadcrumbs
                                                                                                                                                                          + */
                                                                                                                                                                          +interface SentryBreadcrumbHint {
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * For breadcrumbs created from browser events, the Sentry SDK often supplies the event to the breadcrumb as a hint.
                                                                                                                                                                          +   * This can be used to extract data from the target DOM element into a breadcrumb, for example.
                                                                                                                                                                          +   */
                                                                                                                                                                          +  event?: PointerEvent;
                                                                                                                                                                          +
                                                                                                                                                                          +  input?: string[];
                                                                                                                                                                          +
                                                                                                                                                                          +  /**
                                                                                                                                                                          +   * e.g. console output level (warn / log / ...)
                                                                                                                                                                          +   */
                                                                                                                                                                          +  level: string;
                                                                                                                                                                          +
                                                                                                                                                                          +  response?: Response;
                                                                                                                                                                          +  request?: any;
                                                                                                                                                                          +  xhr?: XMLHttpRequest;
                                                                                                                                                                          +}
                                                                                                                                                                          +
                                                                                                                                                                          +export const Logging = new LoggingService();
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          results matching ""

                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            No results matching ""

                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/MarkedRendererCustom.html b/documentation/classes/MarkedRendererCustom.html new file mode 100644 index 0000000000..6c051fd2cb --- /dev/null +++ b/documentation/classes/MarkedRendererCustom.html @@ -0,0 +1,489 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                            +
                                                                                                                                                                            + + +
                                                                                                                                                                            +
                                                                                                                                                                            + + + + + + + + + + + + + + + + +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            +

                                                                                                                                                                            File

                                                                                                                                                                            +

                                                                                                                                                                            +

                                                                                                                                                                            + src/app/core/ui/latest-changes/changelog/MarkedRendererCustom.ts +

                                                                                                                                                                            + + + +

                                                                                                                                                                            +

                                                                                                                                                                            Extends

                                                                                                                                                                            +

                                                                                                                                                                            +

                                                                                                                                                                            + MarkedRenderer +

                                                                                                                                                                            + + + +
                                                                                                                                                                            +

                                                                                                                                                                            Index

                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                            +
                                                                                                                                                                            Methods
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + + + +
                                                                                                                                                                            + +

                                                                                                                                                                            + Methods +

                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                            + + + Public + + heading + + +
                                                                                                                                                                            + + heading(text: string, level: "1" | "2" | "3" | "4" | "5" | "6", raw: string) +
                                                                                                                                                                            + +
                                                                                                                                                                            + +
                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                            text + string + + No +
                                                                                                                                                                            level + "1" | "2" | "3" | "4" | "5" | "6" + + No +
                                                                                                                                                                            raw + string + + No +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + Returns : string + +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                            + + + Public + + list + + +
                                                                                                                                                                            + + list(body: string, ordered: boolean, start: number) +
                                                                                                                                                                            + +
                                                                                                                                                                            + +
                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                            body + string + + No +
                                                                                                                                                                            ordered + boolean + + No +
                                                                                                                                                                            start + number + + No +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + Returns : string + +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + + + + + +
                                                                                                                                                                            + + +
                                                                                                                                                                            +
                                                                                                                                                                            import { MarkedRenderer } from "ngx-markdown";
                                                                                                                                                                            +
                                                                                                                                                                            +export class MarkedRendererCustom extends MarkedRenderer {
                                                                                                                                                                            +  public override heading(
                                                                                                                                                                            +    text: string,
                                                                                                                                                                            +    level: 1 | 2 | 3 | 4 | 5 | 6,
                                                                                                                                                                            +    raw: string,
                                                                                                                                                                            +  ): string {
                                                                                                                                                                            +    if (level === 3) {
                                                                                                                                                                            +      switch (text.toLowerCase()) {
                                                                                                                                                                            +        case "bug fixes":
                                                                                                                                                                            +          return `<span class="badge-label background-changelog-bugfix">${text}</span>`;
                                                                                                                                                                            +        case "features":
                                                                                                                                                                            +          return `<span class="badge-label background-changelog-feature">${text}</span>`;
                                                                                                                                                                            +        default:
                                                                                                                                                                            +          return `<span class="badge-label background-changelog-unknown">${text}</span>`;
                                                                                                                                                                            +      }
                                                                                                                                                                            +    } else {
                                                                                                                                                                            +      return super.heading(text, level, raw);
                                                                                                                                                                            +    }
                                                                                                                                                                            +  }
                                                                                                                                                                            +
                                                                                                                                                                            +  public override list(body: string, ordered: boolean, start: number): string {
                                                                                                                                                                            +    if (ordered) {
                                                                                                                                                                            +      return `<ol class="app-list mat-body-1">${body}</ol>`;
                                                                                                                                                                            +    } else {
                                                                                                                                                                            +      return `<ul class="app-list mat-body-1">${body}</ul>`;
                                                                                                                                                                            +    }
                                                                                                                                                                            +  }
                                                                                                                                                                            +}
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            results matching ""

                                                                                                                                                                            +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              No results matching ""

                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/MockEntityMapperService.html b/documentation/classes/MockEntityMapperService.html new file mode 100644 index 0000000000..19922444b0 --- /dev/null +++ b/documentation/classes/MockEntityMapperService.html @@ -0,0 +1,1722 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              +

                                                                                                                                                                              File

                                                                                                                                                                              +

                                                                                                                                                                              +

                                                                                                                                                                              + src/app/core/entity/entity-mapper/mock-entity-mapper-service.ts +

                                                                                                                                                                              + + +

                                                                                                                                                                              +

                                                                                                                                                                              Description

                                                                                                                                                                              +

                                                                                                                                                                              +

                                                                                                                                                                              +

                                                                                                                                                                              Mocked entity mapper. Can/should only be used whenever some data should be saved +and loaded. This is not to be used to mock database/anything related to the Schema-service.

                                                                                                                                                                              + +

                                                                                                                                                                              + +

                                                                                                                                                                              +

                                                                                                                                                                              Extends

                                                                                                                                                                              +

                                                                                                                                                                              +

                                                                                                                                                                              + EntityMapperService +

                                                                                                                                                                              + + + +
                                                                                                                                                                              +

                                                                                                                                                                              Index

                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                              +
                                                                                                                                                                              Methods
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              Constructor

                                                                                                                                                                              + + + + + + + + + + +
                                                                                                                                                                              +constructor() +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + +

                                                                                                                                                                              + Methods +

                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + add + + +
                                                                                                                                                                              + + add(entity: Entity) +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              like save, but synchronous

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                              entity + Entity + + No + +

                                                                                                                                                                              The entity to add

                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + addAll + + +
                                                                                                                                                                              + + addAll(entities: Entity[]) +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              Add a bunch of entities

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                              entities + Entity[] + + No + +

                                                                                                                                                                              The entities to add

                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + contains + + +
                                                                                                                                                                              + + contains(entity: Entity) +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              returns whether the given entity is known

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : boolean + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + delete + + +
                                                                                                                                                                              + + delete(entity: Entity) +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              like remove but synchronous

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + get + + +
                                                                                                                                                                              + + get(entityType: string, id: string) +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              like load but synchronous

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entityType + string + + No +
                                                                                                                                                                              id + string + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : Entity + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + getAll + + +
                                                                                                                                                                              + + getAll(entityType: string) +
                                                                                                                                                                              + +
                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                +
                                                                                                                                                                              • T
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              like loadType but synchronous

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entityType + string + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : T[] + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + getAllData + + +
                                                                                                                                                                              + + getAllData() +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              Get a flat array of all entities in the database overall +for testing and debugging.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Returns : {} + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Public + + Async + load + + +
                                                                                                                                                                              + + load(entityType: EntityConstructor<T> | string, id: string) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                +
                                                                                                                                                                              • T
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entityType + EntityConstructor<T> | string + + No +
                                                                                                                                                                              id + string + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : Promise<T> + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + + Async + loadType + + +
                                                                                                                                                                              + + loadType(entityType: EntityConstructor<T> | string) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                +
                                                                                                                                                                              • T
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entityType + EntityConstructor<T> | string + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : Promise<T[]> + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + + receiveUpdates + + +
                                                                                                                                                                              + + receiveUpdates(entityType: EntityConstructor<T> | string) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                +
                                                                                                                                                                              • T
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entityType + EntityConstructor<T> | string + + No +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + + remove + + +
                                                                                                                                                                              + + remove(entity: T) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                +
                                                                                                                                                                              • T
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entity + T + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : Promise<any> + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + + Async + save + + +
                                                                                                                                                                              + + save(entity: T, forceUpdate: boolean) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                +
                                                                                                                                                                              • T
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptionalDefault value
                                                                                                                                                                              entity + T + + No + +
                                                                                                                                                                              forceUpdate + boolean + + No + + false +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : Promise<any> + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + + Async + saveAll + + +
                                                                                                                                                                              + + saveAll(entities: Entity[]) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entities + Entity[] + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : Promise<any> + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Protected + resolveConstructor + + +
                                                                                                                                                                              + + resolveConstructor(constructible: EntityConstructor<T> | string) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                +
                                                                                                                                                                              • T
                                                                                                                                                                              • +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              constructible + EntityConstructor<T> | string + + No +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              + + + Protected + setEntityMetadata + + +
                                                                                                                                                                              + + setEntityMetadata(entity: Entity) +
                                                                                                                                                                              +
                                                                                                                                                                              Inherited from EntityMapperService +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              + +
                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              import { EntityMapperService } from "./entity-mapper.service";
                                                                                                                                                                              +import { Observable, Subject } from "rxjs";
                                                                                                                                                                              +import { HttpErrorResponse } from "@angular/common/http";
                                                                                                                                                                              +import { Entity, EntityConstructor } from "../model/entity";
                                                                                                                                                                              +import { UpdatedEntity } from "../model/entity-update";
                                                                                                                                                                              +import { entityRegistry } from "../database-entity.decorator";
                                                                                                                                                                              +import { TEST_USER } from "../../user/demo-user-generator.service";
                                                                                                                                                                              +
                                                                                                                                                                              +export function mockEntityMapper(
                                                                                                                                                                              +  withData: Entity[] = [],
                                                                                                                                                                              +): MockEntityMapperService {
                                                                                                                                                                              +  const ems = new MockEntityMapperService();
                                                                                                                                                                              +  ems.addAll(withData);
                                                                                                                                                                              +  return ems;
                                                                                                                                                                              +}
                                                                                                                                                                              +
                                                                                                                                                                              +/**
                                                                                                                                                                              + * Mocked entity mapper. Can/should only be used whenever some data should be saved
                                                                                                                                                                              + * and loaded. This is not to be used to mock database/anything related to the Schema-service.
                                                                                                                                                                              + */
                                                                                                                                                                              +export class MockEntityMapperService extends EntityMapperService {
                                                                                                                                                                              +  private data: Map<string, Map<string, Entity>> = new Map();
                                                                                                                                                                              +  private observables: Map<string, Subject<UpdatedEntity<any>>> = new Map();
                                                                                                                                                                              +
                                                                                                                                                                              +  constructor() {
                                                                                                                                                                              +    super(
                                                                                                                                                                              +      null,
                                                                                                                                                                              +      null,
                                                                                                                                                                              +      { getCurrentUser: () => ({ name: TEST_USER }) } as any,
                                                                                                                                                                              +      entityRegistry,
                                                                                                                                                                              +    );
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  private publishUpdates(type: string, update: UpdatedEntity<any>) {
                                                                                                                                                                              +    const subj = this.observables.get(type);
                                                                                                                                                                              +    if (subj !== undefined) {
                                                                                                                                                                              +      subj.next(update);
                                                                                                                                                                              +    }
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  /**
                                                                                                                                                                              +   * like {@link save}, but synchronous
                                                                                                                                                                              +   * @param entity The entity to add
                                                                                                                                                                              +   */
                                                                                                                                                                              +  public add(entity: Entity) {
                                                                                                                                                                              +    const type = entity.getType();
                                                                                                                                                                              +    if (!this.data.get(type)) {
                                                                                                                                                                              +      this.data.set(type, new Map());
                                                                                                                                                                              +    }
                                                                                                                                                                              +    super.setEntityMetadata(entity);
                                                                                                                                                                              +    const alreadyExists = this.contains(entity);
                                                                                                                                                                              +    this.data.get(type).set(entity.getId(), entity);
                                                                                                                                                                              +    this.publishUpdates(
                                                                                                                                                                              +      entity.getType(),
                                                                                                                                                                              +      alreadyExists ? { type: "update", entity } : { type: "new", entity },
                                                                                                                                                                              +    );
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  /**
                                                                                                                                                                              +   * returns whether the given entity is known
                                                                                                                                                                              +   * @param entity
                                                                                                                                                                              +   */
                                                                                                                                                                              +  public contains(entity: Entity): boolean {
                                                                                                                                                                              +    return (
                                                                                                                                                                              +      this.data.has(entity.getType()) &&
                                                                                                                                                                              +      this.data.get(entity.getType()).has(entity.getId())
                                                                                                                                                                              +    );
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  /**
                                                                                                                                                                              +   * Add a bunch of entities
                                                                                                                                                                              +   * @param entities The entities to add
                                                                                                                                                                              +   */
                                                                                                                                                                              +  public addAll(entities: Entity[]) {
                                                                                                                                                                              +    entities.forEach((e) => this.add(e));
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  /**
                                                                                                                                                                              +   * like {@link load} but synchronous
                                                                                                                                                                              +   * @param entityType
                                                                                                                                                                              +   * @param id
                                                                                                                                                                              +   */
                                                                                                                                                                              +  public get(entityType: string, id: string): Entity {
                                                                                                                                                                              +    const entityId = Entity.createPrefixedId(entityType, id);
                                                                                                                                                                              +    const result = this.data.get(entityType)?.get(entityId);
                                                                                                                                                                              +    if (!result) {
                                                                                                                                                                              +      throw new HttpErrorResponse({
                                                                                                                                                                              +        url: "MockEntityMapperService",
                                                                                                                                                                              +        status: 404,
                                                                                                                                                                              +        statusText: `${entityType}:${entityId} not found`,
                                                                                                                                                                              +      });
                                                                                                                                                                              +    }
                                                                                                                                                                              +    return result;
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  /**
                                                                                                                                                                              +   * like {@link loadType} but synchronous
                                                                                                                                                                              +   * @param entityType
                                                                                                                                                                              +   */
                                                                                                                                                                              +  public getAll<T extends Entity>(entityType: string): T[] {
                                                                                                                                                                              +    return [...(this.data.get(entityType)?.values() || [])] as T[];
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  /**
                                                                                                                                                                              +   * like {@link remove} but synchronous
                                                                                                                                                                              +   * @param entity
                                                                                                                                                                              +   */
                                                                                                                                                                              +  public delete(entity: Entity) {
                                                                                                                                                                              +    const entities = this.data.get(entity.getType());
                                                                                                                                                                              +    if (entities) {
                                                                                                                                                                              +      entities.delete(entity.getId());
                                                                                                                                                                              +      this.publishUpdates(entity.getType(), { type: "remove", entity });
                                                                                                                                                                              +    }
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  public override async load<T extends Entity>(
                                                                                                                                                                              +    entityType: EntityConstructor<T> | string,
                                                                                                                                                                              +    id: string,
                                                                                                                                                                              +  ): Promise<T> {
                                                                                                                                                                              +    let type = this.getTypeViaRegistry(entityType);
                                                                                                                                                                              +    return this.get(type, id) as T;
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  override async loadType<T extends Entity>(
                                                                                                                                                                              +    entityType: EntityConstructor<T> | string,
                                                                                                                                                                              +  ): Promise<T[]> {
                                                                                                                                                                              +    let type = this.getTypeViaRegistry(entityType);
                                                                                                                                                                              +    return this.getAll(type);
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  private getTypeViaRegistry(entityType: EntityConstructor | string): string {
                                                                                                                                                                              +    let type: string;
                                                                                                                                                                              +    try {
                                                                                                                                                                              +      const ctor = this.resolveConstructor(entityType);
                                                                                                                                                                              +      type = new ctor().getType();
                                                                                                                                                                              +    } catch (e) {
                                                                                                                                                                              +      console.error(e);
                                                                                                                                                                              +    }
                                                                                                                                                                              +    if (!type && typeof entityType === "string") {
                                                                                                                                                                              +      console.warn(
                                                                                                                                                                              +        "No constructor found for type; fallback for MockEntityMapper still allows to load",
                                                                                                                                                                              +        entityType,
                                                                                                                                                                              +      );
                                                                                                                                                                              +      type = entityType;
                                                                                                                                                                              +    }
                                                                                                                                                                              +    return type;
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  override async save<T extends Entity>(
                                                                                                                                                                              +    entity: T,
                                                                                                                                                                              +    forceUpdate: boolean = false,
                                                                                                                                                                              +  ): Promise<any> {
                                                                                                                                                                              +    this.add(entity);
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  override async saveAll(entities: Entity[]): Promise<any> {
                                                                                                                                                                              +    this.addAll(entities);
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  override remove<T extends Entity>(entity: T): Promise<any> {
                                                                                                                                                                              +    this.delete(entity);
                                                                                                                                                                              +    return Promise.resolve();
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  override receiveUpdates<T extends Entity>(
                                                                                                                                                                              +    entityType: EntityConstructor<T> | string,
                                                                                                                                                                              +  ): Observable<UpdatedEntity<T>> {
                                                                                                                                                                              +    let name =
                                                                                                                                                                              +      typeof entityType === "string" ? entityType : entityType.ENTITY_TYPE;
                                                                                                                                                                              +    if (!this.observables.has(name)) {
                                                                                                                                                                              +      this.observables.set(name, new Subject());
                                                                                                                                                                              +    }
                                                                                                                                                                              +    return this.observables.get(name);
                                                                                                                                                                              +  }
                                                                                                                                                                              +
                                                                                                                                                                              +  /**
                                                                                                                                                                              +   * Get a flat array of all entities in the database overall
                                                                                                                                                                              +   * for testing and debugging.
                                                                                                                                                                              +   */
                                                                                                                                                                              +  public getAllData() {
                                                                                                                                                                              +    const allData: Entity[] = [];
                                                                                                                                                                              +    for (const type of this.data.values()) {
                                                                                                                                                                              +      for (const entity of type.values()) {
                                                                                                                                                                              +        allData.push(entity);
                                                                                                                                                                              +      }
                                                                                                                                                                              +    }
                                                                                                                                                                              +    return allData;
                                                                                                                                                                              +  }
                                                                                                                                                                              +}
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              results matching ""

                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                No results matching ""

                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/NotAvailableOfflineError.html b/documentation/classes/NotAvailableOfflineError.html new file mode 100644 index 0000000000..be7e81eb39 --- /dev/null +++ b/documentation/classes/NotAvailableOfflineError.html @@ -0,0 +1,301 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                +

                                                                                                                                                                                File

                                                                                                                                                                                +

                                                                                                                                                                                +

                                                                                                                                                                                + src/app/core/session/not-available-offline.error.ts +

                                                                                                                                                                                + + +

                                                                                                                                                                                +

                                                                                                                                                                                Description

                                                                                                                                                                                +

                                                                                                                                                                                +

                                                                                                                                                                                +

                                                                                                                                                                                Custom error indicating that some functionality (like file access) is not at the moment because the app is offline +and that feature is not supported in offline mode.

                                                                                                                                                                                + +

                                                                                                                                                                                + +

                                                                                                                                                                                +

                                                                                                                                                                                Extends

                                                                                                                                                                                +

                                                                                                                                                                                +

                                                                                                                                                                                + Error +

                                                                                                                                                                                + + + + +
                                                                                                                                                                                +

                                                                                                                                                                                Constructor

                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                +constructor(feature: string) +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                feature + string + + No + +

                                                                                                                                                                                The functionality that was attempted but is not available offline.

                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                export class NotAvailableOfflineError extends Error {
                                                                                                                                                                                +  /**
                                                                                                                                                                                +   * @param feature The functionality that was attempted but is not available offline.
                                                                                                                                                                                +   */
                                                                                                                                                                                +  constructor(feature: string) {
                                                                                                                                                                                +    super("Functionality not available offline: " + feature);
                                                                                                                                                                                +  }
                                                                                                                                                                                +}
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                results matching ""

                                                                                                                                                                                +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Note.html b/documentation/classes/Note.html new file mode 100644 index 0000000000..1bff04a217 --- /dev/null +++ b/documentation/classes/Note.html @@ -0,0 +1,1985 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  +

                                                                                                                                                                                  File

                                                                                                                                                                                  +

                                                                                                                                                                                  +

                                                                                                                                                                                  + src/app/child-dev-project/notes/model/note.ts +

                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Index

                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  Properties
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  Methods
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + +

                                                                                                                                                                                  + Properties +

                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + attachment + + +
                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'file'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + authors + + +
                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'entity', isArray: true, additional: 'User', defaultValue: undefined, anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  IDs of users that authored this note

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + category + + +
                                                                                                                                                                                  + Type : InteractionType + +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'configurable-enum', additional: INTERACTION_TYPE_CONFIG_ID, anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + children + + +
                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'entity', isArray: true, additional: 'Child', entityReferenceRole: 'composite', editComponent: 'EditAttendance', anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  IDs of Child entities linked with this note

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + date + + +
                                                                                                                                                                                  + Type : Date + +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'date-only', defaultValue: undefined, anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + Static + + hasPII + + +
                                                                                                                                                                                  + Default value : true +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + relatedEntities + + +
                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'entity', isArray: true, additional: undefined, anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  other records (e.g. a recurring activity, group membership, ...) to which this note is related in some way, +so that notes can be displayed linked to these entities.

                                                                                                                                                                                  +

                                                                                                                                                                                  This property saves ids including their entity type prefix.

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + relatesTo + + +
                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  id referencing a different entity (e.g. a recurring activity) this note is related to

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + schools + + +
                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'entity', isArray: true, additional: 'School', entityReferenceRole: 'composite', anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  related school ids (e.g. to infer participants for event roll calls)

                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + subject + + +
                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField()
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + text + + +
                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'long-text'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + Static + + toStringAttributes + + +
                                                                                                                                                                                  + Type : [] + +
                                                                                                                                                                                  + Default value : ["subject"] +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + warningLevel + + +
                                                                                                                                                                                  + Type : Ordering.EnumValue + +
                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                  + + @DatabaseField({dataType: 'configurable-enum', additional: 'warning-levels', anonymize: 'retain'})
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + +

                                                                                                                                                                                  + Methods +

                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + addChild + + +
                                                                                                                                                                                  +addChild(child: Entity | string) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  adds a new child to this note

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                  child + Entity | string + + No + +

                                                                                                                                                                                  The child or the id of the child to add to the notes

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + addSchool + + +
                                                                                                                                                                                  +addSchool(school: Entity | string) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  adds a new school to this note

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                  school + Entity | string + + No + +

                                                                                                                                                                                  The school or its id to be added to the note

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + copy + + +
                                                                                                                                                                                  + + copy() +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Performs a deep copy of the note copying all simple data +(such as the date, author, e.t.c.) as well as copying the +child-array

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + countWithStatus + + +
                                                                                                                                                                                  +countWithStatus(status: AttendanceLogicalStatus) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Counts how many children have the given attendance status. +The status is counted based on the AttendanceLogicalStatus and the AttendanceStatusType.countAs attribute

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                  status + AttendanceLogicalStatus + + No + +

                                                                                                                                                                                  which should be counted

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : number + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  number of children with this status

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + Static + create + + +
                                                                                                                                                                                  + + create(date: Date, subject: string, children: string[]) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptionalDefault value
                                                                                                                                                                                  date + Date + + No + +
                                                                                                                                                                                  subject + string + + No + + "" +
                                                                                                                                                                                  children + string[] + + No + + [] +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : Note + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + getAttendance + + +
                                                                                                                                                                                  +getAttendance(child: string | Entity) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns the event attendance details for the given child.

                                                                                                                                                                                  +

                                                                                                                                                                                  This method returns a default object that can be used and updated even if no attendance has been recorded yet. +Returns undefined if the child is not added to this event/note instance.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                  child + string | Entity + + No + +

                                                                                                                                                                                  : The child or the id of the child to look for

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : EventAttendance + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + Public + + getColor + + +
                                                                                                                                                                                  + + getColor() +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + Public + getColorForId + + +
                                                                                                                                                                                  + + getColorForId(childId: string) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                  childId + string + + No +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : string + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + Static + getPropertyFor + + +
                                                                                                                                                                                  + + getPropertyFor(entityType: string) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Returns the name of the Note property where entities of the given entity type are stored

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                  entityType + string + + No +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : "children" | "schools" | "authors" | "relatedEntities" + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + + getWarningLevel + + +
                                                                                                                                                                                  + + getWarningLevel() +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Returns : WarningLevel + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + hasUnknownAttendances + + +
                                                                                                                                                                                  +hasUnknownAttendances(childId?: string) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Whether the attendance context information available through getAttendance is missing data for some children.

                                                                                                                                                                                  +

                                                                                                                                                                                  While getAttendance will always set and return at least a default value hasUnknownAttendances can be used +to flag events with incomplete data.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                  childId + string + + Yes +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : boolean + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  + + + removeChild + + +
                                                                                                                                                                                  +removeChild(childId: string) +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  removes a specific child from this note

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                  childId + string + + No + +

                                                                                                                                                                                  The id of the child to exclude from the notes

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  import { DatabaseEntity } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                  +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                  +import { DatabaseField } from "../../../core/entity/database-field.decorator";
                                                                                                                                                                                  +import {
                                                                                                                                                                                  +  INTERACTION_TYPE_CONFIG_ID,
                                                                                                                                                                                  +  InteractionType,
                                                                                                                                                                                  +} from "./interaction-type.interface";
                                                                                                                                                                                  +import {
                                                                                                                                                                                  +  EventAttendance,
                                                                                                                                                                                  +  EventAttendanceMap,
                                                                                                                                                                                  +} from "../../attendance/model/event-attendance";
                                                                                                                                                                                  +import {
                                                                                                                                                                                  +  AttendanceLogicalStatus,
                                                                                                                                                                                  +  NullAttendanceStatusType,
                                                                                                                                                                                  +} from "../../attendance/model/attendance-status";
                                                                                                                                                                                  +import { getWarningLevelColor, WarningLevel } from "../../warning-level";
                                                                                                                                                                                  +import { Ordering } from "../../../core/basic-datatypes/configurable-enum/configurable-enum-ordering";
                                                                                                                                                                                  +import { PLACEHOLDERS } from "../../../core/entity/schema/entity-schema-field";
                                                                                                                                                                                  +
                                                                                                                                                                                  +@DatabaseEntity("Note")
                                                                                                                                                                                  +export class Note extends Entity {
                                                                                                                                                                                  +  static override toStringAttributes = ["subject"];
                                                                                                                                                                                  +  static override hasPII = true;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  static create(
                                                                                                                                                                                  +    date: Date,
                                                                                                                                                                                  +    subject: string = "",
                                                                                                                                                                                  +    children: string[] = [],
                                                                                                                                                                                  +  ): Note {
                                                                                                                                                                                  +    const instance = new Note();
                                                                                                                                                                                  +    instance.date = date;
                                                                                                                                                                                  +    instance.subject = subject;
                                                                                                                                                                                  +    for (const child of children) {
                                                                                                                                                                                  +      instance.addChild(child);
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +    return instance;
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * Returns the name of the Note property where entities of the given entity type are stored
                                                                                                                                                                                  +   * @param entityType
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  static getPropertyFor(entityType: string) {
                                                                                                                                                                                  +    switch (entityType) {
                                                                                                                                                                                  +      case "Child":
                                                                                                                                                                                  +        return "children";
                                                                                                                                                                                  +      case "School":
                                                                                                                                                                                  +        return "schools";
                                                                                                                                                                                  +      case "User":
                                                                                                                                                                                  +        return "authors";
                                                                                                                                                                                  +      default:
                                                                                                                                                                                  +        return "relatedEntities";
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  // TODO: remove these special properties (children, schools) and use relatedEntities instead once the attendance system is generalized (#1364)
                                                                                                                                                                                  +  /** IDs of Child entities linked with this note */
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "entity",
                                                                                                                                                                                  +    isArray: true,
                                                                                                                                                                                  +    additional: "Child",
                                                                                                                                                                                  +    entityReferenceRole: "composite",
                                                                                                                                                                                  +    editComponent: "EditAttendance",
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  children: string[] = [];
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * optional additional information about attendance at this event for each of the linked children
                                                                                                                                                                                  +   *
                                                                                                                                                                                  +   * No direct access to change this property. Use the `.getAttendance()` method to have safe access.
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  @DatabaseField({ anonymize: "retain" })
                                                                                                                                                                                  +  private childrenAttendance: EventAttendanceMap = new EventAttendanceMap();
                                                                                                                                                                                  +
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "date-only",
                                                                                                                                                                                  +    defaultValue: {
                                                                                                                                                                                  +      mode: "dynamic",
                                                                                                                                                                                  +      value: PLACEHOLDERS.NOW,
                                                                                                                                                                                  +    },
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  date: Date;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  @DatabaseField()
                                                                                                                                                                                  +  subject: string;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  @DatabaseField({ dataType: "long-text" })
                                                                                                                                                                                  +  text: string;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /** IDs of users that authored this note */
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "entity",
                                                                                                                                                                                  +    isArray: true,
                                                                                                                                                                                  +    additional: "User",
                                                                                                                                                                                  +    defaultValue: {
                                                                                                                                                                                  +      mode: "dynamic",
                                                                                                                                                                                  +      value: PLACEHOLDERS.CURRENT_USER,
                                                                                                                                                                                  +    },
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  authors: string[] = [];
                                                                                                                                                                                  +
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "configurable-enum",
                                                                                                                                                                                  +    additional: INTERACTION_TYPE_CONFIG_ID,
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  category: InteractionType;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "file",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  attachment: string;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * id referencing a different entity (e.g. a recurring activity) this note is related to
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  relatesTo: string;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * other records (e.g. a recurring activity, group membership, ...) to which this note is related in some way,
                                                                                                                                                                                  +   * so that notes can be displayed linked to these entities.
                                                                                                                                                                                  +   *
                                                                                                                                                                                  +   * This property saves ids including their entity type prefix.
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "entity",
                                                                                                                                                                                  +    isArray: true,
                                                                                                                                                                                  +    // by default no additional relatedEntities can be linked apart from children and schools, overwrite this in config to display (e.g. additional: "ChildSchoolRelation")
                                                                                                                                                                                  +    additional: undefined,
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  relatedEntities: string[] = [];
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * related school ids (e.g. to infer participants for event roll calls)
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "entity",
                                                                                                                                                                                  +    isArray: true,
                                                                                                                                                                                  +    additional: "School",
                                                                                                                                                                                  +    entityReferenceRole: "composite",
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  schools: string[] = [];
                                                                                                                                                                                  +
                                                                                                                                                                                  +  @DatabaseField({
                                                                                                                                                                                  +    dataType: "configurable-enum",
                                                                                                                                                                                  +    additional: "warning-levels",
                                                                                                                                                                                  +    anonymize: "retain",
                                                                                                                                                                                  +  })
                                                                                                                                                                                  +  warningLevel: Ordering.EnumValue;
                                                                                                                                                                                  +
                                                                                                                                                                                  +  override getWarningLevel(): WarningLevel {
                                                                                                                                                                                  +    if (this.warningLevel) {
                                                                                                                                                                                  +      return WarningLevel[this.warningLevel.id];
                                                                                                                                                                                  +    } else {
                                                                                                                                                                                  +      return WarningLevel.NONE;
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  public override getColor() {
                                                                                                                                                                                  +    const actualLevel = this.getWarningLevel();
                                                                                                                                                                                  +    if (actualLevel === WarningLevel.OK || actualLevel === WarningLevel.NONE) {
                                                                                                                                                                                  +      return this.category?.color;
                                                                                                                                                                                  +    } else {
                                                                                                                                                                                  +      return super.getColor();
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  public getColorForId(childId: string): string {
                                                                                                                                                                                  +    if (
                                                                                                                                                                                  +      this.category?.isMeeting &&
                                                                                                                                                                                  +      this.childrenAttendance.get(childId)?.status.countAs ===
                                                                                                                                                                                  +        AttendanceLogicalStatus.ABSENT
                                                                                                                                                                                  +    ) {
                                                                                                                                                                                  +      // child is absent, highlight the entry
                                                                                                                                                                                  +      return getWarningLevelColor(WarningLevel.URGENT);
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +    return this.getColor();
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * removes a specific child from this note
                                                                                                                                                                                  +   * @param childId The id of the child to exclude from the notes
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  removeChild(childId: string) {
                                                                                                                                                                                  +    this.children = this.children.filter((c) => c !== childId);
                                                                                                                                                                                  +    this.childrenAttendance.delete(childId);
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * adds a new child to this note
                                                                                                                                                                                  +   * @param child The child or the id of the child to add to the notes
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  addChild(child: Entity | string) {
                                                                                                                                                                                  +    const childId = typeof child === "string" ? child : child?.getId();
                                                                                                                                                                                  +    if (!childId || this.children.includes(childId)) {
                                                                                                                                                                                  +      return;
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +
                                                                                                                                                                                  +    this.children = this.children.concat(childId);
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * adds a new school to this note
                                                                                                                                                                                  +   * @param school The school or its id to be added to the note
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  addSchool(school: Entity | string) {
                                                                                                                                                                                  +    const schoolId = typeof school === "string" ? school : school.getId();
                                                                                                                                                                                  +    if (this.schools.includes(schoolId)) {
                                                                                                                                                                                  +      return;
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +
                                                                                                                                                                                  +    this.schools = this.schools.concat(schoolId);
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * Returns the event attendance details for the given child.
                                                                                                                                                                                  +   *
                                                                                                                                                                                  +   * This method returns a default object that can be used and updated even if no attendance has been recorded yet.
                                                                                                                                                                                  +   * Returns undefined if the child is not added to this event/note instance.
                                                                                                                                                                                  +   *
                                                                                                                                                                                  +   * @param child: The child or the id of the child to look for
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  getAttendance(child: string | Entity): EventAttendance {
                                                                                                                                                                                  +    const childId = typeof child === "string" ? child : child.getId();
                                                                                                                                                                                  +    if (!this.children.includes(childId)) {
                                                                                                                                                                                  +      return undefined;
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +
                                                                                                                                                                                  +    let attendance = this.childrenAttendance.get(childId);
                                                                                                                                                                                  +    if (!attendance) {
                                                                                                                                                                                  +      attendance = new EventAttendance();
                                                                                                                                                                                  +      this.childrenAttendance.set(childId, attendance);
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +    if (!(attendance instanceof EventAttendance)) {
                                                                                                                                                                                  +      attendance = Object.assign(new EventAttendance(), attendance);
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +    return attendance;
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * Whether the attendance context information available through `getAttendance` is missing data for some children.
                                                                                                                                                                                  +   *
                                                                                                                                                                                  +   * While getAttendance will always set and return at least a default value `hasUnknownAttendances` can be used
                                                                                                                                                                                  +   * to flag events with incomplete data.
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  hasUnknownAttendances(childId?: string): boolean {
                                                                                                                                                                                  +    if (childId) {
                                                                                                                                                                                  +      return (
                                                                                                                                                                                  +        this.getAttendance(childId).status.id === NullAttendanceStatusType.id
                                                                                                                                                                                  +      );
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +
                                                                                                                                                                                  +    if (this.childrenAttendance.size < this.children.length) {
                                                                                                                                                                                  +      return true;
                                                                                                                                                                                  +    } else {
                                                                                                                                                                                  +      for (const v of this.childrenAttendance.values()) {
                                                                                                                                                                                  +        if (v.status.id === NullAttendanceStatusType.id) {
                                                                                                                                                                                  +          return true;
                                                                                                                                                                                  +        }
                                                                                                                                                                                  +      }
                                                                                                                                                                                  +    }
                                                                                                                                                                                  +    return false;
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * Counts how many children have the given attendance status.
                                                                                                                                                                                  +   * The status is counted based on the AttendanceLogicalStatus and the `AttendanceStatusType.countAs` attribute
                                                                                                                                                                                  +   * @param status which should be counted
                                                                                                                                                                                  +   * @returns number of children with this status
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  countWithStatus(status: AttendanceLogicalStatus): number {
                                                                                                                                                                                  +    const attendanceValues = this.childrenAttendance.values();
                                                                                                                                                                                  +    return [...attendanceValues].filter(
                                                                                                                                                                                  +      (attendance) => attendance.status.countAs === status,
                                                                                                                                                                                  +    ).length;
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +
                                                                                                                                                                                  +  /**
                                                                                                                                                                                  +   * Performs a deep copy of the note copying all simple data
                                                                                                                                                                                  +   * (such as the date, author, e.t.c.) as well as copying the
                                                                                                                                                                                  +   * child-array
                                                                                                                                                                                  +   */
                                                                                                                                                                                  +  override copy(): this {
                                                                                                                                                                                  +    const note = super.copy();
                                                                                                                                                                                  +    note.children = [...this.children];
                                                                                                                                                                                  +    note.schools = [...this.schools];
                                                                                                                                                                                  +    note.relatedEntities = [...this.relatedEntities];
                                                                                                                                                                                  +    note.authors = [...this.authors];
                                                                                                                                                                                  +    note.childrenAttendance = new EventAttendanceMap();
                                                                                                                                                                                  +    this.childrenAttendance.forEach((value, key) => {
                                                                                                                                                                                  +      note.childrenAttendance.set(key, value.copy());
                                                                                                                                                                                  +    });
                                                                                                                                                                                  +    return note;
                                                                                                                                                                                  +  }
                                                                                                                                                                                  +}
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  results matching ""

                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ObservableMatchersImpl.html b/documentation/classes/ObservableMatchersImpl.html new file mode 100644 index 0000000000..a0187e1404 --- /dev/null +++ b/documentation/classes/ObservableMatchersImpl.html @@ -0,0 +1,393 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    +

                                                                                                                                                                                    File

                                                                                                                                                                                    +

                                                                                                                                                                                    +

                                                                                                                                                                                    + src/app/utils/test-utils/observable-utils.ts +

                                                                                                                                                                                    + + + + +

                                                                                                                                                                                    +

                                                                                                                                                                                    Implements

                                                                                                                                                                                    +

                                                                                                                                                                                    +

                                                                                                                                                                                    + ObservableMatchers +

                                                                                                                                                                                    + + +
                                                                                                                                                                                    +

                                                                                                                                                                                    Index

                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    Accessors
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +

                                                                                                                                                                                    Constructor

                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                    +constructor(observable: Observable) +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                    observable + Observable<T> + + No +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                    +

                                                                                                                                                                                    + Accessors +

                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                    + + first +
                                                                                                                                                                                    + getfirst() +
                                                                                                                                                                                    + +
                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                    + + inSequence +
                                                                                                                                                                                    + getinSequence() +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    import { firstValueFrom, Observable } from "rxjs";
                                                                                                                                                                                    +import { toArray } from "rxjs/operators";
                                                                                                                                                                                    +
                                                                                                                                                                                    +export interface ObservableMatchers<T> {
                                                                                                                                                                                    +  /**
                                                                                                                                                                                    +   * only check for the first value if an observable
                                                                                                                                                                                    +   * and discard the rest
                                                                                                                                                                                    +   */
                                                                                                                                                                                    +  first: jasmine.AsyncMatchers<T, any>;
                                                                                                                                                                                    +
                                                                                                                                                                                    +  /**
                                                                                                                                                                                    +   * check for all observables in the sequence that they
                                                                                                                                                                                    +   * arrived
                                                                                                                                                                                    +   */
                                                                                                                                                                                    +  inSequence: jasmine.AsyncMatchers<T[], any>;
                                                                                                                                                                                    +}
                                                                                                                                                                                    +
                                                                                                                                                                                    +export function expectObservable<T>(
                                                                                                                                                                                    +  observable: Observable<T>,
                                                                                                                                                                                    +): ObservableMatchers<T> {
                                                                                                                                                                                    +  return new ObservableMatchersImpl(observable);
                                                                                                                                                                                    +}
                                                                                                                                                                                    +
                                                                                                                                                                                    +class ObservableMatchersImpl<T> implements ObservableMatchers<T> {
                                                                                                                                                                                    +  constructor(private observable: Observable<T>) {}
                                                                                                                                                                                    +
                                                                                                                                                                                    +  get first(): jasmine.AsyncMatchers<T, any> {
                                                                                                                                                                                    +    return expectAsync(firstValueFrom(this.observable));
                                                                                                                                                                                    +  }
                                                                                                                                                                                    +
                                                                                                                                                                                    +  get inSequence(): jasmine.AsyncMatchers<T[], any> {
                                                                                                                                                                                    +    return expectAsync(firstValueFrom(this.observable.pipe(toArray())));
                                                                                                                                                                                    +  }
                                                                                                                                                                                    +}
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    results matching ""

                                                                                                                                                                                    +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ObservableQueue.html b/documentation/classes/ObservableQueue.html new file mode 100644 index 0000000000..86fab19311 --- /dev/null +++ b/documentation/classes/ObservableQueue.html @@ -0,0 +1,351 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      +

                                                                                                                                                                                      File

                                                                                                                                                                                      +

                                                                                                                                                                                      +

                                                                                                                                                                                      + src/app/features/file/observable-queue/observable-queue.ts +

                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                      +

                                                                                                                                                                                      Index

                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      Methods
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + +
                                                                                                                                                                                      + +

                                                                                                                                                                                      + Methods +

                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                      + + + add + + +
                                                                                                                                                                                      +add(obs: Observable) +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + Type parameters : +
                                                                                                                                                                                        +
                                                                                                                                                                                      • T
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                      obs + Observable<T> + + No +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + Returns : Observable<T> + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      import { last, Observable, of } from "rxjs";
                                                                                                                                                                                      +import { catchError, concatMap, shareReplay } from "rxjs/operators";
                                                                                                                                                                                      +
                                                                                                                                                                                      +export class ObservableQueue {
                                                                                                                                                                                      +  private jobQueue: Observable<any> = of(undefined);
                                                                                                                                                                                      +
                                                                                                                                                                                      +  add<T>(obs: Observable<T>): Observable<T> {
                                                                                                                                                                                      +    const newJob = this.jobQueue.pipe(
                                                                                                                                                                                      +      concatMap(() => obs),
                                                                                                                                                                                      +      shareReplay(),
                                                                                                                                                                                      +    );
                                                                                                                                                                                      +    this.jobQueue = newJob.pipe(
                                                                                                                                                                                      +      last(),
                                                                                                                                                                                      +      catchError(() => of(undefined)),
                                                                                                                                                                                      +    );
                                                                                                                                                                                      +    return newJob;
                                                                                                                                                                                      +  }
                                                                                                                                                                                      +}
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      results matching ""

                                                                                                                                                                                      +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ProgressDashboardConfig.html b/documentation/classes/ProgressDashboardConfig.html new file mode 100644 index 0000000000..f9772e59e6 --- /dev/null +++ b/documentation/classes/ProgressDashboardConfig.html @@ -0,0 +1,429 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        +

                                                                                                                                                                                        File

                                                                                                                                                                                        +

                                                                                                                                                                                        +

                                                                                                                                                                                        + src/app/features/dashboard-widgets/progress-dashboard-widget/progress-dashboard/progress-dashboard-config.ts +

                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                        +

                                                                                                                                                                                        Index

                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        Properties
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        Methods
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + +

                                                                                                                                                                                        + Properties +

                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                        + + + + parts + + +
                                                                                                                                                                                        + Type : Array<ProgressDashboardPart> + +
                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                        + Decorators : +
                                                                                                                                                                                        + + @DatabaseField({isArray: true})
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                        + + + + title + + +
                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                        + Default value : $localize`Progress Widget` +
                                                                                                                                                                                        + Decorators : +
                                                                                                                                                                                        + + @DatabaseField()
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + +

                                                                                                                                                                                        + Methods +

                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                        + + + getTotalPercentage + + +
                                                                                                                                                                                        +getTotalPercentage() +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + Returns : number + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                        +import { DatabaseEntity } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                        +import { DatabaseField } from "../../../../core/entity/database-field.decorator";
                                                                                                                                                                                        +
                                                                                                                                                                                        +@DatabaseEntity("ProgressDashboardConfig")
                                                                                                                                                                                        +export class ProgressDashboardConfig extends Entity {
                                                                                                                                                                                        +  @DatabaseField() title: string = $localize`Progress Widget`;
                                                                                                                                                                                        +  @DatabaseField({ isArray: true }) parts: Array<ProgressDashboardPart> = [];
                                                                                                                                                                                        +
                                                                                                                                                                                        +  getTotalPercentage() {
                                                                                                                                                                                        +    const currentTotal = this.parts.reduce(
                                                                                                                                                                                        +      (acc, entry) => acc + entry.currentValue,
                                                                                                                                                                                        +      0,
                                                                                                                                                                                        +    );
                                                                                                                                                                                        +    const targetTotal = this.parts.reduce(
                                                                                                                                                                                        +      (acc, entry) => acc + entry.targetValue,
                                                                                                                                                                                        +      0,
                                                                                                                                                                                        +    );
                                                                                                                                                                                        +    return currentTotal / targetTotal;
                                                                                                                                                                                        +  }
                                                                                                                                                                                        +}
                                                                                                                                                                                        +
                                                                                                                                                                                        +export interface ProgressDashboardPart {
                                                                                                                                                                                        +  label: string;
                                                                                                                                                                                        +  currentValue: number;
                                                                                                                                                                                        +  targetValue: number;
                                                                                                                                                                                        +}
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        results matching ""

                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/PublicFormConfig.html b/documentation/classes/PublicFormConfig.html new file mode 100644 index 0000000000..795674a2a7 --- /dev/null +++ b/documentation/classes/PublicFormConfig.html @@ -0,0 +1,462 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          +

                                                                                                                                                                                          File

                                                                                                                                                                                          +

                                                                                                                                                                                          +

                                                                                                                                                                                          + src/app/features/public-form/public-form-config.ts +

                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                          +

                                                                                                                                                                                          Index

                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          Properties
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + +

                                                                                                                                                                                          + Properties +

                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                          + + + + columns + + +
                                                                                                                                                                                          + Type : string[][] + +
                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                          + + @DatabaseField()
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                          + + + + description + + +
                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                          + + @DatabaseField()
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                          + + + + entity + + +
                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                          + + @DatabaseField()
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                          + + + + prefilled + + +
                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                          + + @DatabaseField()
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                          + + + + title + + +
                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                          + + @DatabaseField()
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + + + + + + +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          import { Entity } from "../../core/entity/model/entity";
                                                                                                                                                                                          +import { DatabaseEntity } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                          +import { DatabaseField } from "../../core/entity/database-field.decorator";
                                                                                                                                                                                          +
                                                                                                                                                                                          +@DatabaseEntity("PublicFormConfig")
                                                                                                                                                                                          +export class PublicFormConfig extends Entity {
                                                                                                                                                                                          +  @DatabaseField() title: string;
                                                                                                                                                                                          +  @DatabaseField() description: string;
                                                                                                                                                                                          +  @DatabaseField() entity: string;
                                                                                                                                                                                          +  @DatabaseField() columns: string[][];
                                                                                                                                                                                          +  @DatabaseField() prefilled: { [key in string]: any };
                                                                                                                                                                                          +}
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          results matching ""

                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/QueryDataSource.html b/documentation/classes/QueryDataSource.html new file mode 100644 index 0000000000..e678b16847 --- /dev/null +++ b/documentation/classes/QueryDataSource.html @@ -0,0 +1,757 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            +

                                                                                                                                                                                            File

                                                                                                                                                                                            +

                                                                                                                                                                                            +

                                                                                                                                                                                            + src/app/core/database/query-data-source.ts +

                                                                                                                                                                                            + + +

                                                                                                                                                                                            +

                                                                                                                                                                                            Description

                                                                                                                                                                                            +

                                                                                                                                                                                            +

                                                                                                                                                                                            +

                                                                                                                                                                                            Implementation of a datasource that directly queries an index on the Database +supporting optional pagination to only load a subset of the data as required by a paginator.

                                                                                                                                                                                            +

                                                                                                                                                                                            An instance of QueryDataSource can be created and used as source for a mat-table component.

                                                                                                                                                                                            +

                                                                                                                                                                                            also see https://material.angular.io/cdk/table/overview#connecting-the-table-to-a-data-source +and https://medium.com/angular-in-depth/angular-material-pagination-datasource-73080d3457fe

                                                                                                                                                                                            + +

                                                                                                                                                                                            + + +

                                                                                                                                                                                            +

                                                                                                                                                                                            Implements

                                                                                                                                                                                            +

                                                                                                                                                                                            +

                                                                                                                                                                                            + DataSource +

                                                                                                                                                                                            + + +
                                                                                                                                                                                            +

                                                                                                                                                                                            Index

                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            Properties
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            Methods
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            Accessors
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +

                                                                                                                                                                                            Constructor

                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                            +constructor(database: Database, queryName: string) +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                            database + Database + + No +
                                                                                                                                                                                            queryName + string + + No +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + +

                                                                                                                                                                                            + Properties +

                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            + + + Public + loading$ + + +
                                                                                                                                                                                            + Default value : this.loadingSubject.asObservable() +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +

                                                                                                                                                                                            Indicates whether the datasource is currently loading new data

                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + +

                                                                                                                                                                                            + Methods +

                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            + + + connect + + +
                                                                                                                                                                                            +connect(collectionViewer: CollectionViewer) +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +

                                                                                                                                                                                            Connect to the datasource and receive an observable to subscribe to loaded data. +Whenever pagination is changed this will emit new datasets.

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                            collectionViewer + CollectionViewer + + No + +

                                                                                                                                                                                            (not necessary)

                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + Returns : Observable<T[]> + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            + + + disconnect + + +
                                                                                                                                                                                            +disconnect(collectionViewer: CollectionViewer) +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +

                                                                                                                                                                                            Disconnect and discard open observables for this datasource.

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                            collectionViewer + CollectionViewer + + No + +

                                                                                                                                                                                            (not necessary)

                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            + + + Async + loadData + + +
                                                                                                                                                                                            + + loadData() +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +

                                                                                                                                                                                            (re)load data from the database for the given query and (if set) to current pagination values.

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                            +

                                                                                                                                                                                            + Accessors +

                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            + + paginator +
                                                                                                                                                                                            + getpaginator() +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + setpaginator(value: MatPaginator | null) +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                            value + MatPaginator | null + + No +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            import { CollectionViewer, DataSource } from "@angular/cdk/collections";
                                                                                                                                                                                            +import { BehaviorSubject, Observable } from "rxjs";
                                                                                                                                                                                            +import { MatPaginator } from "@angular/material/paginator";
                                                                                                                                                                                            +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                            +import { Database } from "./database";
                                                                                                                                                                                            +
                                                                                                                                                                                            +/**
                                                                                                                                                                                            + * Implementation of a datasource that directly queries an index on the {@link Database}
                                                                                                                                                                                            + * supporting optional pagination to only load a subset of the data as required by a paginator.
                                                                                                                                                                                            + *
                                                                                                                                                                                            + * An instance of QueryDataSource can be created and used as source for a mat-table component.
                                                                                                                                                                                            + *
                                                                                                                                                                                            + * also see https://material.angular.io/cdk/table/overview#connecting-the-table-to-a-data-source
                                                                                                                                                                                            + * and https://medium.com/angular-in-depth/angular-material-pagination-datasource-73080d3457fe
                                                                                                                                                                                            + */
                                                                                                                                                                                            +export class QueryDataSource<T extends Entity> implements DataSource<T> {
                                                                                                                                                                                            +  /** internal observable to emit new result data. This is provided to users calling .connect() */
                                                                                                                                                                                            +  private dataSubject = new BehaviorSubject<T[]>([]);
                                                                                                                                                                                            +
                                                                                                                                                                                            +  /** internal observable to emit new loading status. This is provided to users through the public .loading$ */
                                                                                                                                                                                            +  private loadingSubject = new BehaviorSubject<boolean>(false);
                                                                                                                                                                                            +
                                                                                                                                                                                            +  /** Indicates whether the datasource is currently loading new data */
                                                                                                                                                                                            +  public loading$ = this.loadingSubject.asObservable();
                                                                                                                                                                                            +
                                                                                                                                                                                            +  private _paginator: MatPaginator | null;
                                                                                                                                                                                            +  get paginator(): MatPaginator | null {
                                                                                                                                                                                            +    return this._paginator;
                                                                                                                                                                                            +  }
                                                                                                                                                                                            +  set paginator(value: MatPaginator | null) {
                                                                                                                                                                                            +    this._paginator = value;
                                                                                                                                                                                            +
                                                                                                                                                                                            +    if (this.paginator) {
                                                                                                                                                                                            +      this.paginator.page.subscribe(() => this.loadData());
                                                                                                                                                                                            +      this.loadData();
                                                                                                                                                                                            +    }
                                                                                                                                                                                            +  }
                                                                                                                                                                                            +
                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                            +    private database: Database,
                                                                                                                                                                                            +    private queryName: string,
                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                            +
                                                                                                                                                                                            +  /**
                                                                                                                                                                                            +   * Connect to the datasource and receive an observable to subscribe to loaded data.
                                                                                                                                                                                            +   * Whenever pagination is changed this will emit new datasets.
                                                                                                                                                                                            +   * @param collectionViewer (not necessary)
                                                                                                                                                                                            +   */
                                                                                                                                                                                            +  connect(collectionViewer: CollectionViewer): Observable<T[]> {
                                                                                                                                                                                            +    this.loadData();
                                                                                                                                                                                            +    return this.dataSubject.asObservable();
                                                                                                                                                                                            +  }
                                                                                                                                                                                            +
                                                                                                                                                                                            +  /**
                                                                                                                                                                                            +   * Disconnect and discard open observables for this datasource.
                                                                                                                                                                                            +   * @param collectionViewer (not necessary)
                                                                                                                                                                                            +   */
                                                                                                                                                                                            +  disconnect(collectionViewer: CollectionViewer): void {
                                                                                                                                                                                            +    this.dataSubject.complete();
                                                                                                                                                                                            +    this.loadingSubject.complete();
                                                                                                                                                                                            +  }
                                                                                                                                                                                            +
                                                                                                                                                                                            +  /**
                                                                                                                                                                                            +   * (re)load data from the database for the given query and (if set) to current pagination values.
                                                                                                                                                                                            +   */
                                                                                                                                                                                            +  async loadData() {
                                                                                                                                                                                            +    this.loadingSubject.next(true);
                                                                                                                                                                                            +
                                                                                                                                                                                            +    const options: any = {
                                                                                                                                                                                            +      include_docs: true,
                                                                                                                                                                                            +    };
                                                                                                                                                                                            +    if (this.paginator) {
                                                                                                                                                                                            +      options.limit = this.paginator.pageSize;
                                                                                                                                                                                            +      options.skip = this.paginator.pageIndex * this.paginator.pageSize;
                                                                                                                                                                                            +    }
                                                                                                                                                                                            +
                                                                                                                                                                                            +    const results = await this.database.query(this.queryName, options);
                                                                                                                                                                                            +
                                                                                                                                                                                            +    this.paginator.length = results.total_rows;
                                                                                                                                                                                            +    this.dataSubject.next(results.rows);
                                                                                                                                                                                            +
                                                                                                                                                                                            +    this.loadingSubject.next(false);
                                                                                                                                                                                            +  }
                                                                                                                                                                                            +}
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            results matching ""

                                                                                                                                                                                            +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/RecurringActivity.html b/documentation/classes/RecurringActivity.html new file mode 100644 index 0000000000..1ff198eecf --- /dev/null +++ b/documentation/classes/RecurringActivity.html @@ -0,0 +1,909 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              +

                                                                                                                                                                                              File

                                                                                                                                                                                              +

                                                                                                                                                                                              +

                                                                                                                                                                                              + src/app/child-dev-project/attendance/model/recurring-activity.ts +

                                                                                                                                                                                              + + + + + + +
                                                                                                                                                                                              +

                                                                                                                                                                                              Index

                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              Properties
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              Methods
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              + +

                                                                                                                                                                                              + Properties +

                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + + assignedTo + + +
                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                              + + @DatabaseField({dataType: 'entity', isArray: true})
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +

                                                                                                                                                                                              IDs of the users who are responsible for conducting this activity

                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + + excludedParticipants + + +
                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                              + + @DatabaseField({dataType: 'entity', isArray: true})
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +

                                                                                                                                                                                              IDs of children that should be excluded from this activity despite being a group member

                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + + linkedGroups + + +
                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                              + + @DatabaseField({dataType: 'entity', isArray: true})
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +

                                                                                                                                                                                              IDs of groups (schools, teams) whose (active) members should be included in the activity

                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + + participants + + +
                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                              + + @DatabaseField({dataType: 'entity', isArray: true})
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +

                                                                                                                                                                                              IDs of children linked to this activity

                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + Static + + route + + +
                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                              + Default value : "attendance/recurring-activity" +
                                                                                                                                                                                              + +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + + title + + +
                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                              + Default value : "" +
                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                              + + @DatabaseField()
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +

                                                                                                                                                                                              primary name to identify the activity

                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + + type + + +
                                                                                                                                                                                              + Type : InteractionType + +
                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                              + + @DatabaseField({dataType: 'configurable-enum', additional: INTERACTION_TYPE_CONFIG_ID})
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +

                                                                                                                                                                                              a category to group and filter activities by.

                                                                                                                                                                                              +

                                                                                                                                                                                              This is also assigned to individual events' category generated for this activity.

                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              + +

                                                                                                                                                                                              + Methods +

                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + Static + create + + +
                                                                                                                                                                                              + + create(title: string) +
                                                                                                                                                                                              + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              NameTypeOptionalDefault value
                                                                                                                                                                                              title + string + + No + + "" +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + Returns : RecurringActivity + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + Static + isActivityEventNote + + +
                                                                                                                                                                                              + + isActivityEventNote(note: Note) +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +

                                                                                                                                                                                              Check whether the given note instance represents an event of a recurring activity

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                              note + Note + + No +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              + + + isAssignedTo + + +
                                                                                                                                                                                              +isAssignedTo(username: string) +
                                                                                                                                                                                              + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                              username + string + + No +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + Returns : boolean + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                              +import { DatabaseEntity } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                              +import { DatabaseField } from "../../../core/entity/database-field.decorator";
                                                                                                                                                                                              +import { Note } from "../../notes/model/note";
                                                                                                                                                                                              +import {
                                                                                                                                                                                              +  INTERACTION_TYPE_CONFIG_ID,
                                                                                                                                                                                              +  InteractionType,
                                                                                                                                                                                              +} from "../../notes/model/interaction-type.interface";
                                                                                                                                                                                              +import { asArray } from "../../../utils/utils";
                                                                                                                                                                                              +
                                                                                                                                                                                              +@DatabaseEntity("RecurringActivity")
                                                                                                                                                                                              +export class RecurringActivity extends Entity {
                                                                                                                                                                                              +  static override route = "attendance/recurring-activity";
                                                                                                                                                                                              +
                                                                                                                                                                                              +  static create(title: string = ""): RecurringActivity {
                                                                                                                                                                                              +    const instance = new RecurringActivity();
                                                                                                                                                                                              +    instance.title = title;
                                                                                                                                                                                              +    return instance;
                                                                                                                                                                                              +  }
                                                                                                                                                                                              +
                                                                                                                                                                                              +  /**
                                                                                                                                                                                              +   * Check whether the given note instance represents an event of a recurring activity
                                                                                                                                                                                              +   * @param note
                                                                                                                                                                                              +   */
                                                                                                                                                                                              +  static isActivityEventNote(note: Note) {
                                                                                                                                                                                              +    return (note?.relatesTo ?? "").startsWith(RecurringActivity.ENTITY_TYPE);
                                                                                                                                                                                              +  }
                                                                                                                                                                                              +
                                                                                                                                                                                              +  /** primary name to identify the activity */
                                                                                                                                                                                              +  @DatabaseField()
                                                                                                                                                                                              +  title: string = "";
                                                                                                                                                                                              +
                                                                                                                                                                                              +  /**
                                                                                                                                                                                              +   * a category to group and filter activities by.
                                                                                                                                                                                              +   *
                                                                                                                                                                                              +   * This is also assigned to individual events' category generated for this activity.
                                                                                                                                                                                              +   */
                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                              +    dataType: "configurable-enum",
                                                                                                                                                                                              +    additional: INTERACTION_TYPE_CONFIG_ID,
                                                                                                                                                                                              +  })
                                                                                                                                                                                              +  type: InteractionType;
                                                                                                                                                                                              +
                                                                                                                                                                                              +  /** IDs of children linked to this activity */
                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                              +    dataType: "entity",
                                                                                                                                                                                              +    isArray: true,
                                                                                                                                                                                              +  })
                                                                                                                                                                                              +  participants: string[] = [];
                                                                                                                                                                                              +
                                                                                                                                                                                              +  /** IDs of groups (schools, teams) whose (active) members should be included in the activity*/
                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                              +    dataType: "entity",
                                                                                                                                                                                              +    isArray: true,
                                                                                                                                                                                              +  })
                                                                                                                                                                                              +  linkedGroups: string[] = [];
                                                                                                                                                                                              +
                                                                                                                                                                                              +  /** IDs of children that should be excluded from this activity despite being a group member */
                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                              +    dataType: "entity",
                                                                                                                                                                                              +    isArray: true,
                                                                                                                                                                                              +  })
                                                                                                                                                                                              +  excludedParticipants: string[] = [];
                                                                                                                                                                                              +
                                                                                                                                                                                              +  /** IDs of the users who are responsible for conducting this activity */
                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                              +    dataType: "entity",
                                                                                                                                                                                              +    isArray: true,
                                                                                                                                                                                              +  })
                                                                                                                                                                                              +  assignedTo: string[] = [];
                                                                                                                                                                                              +
                                                                                                                                                                                              +  isAssignedTo(username: string): boolean {
                                                                                                                                                                                              +    return !!asArray(this.assignedTo).find((name) => username === name);
                                                                                                                                                                                              +  }
                                                                                                                                                                                              +}
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              results matching ""

                                                                                                                                                                                              +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Registry.html b/documentation/classes/Registry.html new file mode 100644 index 0000000000..6fcf0a22f5 --- /dev/null +++ b/documentation/classes/Registry.html @@ -0,0 +1,643 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                +

                                                                                                                                                                                                File

                                                                                                                                                                                                +

                                                                                                                                                                                                +

                                                                                                                                                                                                + src/app/core/config/registry/dynamic-registry.ts +

                                                                                                                                                                                                + + +

                                                                                                                                                                                                +

                                                                                                                                                                                                Description

                                                                                                                                                                                                +

                                                                                                                                                                                                +

                                                                                                                                                                                                +

                                                                                                                                                                                                A registry is an affordance to register dynamic objects to strings. +It is commonly used to dynamically load entities, views or routes from the config

                                                                                                                                                                                                +

                                                                                                                                                                                                A registry cannot be instantiated directly. Instead, you should subclass from the registry +and register it in the AppModule +See EntityRegistry for an example

                                                                                                                                                                                                + +

                                                                                                                                                                                                + +

                                                                                                                                                                                                +

                                                                                                                                                                                                Extends

                                                                                                                                                                                                +

                                                                                                                                                                                                +

                                                                                                                                                                                                + Map +

                                                                                                                                                                                                + + + +
                                                                                                                                                                                                +

                                                                                                                                                                                                Index

                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                Methods
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +

                                                                                                                                                                                                Constructor

                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                +constructor(beforeAddCheck?: (key?: string,mapping?: T) => void) +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                beforeAddCheck + function + + Yes +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                + +

                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                + + + Public + add + + +
                                                                                                                                                                                                + + add(key: string, mapping: T) +
                                                                                                                                                                                                + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                key + string + + No +
                                                                                                                                                                                                mapping + T + + No +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                + + + Public + addAll + + +
                                                                                                                                                                                                + + addAll(tuples: []) +
                                                                                                                                                                                                + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                tuples + [] + + No +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                + + + Public + allowDuplicates + + +
                                                                                                                                                                                                + + allowDuplicates() +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +

                                                                                                                                                                                                Calling this will allow the same keys to be added multiple times without thrown errors. +This is useful for storybook where live-updates re-trigger the decorator while the registry is cached.

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                + + + Public + + get + + +
                                                                                                                                                                                                + + get(key: string) +
                                                                                                                                                                                                + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                key + string + + No +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + Returns : T + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                export abstract class Registry<T> extends Map<string, T> {
                                                                                                                                                                                                +  // This controls whether the registry will throw an error when a key is added multiple times
                                                                                                                                                                                                +  private failOnDuplicate = true;
                                                                                                                                                                                                +
                                                                                                                                                                                                +  constructor(private beforeAddCheck?: (key: string, mapping: T) => void) {
                                                                                                                                                                                                +    super();
                                                                                                                                                                                                +  }
                                                                                                                                                                                                +
                                                                                                                                                                                                +  public add(key: string, mapping: T) {
                                                                                                                                                                                                +    this.beforeAddCheck?.(key, mapping);
                                                                                                                                                                                                +    if (this.has(key) && this.failOnDuplicate) {
                                                                                                                                                                                                +      throw Error(
                                                                                                                                                                                                +        `${
                                                                                                                                                                                                +          this.constructor.name
                                                                                                                                                                                                +        }: Duplicate entity definition: ${key} is already registered with element ${this.get(
                                                                                                                                                                                                +          key,
                                                                                                                                                                                                +        )}`,
                                                                                                                                                                                                +      );
                                                                                                                                                                                                +    }
                                                                                                                                                                                                +    this.set(key, mapping);
                                                                                                                                                                                                +  }
                                                                                                                                                                                                +
                                                                                                                                                                                                +  public addAll(tuples: [string, T][]) {
                                                                                                                                                                                                +    tuples.forEach(([name, value]) => this.add(name, value));
                                                                                                                                                                                                +  }
                                                                                                                                                                                                +
                                                                                                                                                                                                +  public override get(key: string): T {
                                                                                                                                                                                                +    if (!this.has(key)) {
                                                                                                                                                                                                +      throw Error(
                                                                                                                                                                                                +        `${this.constructor.name}: Requested item "${key}" is not registered. See dynamic-registry.ts for more details.`,
                                                                                                                                                                                                +      );
                                                                                                                                                                                                +      // To register a component, add @DynamicComponent("COMPONENTNAME") to the components .ts-file and implement the onInitFromDynamicConfig method, e.g. onInitFromDynamicConfig(config: any) {}
                                                                                                                                                                                                +    }
                                                                                                                                                                                                +    return super.get(key);
                                                                                                                                                                                                +  }
                                                                                                                                                                                                +
                                                                                                                                                                                                +  /**
                                                                                                                                                                                                +   * Calling this will allow the same keys to be added multiple times without thrown errors.
                                                                                                                                                                                                +   * This is useful for storybook where live-updates re-trigger the decorator while the registry is cached.
                                                                                                                                                                                                +   */
                                                                                                                                                                                                +  public allowDuplicates() {
                                                                                                                                                                                                +    this.failOnDuplicate = false;
                                                                                                                                                                                                +  }
                                                                                                                                                                                                +}
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/RemoteLoginNotAvailableError.html b/documentation/classes/RemoteLoginNotAvailableError.html new file mode 100644 index 0000000000..b4dc168135 --- /dev/null +++ b/documentation/classes/RemoteLoginNotAvailableError.html @@ -0,0 +1,263 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  File

                                                                                                                                                                                                  +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  + src/app/core/session/auth/keycloak/remote-login-not-available.error.ts +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Description

                                                                                                                                                                                                  +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Custom error indicating that Remote Auth Server cannot be reached.

                                                                                                                                                                                                  + +

                                                                                                                                                                                                  + +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Extends

                                                                                                                                                                                                  +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  + Error +

                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                  + + + + + + + + + + +
                                                                                                                                                                                                  +constructor() +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  export class RemoteLoginNotAvailableError extends Error {
                                                                                                                                                                                                  +  constructor() {
                                                                                                                                                                                                  +    super("Remote login currently unavailable.");
                                                                                                                                                                                                  +    Object.setPrototypeOf(this, RemoteLoginNotAvailableError.prototype);
                                                                                                                                                                                                  +  }
                                                                                                                                                                                                  +}
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                  +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ReportConfig.html b/documentation/classes/ReportConfig.html new file mode 100644 index 0000000000..802fe8390e --- /dev/null +++ b/documentation/classes/ReportConfig.html @@ -0,0 +1,598 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    +

                                                                                                                                                                                                    File

                                                                                                                                                                                                    +

                                                                                                                                                                                                    +

                                                                                                                                                                                                    + src/app/features/reporting/report-config.ts +

                                                                                                                                                                                                    + + +

                                                                                                                                                                                                    +

                                                                                                                                                                                                    Description

                                                                                                                                                                                                    +

                                                                                                                                                                                                    +

                                                                                                                                                                                                    +

                                                                                                                                                                                                    A report can be accessed by users to generate aggregated statistics or customized exports calculated from available data. +"read" permission for a ReportConfig entity is also used to control which users can generate the report's results.

                                                                                                                                                                                                    +

                                                                                                                                                                                                    This is the class which is saved to the database. +However, when using this in code, use the ReportEntity instead which provides better type safety.

                                                                                                                                                                                                    + +

                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    Index

                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Properties
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + +
                                                                                                                                                                                                    + +

                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    + + + + aggregationDefinition + + +
                                                                                                                                                                                                    + Type : string | undefined + +
                                                                                                                                                                                                    + Default value : undefined +
                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                    + + @DatabaseField()
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    (sql only) the definition to calculate the report

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    + + + + aggregationDefinitions + + +
                                                                                                                                                                                                    + Type : any[] + +
                                                                                                                                                                                                    + Default value : [] +
                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                    + + @DatabaseField()
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    the definitions to calculate the report's aggregations

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    + + + + Optional + mode + + +
                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                    + + @DatabaseField()
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    (optional) mode of export. +The ReportEntity holds the restriction on valid report modes. +Default is "reporting"

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    + + + + Optional + neededArgs + + +
                                                                                                                                                                                                    + Type : string[] + +
                                                                                                                                                                                                    + Default value : [] +
                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                    + + @DatabaseField()
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    (sql only) list of arguments needed for the sql query. Placeholder "?" will be replaced.

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    + + + + title + + +
                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                    + + @DatabaseField()
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    human-readable title of the report

                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + +
                                                                                                                                                                                                    + + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    import { Entity, EntityConstructor } from "../../core/entity/model/entity";
                                                                                                                                                                                                    +import { DatabaseEntity } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                    +import { Aggregation } from "./data-aggregation.service";
                                                                                                                                                                                                    +import { ExportColumnConfig } from "../../core/export/data-transformation-service/export-column-config";
                                                                                                                                                                                                    +import { DatabaseField } from "../../core/entity/database-field.decorator";
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +/**
                                                                                                                                                                                                    + * A report can be accessed by users to generate aggregated statistics or customized exports calculated from available data.
                                                                                                                                                                                                    + * "read" permission for a ReportConfig entity is also used to control which users can generate the report's results.
                                                                                                                                                                                                    + *
                                                                                                                                                                                                    + * This is the class which is saved to the database.
                                                                                                                                                                                                    + * However, when using this in code, use the {@link ReportEntity} instead which provides better type safety.
                                                                                                                                                                                                    + */
                                                                                                                                                                                                    +@DatabaseEntity("ReportConfig")
                                                                                                                                                                                                    +class ReportConfig extends Entity {
                                                                                                                                                                                                    +  /** human-readable title of the report */
                                                                                                                                                                                                    +  @DatabaseField() title: string;
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                    +   * (optional) mode of export.
                                                                                                                                                                                                    +   * The {@link ReportEntity} holds the restriction on valid report modes.
                                                                                                                                                                                                    +   * Default is "reporting"
                                                                                                                                                                                                    +   */
                                                                                                                                                                                                    +  @DatabaseField() mode?: string;
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                    +   * (sql only) list of arguments needed for the sql query. Placeholder "?" will be replaced.
                                                                                                                                                                                                    +   */
                                                                                                                                                                                                    +  @DatabaseField() neededArgs?: string[] = [];
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +  /** the definitions to calculate the report's aggregations */
                                                                                                                                                                                                    +  @DatabaseField() aggregationDefinitions: any[] = [];
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +  /** (sql only) the definition to calculate the report */
                                                                                                                                                                                                    +  @DatabaseField() aggregationDefinition: string | undefined = undefined;
                                                                                                                                                                                                    +}
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +/**
                                                                                                                                                                                                    + * Union type to enable type safety for report configs.
                                                                                                                                                                                                    + * Use this instead of the {@class ReportConfig}
                                                                                                                                                                                                    + */
                                                                                                                                                                                                    +export type ReportEntity = AggregationReport | ExportingReport | SqlReport;
                                                                                                                                                                                                    +/**
                                                                                                                                                                                                    + * This allows the `ReportEntity` to also be used as a constructor or in the `EntityMapper`
                                                                                                                                                                                                    + */
                                                                                                                                                                                                    +export const ReportEntity = ReportConfig as EntityConstructor<ReportEntity>;
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +/**
                                                                                                                                                                                                    + * Reports handles by the {@class DataAggregationService}
                                                                                                                                                                                                    + */
                                                                                                                                                                                                    +export interface AggregationReport extends ReportConfig {
                                                                                                                                                                                                    +  mode: "reporting";
                                                                                                                                                                                                    +  aggregationDefinitions: Aggregation[];
                                                                                                                                                                                                    +}
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +/**
                                                                                                                                                                                                    + * Reports handles by the {@class DataTransformationService}
                                                                                                                                                                                                    + */
                                                                                                                                                                                                    +export interface ExportingReport extends ReportConfig {
                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                    +   * If no mode is set, it will default to 'exporting'
                                                                                                                                                                                                    +   */
                                                                                                                                                                                                    +  mode?: "exporting";
                                                                                                                                                                                                    +  aggregationDefinitions: ExportColumnConfig[];
                                                                                                                                                                                                    +}
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +/**
                                                                                                                                                                                                    + * Reports handles by the {@class SqlReportService}
                                                                                                                                                                                                    + */
                                                                                                                                                                                                    +export interface SqlReport extends ReportConfig {
                                                                                                                                                                                                    +  mode: "sql";
                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                    +   * a valid SQL SELECT statements, can contain "?" placeholder for arguments
                                                                                                                                                                                                    +   */
                                                                                                                                                                                                    +  aggregationDefinition: string;
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                    +   * a list of arguments, passed into the sql statement
                                                                                                                                                                                                    +   */
                                                                                                                                                                                                    +  neededArgs: string[];
                                                                                                                                                                                                    +}
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                    +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/SchemaEmbedDatatype.html b/documentation/classes/SchemaEmbedDatatype.html new file mode 100644 index 0000000000..64af4f1369 --- /dev/null +++ b/documentation/classes/SchemaEmbedDatatype.html @@ -0,0 +1,1115 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      +

                                                                                                                                                                                                      File

                                                                                                                                                                                                      +

                                                                                                                                                                                                      +

                                                                                                                                                                                                      + src/app/core/basic-datatypes/schema-embed/schema-embed.datatype.ts +

                                                                                                                                                                                                      + + +

                                                                                                                                                                                                      +

                                                                                                                                                                                                      Description

                                                                                                                                                                                                      +

                                                                                                                                                                                                      +

                                                                                                                                                                                                      +

                                                                                                                                                                                                      Datatype for the EntitySchemaService transforming values of complex objects recursively.

                                                                                                                                                                                                      +

                                                                                                                                                                                                      (De)serialize instances of any class recognizing the normal @DatabaseField() annotations within that referenced class. +This is useful if your Entity type is complex and has properties that are instances of other classes +rather just basic value types like string or number. +You can then annotate some properties of that referenced class so they will be saved to the database while ignoring other properties. +The referenced class instance will be saved embedded into the entity's object and not as an own "stand-alone" entity.

                                                                                                                                                                                                      +

                                                                                                                                                                                                      see the unit tests in entity-schema.service.spec.ts for an example

                                                                                                                                                                                                      +

                                                                                                                                                                                                      implement this as its own datatype for a specific class functioning as "embedded" schema.

                                                                                                                                                                                                      + +

                                                                                                                                                                                                      + +

                                                                                                                                                                                                      +

                                                                                                                                                                                                      Extends

                                                                                                                                                                                                      +

                                                                                                                                                                                                      +

                                                                                                                                                                                                      + DefaultDatatype +

                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Index

                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Properties
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Methods
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                      +constructor(schemaService: EntitySchemaService) +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                      schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + +

                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + Abstract + embeddedType + + +
                                                                                                                                                                                                      + Type : EntityConstructor + +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + Static + dataType + + +
                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                      + Default value : "" +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:41 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Key for this datatype that must be specified in the DatabaseField annotation to use this transformation.

                                                                                                                                                                                                      +

                                                                                                                                                                                                      for example @DatabaseField({dataType: 'foo'}) myField will trigger the datatype implementation with name "foo".

                                                                                                                                                                                                      +

                                                                                                                                                                                                      If you set the name to a TypeScript type, class properties with this type will automatically use +that EntitySchemaDatatype without the need to explicitly state the dataType config in the annotation +(e.g. @DatabaseField() myField: string is triggering the EntitySchemaDatatype with name "string".

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + editComponent + + +
                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                      + Default value : "EditText" +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:61 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:121 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + Static + label + + +
                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                      + Default value : $localize`:datatype-label:any` +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:49 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      The human-readable name for this dataType, used in config UIs.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + viewComponent + + +
                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                      + Default value : "DisplayText" +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:60 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      The default component how this datatype should be displayed in lists and forms.

                                                                                                                                                                                                      +

                                                                                                                                                                                                      The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + +

                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                      + + transformToDatabaseFormat(value: any) +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:42 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                      value + any + + No +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + + transformToObjectFormat + + +
                                                                                                                                                                                                      + + transformToObjectFormat(value: any) +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:49 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                      value + any + + No +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + Async + anonymize + + +
                                                                                                                                                                                                      + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:137 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                      value + EntityType + + No + +

                                                                                                                                                                                                      The original value to be anonymized

                                                                                                                                                                                                      + +
                                                                                                                                                                                                      schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                      parent + any + + No + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + Returns : Promise<any> + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                      +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:129 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                      col + ColumnMapping + + No +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + Returns : string + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      + + + Async + importMapFunction + + +
                                                                                                                                                                                                      + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Defined in DefaultDatatype:103 +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                      val + any + + No + +

                                                                                                                                                                                                      The value from an imported cell to be mapped

                                                                                                                                                                                                      + +
                                                                                                                                                                                                      schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                      The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                      + +
                                                                                                                                                                                                      additional + any + + Yes + +

                                                                                                                                                                                                      config as returned by the configComponent

                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                      + + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      import { DefaultDatatype } from "../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                      +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                      +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +/**
                                                                                                                                                                                                      + * Datatype for the EntitySchemaService transforming values of complex objects recursively.
                                                                                                                                                                                                      + *
                                                                                                                                                                                                      + * (De)serialize instances of any class recognizing the normal @DatabaseField() annotations within that referenced class.
                                                                                                                                                                                                      + * This is useful if your Entity type is complex and has properties that are instances of other classes
                                                                                                                                                                                                      + * rather just basic value types like string or number.
                                                                                                                                                                                                      + * You can then annotate some properties of that referenced class so they will be saved to the database while ignoring other properties.
                                                                                                                                                                                                      + * The referenced class instance will be saved embedded into the entity's object and not as an own "stand-alone" entity.
                                                                                                                                                                                                      + *
                                                                                                                                                                                                      + * see the unit tests in entity-schema.service.spec.ts for an example
                                                                                                                                                                                                      + *
                                                                                                                                                                                                      + * implement this as its own datatype for a specific class functioning as "embedded" schema.
                                                                                                                                                                                                      + */
                                                                                                                                                                                                      +export abstract class SchemaEmbedDatatype extends DefaultDatatype {
                                                                                                                                                                                                      +  abstract embeddedType: EntityConstructor;
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +  constructor(private schemaService: EntitySchemaService) {
                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                      +  }
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +  override transformToDatabaseFormat(value: any) {
                                                                                                                                                                                                      +    return this.schemaService.transformEntityToDatabaseFormat(
                                                                                                                                                                                                      +      value,
                                                                                                                                                                                                      +      this.embeddedType.schema,
                                                                                                                                                                                                      +    );
                                                                                                                                                                                                      +  }
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +  override transformToObjectFormat(value: any) {
                                                                                                                                                                                                      +    const instance = new this.embeddedType();
                                                                                                                                                                                                      +    this.schemaService.loadDataIntoEntity(instance, value);
                                                                                                                                                                                                      +    return instance;
                                                                                                                                                                                                      +  }
                                                                                                                                                                                                      +}
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                      +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/SelectableFilter.html b/documentation/classes/SelectableFilter.html new file mode 100644 index 0000000000..cf94aa3936 --- /dev/null +++ b/documentation/classes/SelectableFilter.html @@ -0,0 +1,1021 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        +

                                                                                                                                                                                                        File

                                                                                                                                                                                                        +

                                                                                                                                                                                                        +

                                                                                                                                                                                                        + src/app/core/filter/filters/filters.ts +

                                                                                                                                                                                                        + + +

                                                                                                                                                                                                        +

                                                                                                                                                                                                        Description

                                                                                                                                                                                                        +

                                                                                                                                                                                                        +

                                                                                                                                                                                                        +

                                                                                                                                                                                                        Generic configuration for a filter with different selectable FilterSelectionOption options.

                                                                                                                                                                                                        +

                                                                                                                                                                                                        This is a reusable format for any kind of dropdown or selection component that offers the user a choice +to narrow down a list of data items. +As the filter function is provided as part of each FilterSelectionOption +an instance of this FilterSelection class can manage all filter selection logic.

                                                                                                                                                                                                        + +

                                                                                                                                                                                                        + +

                                                                                                                                                                                                        +

                                                                                                                                                                                                        Extends

                                                                                                                                                                                                        +

                                                                                                                                                                                                        +

                                                                                                                                                                                                        + Filter +

                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Index

                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Properties
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Methods
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                        +constructor(name: string, options: FilterSelectionOption<T>[], label: string) +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Create a FilterSelection with different options to be selected. +(optional, defaults to the name of the selection)

                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                        name + string + + No + +

                                                                                                                                                                                                        The name or id describing this filter

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        options + FilterSelectionOption<T>[] + + No + +

                                                                                                                                                                                                        An array of different filtering variants to chose between

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        label + string + + No + +

                                                                                                                                                                                                        The user-friendly label describing this filter-selection +(optional, defaults to the name of the selection)

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + +

                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + Public + + label + + +
                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                        + Default value : name +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Inherited from Filter +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Defined in Filter:100 +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        The user-friendly label describing this filter-selection +(optional, defaults to the name of the selection)
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + Public + + name + + +
                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Inherited from Filter +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Defined in Filter:98 +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        The name or id describing this filter
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + Public + options + + +
                                                                                                                                                                                                        + Type : FilterSelectionOption<T>[] + +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        An array of different filtering variants to chose between
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + component + + +
                                                                                                                                                                                                        + Type : Type<any> + +
                                                                                                                                                                                                        + Default value : ListFilterComponent +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Inherited from Filter +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Defined in Filter:35 +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        The component used to display filter option to the user.

                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + selectedOptionChange + + +
                                                                                                                                                                                                        + Default value : new EventEmitter<string[]>() +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Inherited from Filter +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Defined in Filter:45 +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Triggered when this filter changes value +(e.g. when the user selects a new value in a FilterComponent).

                                                                                                                                                                                                        +

                                                                                                                                                                                                        This is part of the filter object because dynamic filter components can't expose @Outputs

                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + Public + selectedOptionValues + + +
                                                                                                                                                                                                        + Type : string[] + +
                                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Inherited from Filter +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Defined in Filter:37 +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + +

                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + Static + generateOptions + + +
                                                                                                                                                                                                        + + generateOptions(valuesToMatchAsOptions: (string | number)[], attributeName: string) +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + Type parameters : +
                                                                                                                                                                                                          +
                                                                                                                                                                                                        • T
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Generate filter options dynamically from the given value to be matched.

                                                                                                                                                                                                        +

                                                                                                                                                                                                        This is a utility function to make it easier to generate FilterSelectionOptions for standard cases +if you simply want each option to filter items having the given attribute matching different values. +If you have more sophisticated filtering needs, use the constructor to set FilterSelectionOptions that +you created yourself.

                                                                                                                                                                                                        +Example :
                                                                                                                                                                                                           A separate FilterSelectionOption is created for each value with a filter
                                                                                                                                                                                                        +   that is true of a data item's property exactly matches that value.
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                        valuesToMatchAsOptions + (string | number)[] + + No + +

                                                                                                                                                                                                        An array of values to be matched. +A separate FilterSelectionOption is created for each value with a filter +that is true of a data item's property exactly matches that value.

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        attributeName + string + + No + +

                                                                                                                                                                                                        The name of the property of a data item that is compared to the value in the filter function.

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + Returns : FilterSelectionOption[] + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + Public + getFilter + + +
                                                                                                                                                                                                        + + getFilter() +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Inherited from Filter +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Defined in Filter:120 +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Get the filter query for the given option. +If the given key is undefined or invalid, the returned filter matches any elements.

                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + Returns : DataFilter<T> + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        + + + getOption + + +
                                                                                                                                                                                                        +getOption(key: string) +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Get the full filter option by its key.

                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                        key + string + + No + +

                                                                                                                                                                                                        The identifier of the requested option

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                        + + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                        +import { MongoQuery } from "@casl/ability";
                                                                                                                                                                                                        +import { ListFilterComponent } from "../list-filter/list-filter.component";
                                                                                                                                                                                                        +import { EventEmitter, Type } from "@angular/core";
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +/**
                                                                                                                                                                                                        + * This filter can be used to filter an array of entities.
                                                                                                                                                                                                        + * It has to follow the MongoDB Query Syntax {@link https://www.mongodb.com/docs/manual/reference/operator/query/}.
                                                                                                                                                                                                        + *
                                                                                                                                                                                                        + * The filter is parsed using ucast {@link https://github.com/stalniy/ucast/tree/master/packages/mongo2js}
                                                                                                                                                                                                        + */
                                                                                                                                                                                                        +export type DataFilter<T> = MongoQuery<T> | {};
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +export abstract class Filter<T extends Entity> {
                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                        +   * The component used to display filter option to the user.
                                                                                                                                                                                                        +   */
                                                                                                                                                                                                        +  component: Type<any> = ListFilterComponent;
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  public selectedOptionValues: string[] = [];
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                        +   * Triggered when this filter changes value
                                                                                                                                                                                                        +   * (e.g. when the user selects a new value in a FilterComponent).
                                                                                                                                                                                                        +   *
                                                                                                                                                                                                        +   * This is part of the filter object because dynamic filter components can't expose @Outputs
                                                                                                                                                                                                        +   */
                                                                                                                                                                                                        +  selectedOptionChange = new EventEmitter<string[]>();
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  protected constructor(
                                                                                                                                                                                                        +    public name: string,
                                                                                                                                                                                                        +    public label: string = name,
                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  abstract getFilter(): DataFilter<T>;
                                                                                                                                                                                                        +}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +/**
                                                                                                                                                                                                        + * Generic configuration for a filter with different selectable {@link FilterSelectionOption} options.
                                                                                                                                                                                                        + *
                                                                                                                                                                                                        + * This is a reusable format for any kind of dropdown or selection component that offers the user a choice
                                                                                                                                                                                                        + * to narrow down a list of data items.
                                                                                                                                                                                                        + * As the filter function is provided as part of each {@link FilterSelectionOption}
                                                                                                                                                                                                        + * an instance of this FilterSelection class can manage all filter selection logic.
                                                                                                                                                                                                        + */
                                                                                                                                                                                                        +export class SelectableFilter<T extends Entity> extends Filter<T> {
                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                        +   * Generate filter options dynamically from the given value to be matched.
                                                                                                                                                                                                        +   *
                                                                                                                                                                                                        +   * This is a utility function to make it easier to generate {@link FilterSelectionOption}s for standard cases
                                                                                                                                                                                                        +   * if you simply want each option to filter items having the given attribute matching different values.
                                                                                                                                                                                                        +   * If you have more sophisticated filtering needs, use the constructor to set {@link FilterSelectionOption}s that
                                                                                                                                                                                                        +   * you created yourself.
                                                                                                                                                                                                        +   *
                                                                                                                                                                                                        +   * @param valuesToMatchAsOptions An array of values to be matched.
                                                                                                                                                                                                        +   *        A separate FilterSelectionOption is created for each value with a filter
                                                                                                                                                                                                        +   *        that is true of a data item's property exactly matches that value.
                                                                                                                                                                                                        +   * @param attributeName The name of the property of a data item that is compared to the value in the filter function.
                                                                                                                                                                                                        +   */
                                                                                                                                                                                                        +  public static generateOptions<T extends Entity>(
                                                                                                                                                                                                        +    valuesToMatchAsOptions: (string | number)[],
                                                                                                                                                                                                        +    attributeName: string,
                                                                                                                                                                                                        +  ): FilterSelectionOption<T>[] {
                                                                                                                                                                                                        +    return valuesToMatchAsOptions
                                                                                                                                                                                                        +      .filter((k) => !!k)
                                                                                                                                                                                                        +      .map((k) => ({
                                                                                                                                                                                                        +        key: k.toString().toLowerCase(),
                                                                                                                                                                                                        +        label: k.toString(),
                                                                                                                                                                                                        +        filter: { [attributeName]: k } as DataFilter<T>,
                                                                                                                                                                                                        +      }));
                                                                                                                                                                                                        +  }
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                        +   * Create a FilterSelection with different options to be selected.
                                                                                                                                                                                                        +   * @param name The name or id describing this filter
                                                                                                                                                                                                        +   * @param options An array of different filtering variants to chose between
                                                                                                                                                                                                        +   * @param label The user-friendly label describing this filter-selection
                                                                                                                                                                                                        +   * (optional, defaults to the name of the selection)
                                                                                                                                                                                                        +   */
                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                        +    public override name: string,
                                                                                                                                                                                                        +    public options: FilterSelectionOption<T>[],
                                                                                                                                                                                                        +    public override label: string = name,
                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                        +    super(name, label);
                                                                                                                                                                                                        +    this.selectedOptionValues = [];
                                                                                                                                                                                                        +  }
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                        +   * Get the full filter option by its key.
                                                                                                                                                                                                        +   * @param key The identifier of the requested option
                                                                                                                                                                                                        +   */
                                                                                                                                                                                                        +  getOption(key: string): FilterSelectionOption<T> | undefined {
                                                                                                                                                                                                        +    return this.options.find((option: FilterSelectionOption<T>): boolean => {
                                                                                                                                                                                                        +      return option.key === key;
                                                                                                                                                                                                        +    });
                                                                                                                                                                                                        +  }
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                        +   * Get the filter query for the given option.
                                                                                                                                                                                                        +   * If the given key is undefined or invalid, the returned filter matches any elements.
                                                                                                                                                                                                        +   */
                                                                                                                                                                                                        +  public getFilter(): DataFilter<T> {
                                                                                                                                                                                                        +    const filters: DataFilter<T>[] = this.selectedOptionValues
                                                                                                                                                                                                        +      .map((value: string) => this.getOption(value))
                                                                                                                                                                                                        +      .filter((value: FilterSelectionOption<T>) => value !== undefined)
                                                                                                                                                                                                        +      .map((previousValue: FilterSelectionOption<T>) => {
                                                                                                                                                                                                        +        return previousValue.filter as DataFilter<T>;
                                                                                                                                                                                                        +      });
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +    if (filters.length === 0) {
                                                                                                                                                                                                        +      return {} as DataFilter<T>;
                                                                                                                                                                                                        +    }
                                                                                                                                                                                                        +    return {
                                                                                                                                                                                                        +      $or: [...filters],
                                                                                                                                                                                                        +    } as unknown as DataFilter<T>;
                                                                                                                                                                                                        +  }
                                                                                                                                                                                                        +}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +/**
                                                                                                                                                                                                        + * Represents one specific option to filter data in a certain way.
                                                                                                                                                                                                        + * used by {@link SelectableFilter}
                                                                                                                                                                                                        + */
                                                                                                                                                                                                        +export interface FilterSelectionOption<T> {
                                                                                                                                                                                                        +  /** identifier for this option in the parent FilterSelection instance */
                                                                                                                                                                                                        +  key: string;
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  /** label displayed for this option to the user in the UI */
                                                                                                                                                                                                        +  label: string;
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  /** Optional color */
                                                                                                                                                                                                        +  color?: string;
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                        +   * The filter query which should be used if this filter is selected
                                                                                                                                                                                                        +   */
                                                                                                                                                                                                        +  filter: DataFilter<T>;
                                                                                                                                                                                                        +}
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                        +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/SiteSettings.html b/documentation/classes/SiteSettings.html new file mode 100644 index 0000000000..3b866f3a82 --- /dev/null +++ b/documentation/classes/SiteSettings.html @@ -0,0 +1,882 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          +

                                                                                                                                                                                                          File

                                                                                                                                                                                                          +

                                                                                                                                                                                                          +

                                                                                                                                                                                                          + src/app/core/site-settings/site-settings.ts +

                                                                                                                                                                                                          + + +

                                                                                                                                                                                                          +

                                                                                                                                                                                                          Description

                                                                                                                                                                                                          +

                                                                                                                                                                                                          +

                                                                                                                                                                                                          +

                                                                                                                                                                                                          Global settings like styling and title to customize an instance of the app. +The settings are applied at runtime.

                                                                                                                                                                                                          + +

                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Index

                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          Properties
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          Methods
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                          + + + + + + + + + + +
                                                                                                                                                                                                          +constructor() +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + +

                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + defaultLanguage + + +
                                                                                                                                                                                                          + Type : ConfigurableEnumValue + +
                                                                                                                                                                                                          + Default value : availableLocales.values.find( + ({ id }) => id === "en-US", + ) +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined, description: undefined, dataType: 'configurable-enum', additional: LOCALE_ENUM_ID})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + displayLanguageSelect + + +
                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                          + Default value : true +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + Static + ENTITY_ID + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Default value : "global" +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + error + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + favicon + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined, dataType: 'file', editComponent: 'EditPhoto', additional: 256})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + font + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + Static + + label + + +
                                                                                                                                                                                                          + Default value : $localize`Site settings` +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + logo + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined, dataType: 'file', editComponent: 'EditPhoto', additional: 300})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + primary + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + secondary + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + + siteName + + +
                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                          + Default value : "Aam Digital - Demo" +
                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                          + + @DatabaseField({label: undefined})
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + +

                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          + + + Static + create + + +
                                                                                                                                                                                                          + + create(value: Partial<SiteSettings>) +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                          value + Partial<SiteSettings> + + No +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + Returns : SiteSettings + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                          + + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                          +import { DatabaseEntity } from "../entity/database-entity.decorator";
                                                                                                                                                                                                          +import { DatabaseField } from "../entity/database-field.decorator";
                                                                                                                                                                                                          +import { availableLocales, LOCALE_ENUM_ID } from "../language/languages";
                                                                                                                                                                                                          +import { ConfigurableEnumValue } from "../basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +/**
                                                                                                                                                                                                          + * Global settings like styling and title to customize an instance of the app.
                                                                                                                                                                                                          + * The settings are applied at runtime.
                                                                                                                                                                                                          + */
                                                                                                                                                                                                          +@DatabaseEntity("SiteSettings")
                                                                                                                                                                                                          +export class SiteSettings extends Entity {
                                                                                                                                                                                                          +  static ENTITY_ID = "global";
                                                                                                                                                                                                          +  static override label = $localize`Site settings`;
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  static create(value: Partial<SiteSettings>): SiteSettings {
                                                                                                                                                                                                          +    return Object.assign(new SiteSettings(), value);
                                                                                                                                                                                                          +  }
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  @DatabaseField({ label: $localize`Site name` }) siteName: string =
                                                                                                                                                                                                          +    "Aam Digital - Demo";
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  @DatabaseField({
                                                                                                                                                                                                          +    label: $localize`Default language`,
                                                                                                                                                                                                          +    description: $localize`This will only be applied once the app is reloaded`,
                                                                                                                                                                                                          +    dataType: "configurable-enum",
                                                                                                                                                                                                          +    additional: LOCALE_ENUM_ID,
                                                                                                                                                                                                          +  })
                                                                                                                                                                                                          +  defaultLanguage: ConfigurableEnumValue = availableLocales.values.find(
                                                                                                                                                                                                          +    ({ id }) => id === "en-US",
                                                                                                                                                                                                          +  );
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  @DatabaseField({
                                                                                                                                                                                                          +    label: $localize`Display language select`,
                                                                                                                                                                                                          +  })
                                                                                                                                                                                                          +  displayLanguageSelect: boolean = true;
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  @DatabaseField({
                                                                                                                                                                                                          +    label: $localize`Logo`,
                                                                                                                                                                                                          +    dataType: "file",
                                                                                                                                                                                                          +    editComponent: "EditPhoto",
                                                                                                                                                                                                          +    additional: 300,
                                                                                                                                                                                                          +  })
                                                                                                                                                                                                          +  logo: string;
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  @DatabaseField({
                                                                                                                                                                                                          +    label: $localize`App favicon`,
                                                                                                                                                                                                          +    dataType: "file",
                                                                                                                                                                                                          +    editComponent: "EditPhoto",
                                                                                                                                                                                                          +    additional: 256,
                                                                                                                                                                                                          +  })
                                                                                                                                                                                                          +  favicon: string;
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  @DatabaseField({ label: $localize`Primary color` }) primary: string;
                                                                                                                                                                                                          +  @DatabaseField({ label: $localize`Secondary color` }) secondary: string;
                                                                                                                                                                                                          +  @DatabaseField({ label: $localize`Error color` }) error: string;
                                                                                                                                                                                                          +  @DatabaseField({ label: $localize`Text font` }) font: string;
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  constructor() {
                                                                                                                                                                                                          +    super(SiteSettings.ENTITY_ID);
                                                                                                                                                                                                          +  }
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +  override toString() {
                                                                                                                                                                                                          +    return this.getConstructor().label;
                                                                                                                                                                                                          +  }
                                                                                                                                                                                                          +}
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/SqsSchema.html b/documentation/classes/SqsSchema.html new file mode 100644 index 0000000000..be5fc15d91 --- /dev/null +++ b/documentation/classes/SqsSchema.html @@ -0,0 +1,543 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            +

                                                                                                                                                                                                            File

                                                                                                                                                                                                            +

                                                                                                                                                                                                            +

                                                                                                                                                                                                            + src/app/features/reporting/sql-report/sqs-schema.ts +

                                                                                                                                                                                                            + + +

                                                                                                                                                                                                            +

                                                                                                                                                                                                            Description

                                                                                                                                                                                                            +

                                                                                                                                                                                                            +

                                                                                                                                                                                                            +

                                                                                                                                                                                                            SQS schema object. +For more information, see the SQS docs.

                                                                                                                                                                                                            + +

                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            Index

                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            Properties
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            Methods
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                            + + + + + + + + + + +
                                                                                                                                                                                                            +constructor() +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + +

                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            + + + + language + + +
                                                                                                                                                                                                            + Default value : "sqlite" +
                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                            + + @DatabaseField()
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            + + + + sql + + +
                                                                                                                                                                                                            + Type : literal type + +
                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                            + + @DatabaseField()
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            + + + Static + SQS_SCHEMA_ID + + +
                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                            + Default value : "config" +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + +

                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            + + + Static + create + + +
                                                                                                                                                                                                            + + create(tables: SqlTables) +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                            tables + SqlTables + + No +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + Returns : SqsSchema + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                            + + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                            +import { DatabaseEntity } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                            +import { DatabaseField } from "../../../core/entity/database-field.decorator";
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +/**
                                                                                                                                                                                                            + * SQS schema object.
                                                                                                                                                                                                            + * For more information, see the SQS docs.
                                                                                                                                                                                                            + */
                                                                                                                                                                                                            +@DatabaseEntity("_design/sqlite")
                                                                                                                                                                                                            +export class SqsSchema extends Entity {
                                                                                                                                                                                                            +  static SQS_SCHEMA_ID = "config";
                                                                                                                                                                                                            +  static create(tables: SqlTables) {
                                                                                                                                                                                                            +    const schema = new SqsSchema();
                                                                                                                                                                                                            +    schema.sql = {
                                                                                                                                                                                                            +      tables,
                                                                                                                                                                                                            +      options: {
                                                                                                                                                                                                            +        table_name: {
                                                                                                                                                                                                            +          operation: "prefix",
                                                                                                                                                                                                            +          field: "_id",
                                                                                                                                                                                                            +          separator: ":",
                                                                                                                                                                                                            +        },
                                                                                                                                                                                                            +      },
                                                                                                                                                                                                            +    };
                                                                                                                                                                                                            +    return schema;
                                                                                                                                                                                                            +  }
                                                                                                                                                                                                            +  constructor() {
                                                                                                                                                                                                            +    super(SqsSchema.SQS_SCHEMA_ID);
                                                                                                                                                                                                            +  }
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +  @DatabaseField() language: "sqlite" = "sqlite";
                                                                                                                                                                                                            +  @DatabaseField() sql: {
                                                                                                                                                                                                            +    // SQL table definitions
                                                                                                                                                                                                            +    tables: SqlTables;
                                                                                                                                                                                                            +    // Optional SQL indices
                                                                                                                                                                                                            +    indexes?: string[];
                                                                                                                                                                                                            +    // Further options
                                                                                                                                                                                                            +    options?: SqlOptions;
                                                                                                                                                                                                            +  };
                                                                                                                                                                                                            +}
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +export type SqlTables = {
                                                                                                                                                                                                            +  // Name of the entity
                                                                                                                                                                                                            +  [table: string]: {
                                                                                                                                                                                                            +    // Name of the entity attribute and the type of it
                                                                                                                                                                                                            +    [column: string]: SqlType | { field: string; type: SqlType };
                                                                                                                                                                                                            +  };
                                                                                                                                                                                                            +};
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +export type SqlType = "TEXT" | "INTEGER" | "REAL";
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +export type SqlOptions = {
                                                                                                                                                                                                            +  table_name: {
                                                                                                                                                                                                            +    operation: "prefix";
                                                                                                                                                                                                            +    field: string;
                                                                                                                                                                                                            +    separator: string;
                                                                                                                                                                                                            +  };
                                                                                                                                                                                                            +};
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                            +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/TestEntity.html b/documentation/classes/TestEntity.html new file mode 100644 index 0000000000..e9ce267d6f --- /dev/null +++ b/documentation/classes/TestEntity.html @@ -0,0 +1,910 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              +

                                                                                                                                                                                                              File

                                                                                                                                                                                                              +

                                                                                                                                                                                                              +

                                                                                                                                                                                                              + src/app/utils/test-utils/TestEntity.ts +

                                                                                                                                                                                                              + + +

                                                                                                                                                                                                              +

                                                                                                                                                                                                              Description

                                                                                                                                                                                                              +

                                                                                                                                                                                                              +

                                                                                                                                                                                                              +

                                                                                                                                                                                                              Basic Entity type for unit tests, so that we don't have to create custom entity classes for every test.

                                                                                                                                                                                                              + +

                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              Index

                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              Properties
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              Methods
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + +
                                                                                                                                                                                                              + +

                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + blockComponent + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Default value : "ChildBlock" +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + + category + + +
                                                                                                                                                                                                              + Type : ConfigurableEnumValue + +
                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                              + + @DatabaseField({label: 'Category', dataType: undefined, additional: 'genders'})
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + + dateOfBirth + + +
                                                                                                                                                                                                              + Type : DateWithAge + +
                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                              + + @DatabaseField({label: 'Date of Birth'})
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + ENTITY_TYPE + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Default value : "TestEntity" +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + hasPII + + +
                                                                                                                                                                                                              + Default value : true +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + icon + + +
                                                                                                                                                                                                              + Type : IconName + +
                                                                                                                                                                                                              + Default value : "child" +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + label + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Default value : "Test Entity" +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + labelPlural + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Default value : "Test Entities" +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + + name + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                              + + @DatabaseField({label: 'Name'})
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + + other + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                              + + @DatabaseField({label: 'Other'})
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + + ref + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                              + + @DatabaseField({label: 'Reference', dataType: undefined, additional: undefined})
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + route + + +
                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                              + Default value : "test-entity" +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + + toStringAttributes + + +
                                                                                                                                                                                                              + Type : [] + +
                                                                                                                                                                                                              + Default value : ["name"] +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + +

                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              + + + Static + create + + +
                                                                                                                                                                                                              + + create(data: Partial | string) +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                              data + Partial<TestEntity> | string + + No +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + Returns : TestEntity + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                              + + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              import { DatabaseEntity } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                              +import { Entity } from "../../core/entity/model/entity";
                                                                                                                                                                                                              +import { DatabaseField } from "../../core/entity/database-field.decorator";
                                                                                                                                                                                                              +import { EntityDatatype } from "../../core/basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                              +import { ConfigurableEnumValue } from "../../core/basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                              +import { ConfigurableEnumDatatype } from "../../core/basic-datatypes/configurable-enum/configurable-enum-datatype/configurable-enum.datatype";
                                                                                                                                                                                                              +import { DateWithAge } from "../../core/basic-datatypes/date-with-age/dateWithAge";
                                                                                                                                                                                                              +import { IconName } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +/**
                                                                                                                                                                                                              + * Basic Entity type for unit tests, so that we don't have to create custom entity classes for every test.
                                                                                                                                                                                                              + */
                                                                                                                                                                                                              +@DatabaseEntity("TestEntity")
                                                                                                                                                                                                              +export class TestEntity extends Entity {
                                                                                                                                                                                                              +  static override ENTITY_TYPE = "TestEntity";
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +  static override toStringAttributes = ["name"];
                                                                                                                                                                                                              +  static override label = "Test Entity";
                                                                                                                                                                                                              +  static override labelPlural = "Test Entities";
                                                                                                                                                                                                              +  static override icon: IconName = "child";
                                                                                                                                                                                                              +  static override route = "test-entity";
                                                                                                                                                                                                              +  static override blockComponent = "ChildBlock";
                                                                                                                                                                                                              +  static override hasPII = true;
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                                              +    label: "Name",
                                                                                                                                                                                                              +  })
                                                                                                                                                                                                              +  name: string;
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                                              +    label: "Other",
                                                                                                                                                                                                              +  })
                                                                                                                                                                                                              +  other: string;
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                                              +    label: "Reference",
                                                                                                                                                                                                              +    dataType: EntityDatatype.dataType,
                                                                                                                                                                                                              +    additional: TestEntity.ENTITY_TYPE,
                                                                                                                                                                                                              +  })
                                                                                                                                                                                                              +  ref: string;
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                                              +    label: "Category",
                                                                                                                                                                                                              +    dataType: ConfigurableEnumDatatype.dataType,
                                                                                                                                                                                                              +    additional: "genders",
                                                                                                                                                                                                              +  })
                                                                                                                                                                                                              +  category: ConfigurableEnumValue;
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +  @DatabaseField({
                                                                                                                                                                                                              +    label: "Date of Birth",
                                                                                                                                                                                                              +  })
                                                                                                                                                                                                              +  dateOfBirth: DateWithAge;
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +  static create(data: Partial<TestEntity> | string): TestEntity {
                                                                                                                                                                                                              +    if (typeof data === "string") {
                                                                                                                                                                                                              +      data = { name: data };
                                                                                                                                                                                                              +    }
                                                                                                                                                                                                              +    return Object.assign(new TestEntity(), data);
                                                                                                                                                                                                              +  }
                                                                                                                                                                                                              +}
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                              +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/TimeInterval.html b/documentation/classes/TimeInterval.html new file mode 100644 index 0000000000..79736e86ad --- /dev/null +++ b/documentation/classes/TimeInterval.html @@ -0,0 +1,414 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                +

                                                                                                                                                                                                                File

                                                                                                                                                                                                                +

                                                                                                                                                                                                                +

                                                                                                                                                                                                                + src/app/features/todos/recurring-interval/time-interval.ts +

                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                +

                                                                                                                                                                                                                Description

                                                                                                                                                                                                                +

                                                                                                                                                                                                                +

                                                                                                                                                                                                                +

                                                                                                                                                                                                                A simple time interval representation for repetitions or offsets.

                                                                                                                                                                                                                + +

                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                Index

                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                + +

                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                + + + amount + + +
                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                amount of the unit to be offset

                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                + + + Static + DATA_TYPE + + +
                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                + Default value : "time-interval" +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                + + + unit + + +
                                                                                                                                                                                                                + Type : unitOfTime.Base + +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                unit (e.g. days, weeks) to be offset

                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + + + + + + +
                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                import { unitOfTime } from "moment";
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                + * A simple time interval representation for repetitions or offsets.
                                                                                                                                                                                                                + */
                                                                                                                                                                                                                +export class TimeInterval {
                                                                                                                                                                                                                +  static DATA_TYPE = "time-interval";
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +  /** amount of the unit to be offset */
                                                                                                                                                                                                                +  amount: number;
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +  /** unit (e.g. days, weeks) to be offset */
                                                                                                                                                                                                                +  unit: unitOfTime.Base;
                                                                                                                                                                                                                +}
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +export function generateLabelFromInterval(interval: TimeInterval) {
                                                                                                                                                                                                                +  return (
                                                                                                                                                                                                                +    " " +
                                                                                                                                                                                                                +    $localize`:custom interval select option| e.g. every 2 weeks:every ${
                                                                                                                                                                                                                +      interval.amount
                                                                                                                                                                                                                +    } ${timeunitLabelMap.get(interval.unit)}`
                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                +}
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +export const timeUnitsPrimary: { unit: unitOfTime.Base; label: string }[] = [
                                                                                                                                                                                                                +  { unit: "days", label: $localize`:time unit:days` },
                                                                                                                                                                                                                +  { unit: "weeks", label: $localize`:time unit:weeks` },
                                                                                                                                                                                                                +  { unit: "months", label: $localize`:time unit:months` },
                                                                                                                                                                                                                +  { unit: "years", label: $localize`:time unit:years` },
                                                                                                                                                                                                                +];
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +const timeunitLabelMap: Map<unitOfTime.Base, string> = new Map([
                                                                                                                                                                                                                +  ...timeUnitsPrimary.map(
                                                                                                                                                                                                                +    (e) => [e.unit, e.label] as [unitOfTime.Base, string],
                                                                                                                                                                                                                +  ),
                                                                                                                                                                                                                +  // alternative spellings
                                                                                                                                                                                                                +  ["year", $localize`:time unit:years`],
                                                                                                                                                                                                                +  ["y", $localize`:time unit:years`],
                                                                                                                                                                                                                +  ["month", $localize`:time unit:months`],
                                                                                                                                                                                                                +  ["m", $localize`:time unit:months`],
                                                                                                                                                                                                                +  ["week", $localize`:time unit:weeks`],
                                                                                                                                                                                                                +  ["w", $localize`:time unit:weeks`],
                                                                                                                                                                                                                +  ["day", $localize`:time unit:days`],
                                                                                                                                                                                                                +  ["d", $localize`:time unit:days`],
                                                                                                                                                                                                                +]);
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/TimeIntervalDatatype.html b/documentation/classes/TimeIntervalDatatype.html new file mode 100644 index 0000000000..b07b3f479b --- /dev/null +++ b/documentation/classes/TimeIntervalDatatype.html @@ -0,0 +1,1064 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  File

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  + src/app/features/todos/recurring-interval/time-interval.datatype.ts +

                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Datatype for defining a time interval.

                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  + DefaultDatatype +

                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + Static + + dataType + + +
                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                  + Default value : "time-interval" +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:7 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + + editComponent + + +
                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                  + Default value : "EditRecurringInterval" +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:11 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + Static + + label + + +
                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                  + Default value : $localize`:datatype-label:time interval` +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:8 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + + viewComponent + + +
                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                  + Default value : "DisplayRecurringInterval" +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:10 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + Async + anonymize + + +
                                                                                                                                                                                                                  + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                  value + EntityType + + No + +

                                                                                                                                                                                                                  The original value to be anonymized

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                  parent + any + + No + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + Returns : Promise<any> + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                  +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                  col + ColumnMapping + + No +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + Returns : string + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + Async + importMapFunction + + +
                                                                                                                                                                                                                  + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                  val + any + + No + +

                                                                                                                                                                                                                  The value from an imported cell to be mapped

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                  The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  additional + any + + Yes + +

                                                                                                                                                                                                                  config as returned by the configComponent

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                  +transformToDatabaseFormat(value: EntityType, schemaField?: EntitySchemaField, parent?: Entity) +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:72 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Transformation function taking a value in the format that is used in entity instances and returning the value +in the format used in database objects.

                                                                                                                                                                                                                  +Example :
                                                                                                                                                                                                                       This can be set as a parameter to the `@DatabaseField()` annotation in Entity classes.
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                  value + EntityType + + No + +

                                                                                                                                                                                                                  The value (in Entity format) to be transformed

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  schemaField + EntitySchemaField + + Yes + +

                                                                                                                                                                                                                  The EntitySchemaField configuration providing details of how the value should be transformed. +This can be set as a parameter to the @DatabaseField() annotation in Entity classes.

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  parent + Entity + + Yes + +

                                                                                                                                                                                                                  The full entity instance this value is part of (e.g. to allow cross-related transformations)

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + Returns : DBType + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  + + + transformToObjectFormat + + +
                                                                                                                                                                                                                  +transformToObjectFormat(value: DBType, schemaField?: EntitySchemaField, parent?: any) +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Defined in DefaultDatatype:89 +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Transformation function taking a value in the format that is used in database objects and returning the value +in the format used in entity instances.

                                                                                                                                                                                                                  +Example :
                                                                                                                                                                                                                       This can be set as a parameter to the `@DatabaseField()` annotation in Entity classes.
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                  value + DBType + + No + +

                                                                                                                                                                                                                  The value (in database format) to be transformed

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  schemaField + EntitySchemaField + + Yes + +

                                                                                                                                                                                                                  The EntitySchemaField configuration providing details of how the value should be transformed. +This can be set as a parameter to the @DatabaseField() annotation in Entity classes.

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  parent + any + + Yes + +

                                                                                                                                                                                                                  The full entity instance this value is part of (e.g. to allow cross-related transformations)

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + Returns : EntityType + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  import { DefaultDatatype } from "../../../core/entity/default-datatype/default.datatype";
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                  + * Datatype for defining a time interval.
                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                  +export class TimeIntervalDatatype extends DefaultDatatype {
                                                                                                                                                                                                                  +  static override dataType = "time-interval";
                                                                                                                                                                                                                  +  static override label: string = $localize`:datatype-label:time interval`;
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +  override viewComponent = "DisplayRecurringInterval";
                                                                                                                                                                                                                  +  override editComponent = "EditRecurringInterval";
                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                  +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/TimePeriod.html b/documentation/classes/TimePeriod.html new file mode 100644 index 0000000000..83051dd846 --- /dev/null +++ b/documentation/classes/TimePeriod.html @@ -0,0 +1,650 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    File

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    + src/app/core/entity-details/related-time-period-entities/time-period.ts +

                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Record that is only active for a given time period.

                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    Accessors
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    + + + + end + + +
                                                                                                                                                                                                                    + Type : Date + +
                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                    + + @DatabaseField({dataType: 'date-only', label: undefined, description: undefined})
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    + + + + start + + +
                                                                                                                                                                                                                    + Type : Date + +
                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                    + + @DatabaseField({dataType: 'date-only', label: undefined, description: undefined})
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    + + + + assertValid + + +
                                                                                                                                                                                                                    + + assertValid() +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    + + + + getColor + + +
                                                                                                                                                                                                                    + + getColor() +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + Returns : string + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    + + + isActiveAt + + +
                                                                                                                                                                                                                    +isActiveAt(date: Date) +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Checks whether this relation was active on a specific date

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                    date + Date + + No + +

                                                                                                                                                                                                                    on which the active status should be checked

                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + Returns : boolean + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    + Accessors +

                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    + + isActive +
                                                                                                                                                                                                                    + getisActive() +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Returns true if this relation is currently active

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + Returns : boolean + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                    +import { DatabaseEntity } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                    +import { DatabaseField } from "../../entity/database-field.decorator";
                                                                                                                                                                                                                    +import moment from "moment";
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                    + * Record that is only active for a given time period.
                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                    +@DatabaseEntity("TimePeriod")
                                                                                                                                                                                                                    +export class TimePeriod extends Entity {
                                                                                                                                                                                                                    +  @DatabaseField({
                                                                                                                                                                                                                    +    dataType: "date-only",
                                                                                                                                                                                                                    +    label: $localize`:Label for the start date of a relation:Start date`,
                                                                                                                                                                                                                    +    description: $localize`:Description of the start date of a relation:The date from when this is active.`,
                                                                                                                                                                                                                    +  })
                                                                                                                                                                                                                    +  start: Date;
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +  @DatabaseField({
                                                                                                                                                                                                                    +    dataType: "date-only",
                                                                                                                                                                                                                    +    label: $localize`:Label for the end date of a relation:End date`,
                                                                                                                                                                                                                    +    description: $localize`:Description of the end date of a relation:The date after which this is inactive.`,
                                                                                                                                                                                                                    +  })
                                                                                                                                                                                                                    +  end: Date;
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                    +   * Returns true if this relation is currently active
                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                    +  override get isActive(): boolean {
                                                                                                                                                                                                                    +    if (this.inactive) {
                                                                                                                                                                                                                    +      // manual archiving of records takes precendence
                                                                                                                                                                                                                    +      return false;
                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +    return this.isActiveAt(new Date());
                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                    +   * Checks whether this relation was active on a specific date
                                                                                                                                                                                                                    +   * @param date on which the active status should be checked
                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                    +  isActiveAt(date: Date): boolean {
                                                                                                                                                                                                                    +    return (
                                                                                                                                                                                                                    +      (!this.start || moment(this.start).isSameOrBefore(date, "day")) &&
                                                                                                                                                                                                                    +      (!this.end || moment(this.end).isSameOrAfter(date, "day"))
                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +  override getColor(): string {
                                                                                                                                                                                                                    +    return this.isActive ? "#90ee9040" : "";
                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +  override assertValid() {
                                                                                                                                                                                                                    +    super.assertValid();
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +    this.checkValidDateRange();
                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +  private checkValidDateRange() {
                                                                                                                                                                                                                    +    if (!this.end) {
                                                                                                                                                                                                                    +      // without end date, any range is valid
                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +    const startLabel = this.getSchema().get("start").label;
                                                                                                                                                                                                                    +    const endLabel = this.getSchema().get("end").label;
                                                                                                                                                                                                                    +    if (this.end && !this.start) {
                                                                                                                                                                                                                    +      throw new Error(
                                                                                                                                                                                                                    +        $localize`:Error assertValid failed:No "${startLabel}" date is set`,
                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                    +    } else if (moment(this.start).isAfter(this.end, "days")) {
                                                                                                                                                                                                                    +      throw new Error(
                                                                                                                                                                                                                    +        $localize`:Error assertValid failed:The "${startLabel}" date is after the "${endLabel}" date`,
                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                    +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/Todo.html b/documentation/classes/Todo.html new file mode 100644 index 0000000000..4f218e874e --- /dev/null +++ b/documentation/classes/Todo.html @@ -0,0 +1,900 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      File

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      + src/app/features/todos/model/todo.ts +

                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Base Entity Type for the Todo Feature.

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      All fields are defined in config (in the database) and customized there, +this class only serves as an interface for required fields upon which core functionalities are built.

                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      Accessors
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + assignedTo + + +
                                                                                                                                                                                                                      + Type : string[] + +
                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField({dataType: 'entity', isArray: true})
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + Optional + completed + + +
                                                                                                                                                                                                                      + Type : TodoCompletion + +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField()
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + deadline + + +
                                                                                                                                                                                                                      + Type : Date + +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField({dataType: 'date-only'})
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + description + + +
                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                      + Default value : "" +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField()
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + relatedEntities + + +
                                                                                                                                                                                                                      + Type : string[] + +
                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField({dataType: 'entity', isArray: true})
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      other records (e.g. a recurring activity, group membership, ...) to which this task is related in some way.

                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      This property saves ids including their entity type prefix.

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + repetitionInterval + + +
                                                                                                                                                                                                                      + Type : TimeInterval + +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField()
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + Optional + startDate + + +
                                                                                                                                                                                                                      + Type : Date + +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField({dataType: 'date-only'})
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Optional field to specify a point in time from when the task can be started.

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + subject + + +
                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                      + Default value : "" +
                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                      + + @DatabaseField()
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + Static + create + + +
                                                                                                                                                                                                                      + + create(properties: Partial<Todo>) +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                      properties + Partial<Todo> + + No +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + Returns : Todo + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + + + getWarningLevel + + +
                                                                                                                                                                                                                      + + getWarningLevel() +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + Returns : WarningLevel + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      + Accessors +

                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + isActive +
                                                                                                                                                                                                                      + getisActive() +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      + + isOverdue +
                                                                                                                                                                                                                      + getisOverdue() +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      import { DatabaseEntity } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                      +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                      +import { TimeInterval } from "../recurring-interval/time-interval";
                                                                                                                                                                                                                      +import { TodoCompletion } from "./todo-completion";
                                                                                                                                                                                                                      +import { WarningLevel } from "../../../child-dev-project/warning-level";
                                                                                                                                                                                                                      +import { DatabaseField } from "../../../core/entity/database-field.decorator";
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                      + * Base Entity Type for the Todo Feature.
                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                      + * All fields are defined in config (in the database) and customized there,
                                                                                                                                                                                                                      + * this class only serves as an interface for required fields upon which core functionalities are built.
                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                      +@DatabaseEntity("Todo")
                                                                                                                                                                                                                      +export class Todo extends Entity {
                                                                                                                                                                                                                      +  static create(properties: Partial<Todo>): Todo {
                                                                                                                                                                                                                      +    const instance = new Todo();
                                                                                                                                                                                                                      +    Object.assign(instance, properties);
                                                                                                                                                                                                                      +    return instance;
                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  @DatabaseField()
                                                                                                                                                                                                                      +  subject: string = "";
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  @DatabaseField()
                                                                                                                                                                                                                      +  description: string = "";
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  @DatabaseField({ dataType: "date-only" })
                                                                                                                                                                                                                      +  deadline: Date;
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                      +   * Optional field to specify a point in time from when the task can be started.
                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                      +  @DatabaseField({ dataType: "date-only" })
                                                                                                                                                                                                                      +  startDate?: Date;
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  @DatabaseField({ dataType: "entity", isArray: true })
                                                                                                                                                                                                                      +  assignedTo: string[] = [];
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                      +   * other records (e.g. a recurring activity, group membership, ...) to which this task is related in some way.
                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                      +   * This property saves ids including their entity type prefix.
                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                      +  @DatabaseField({ dataType: "entity", isArray: true })
                                                                                                                                                                                                                      +  relatedEntities: string[] = [];
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  @DatabaseField()
                                                                                                                                                                                                                      +  repetitionInterval: TimeInterval;
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  @DatabaseField()
                                                                                                                                                                                                                      +  completed?: TodoCompletion;
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  override get isActive(): boolean {
                                                                                                                                                                                                                      +    if (this.inactive) {
                                                                                                                                                                                                                      +      // manual archiving of records takes precedence
                                                                                                                                                                                                                      +      return false;
                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +    return !this.completed;
                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  get isOverdue(): boolean {
                                                                                                                                                                                                                      +    return !!(
                                                                                                                                                                                                                      +      !this.completed &&
                                                                                                                                                                                                                      +      this.deadline &&
                                                                                                                                                                                                                      +      this.deadline.getTime() < new Date().getTime()
                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +  override getWarningLevel(): WarningLevel {
                                                                                                                                                                                                                      +    if (this.isOverdue) {
                                                                                                                                                                                                                      +      return WarningLevel.URGENT;
                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                      +    if (this.completed) {
                                                                                                                                                                                                                      +      return WarningLevel.OK;
                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                      +    return WarningLevel.NONE;
                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                      +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/UpdateMetadata.html b/documentation/classes/UpdateMetadata.html new file mode 100644 index 0000000000..d6d1fa5347 --- /dev/null +++ b/documentation/classes/UpdateMetadata.html @@ -0,0 +1,470 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        File

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        + src/app/core/entity/model/update-metadata.ts +

                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Object to store metadata about a "revision" of a document including date and author of the change.

                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                        +constructor(by: string, at: Date) +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                        by + string + + No +
                                                                                                                                                                                                                        at + Date + + No +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        + + + + at + + +
                                                                                                                                                                                                                        + Type : Date + +
                                                                                                                                                                                                                        + Decorators : +
                                                                                                                                                                                                                        + + @DatabaseField()
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        when the update was saved to db

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        + + + + by + + +
                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                        + Decorators : +
                                                                                                                                                                                                                        + + @DatabaseField()
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        username who saved the update

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        + + + Static + DATA_TYPE + + +
                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                        + Default value : "update-metadata" +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + + + + + + +
                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        import { DatabaseField } from "../database-field.decorator";
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                        + * Object to store metadata about a "revision" of a document including date and author of the change.
                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                        +export class UpdateMetadata {
                                                                                                                                                                                                                        +  static DATA_TYPE = "update-metadata";
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +  /** when the update was saved to db */
                                                                                                                                                                                                                        +  @DatabaseField() at: Date;
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +  /** username who saved the update */
                                                                                                                                                                                                                        +  @DatabaseField() by: string;
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +  constructor(by: string = undefined, at: Date = new Date()) {
                                                                                                                                                                                                                        +    this.by = by;
                                                                                                                                                                                                                        +    this.at = at;
                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                        +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/ViewComponentContext.html b/documentation/classes/ViewComponentContext.html new file mode 100644 index 0000000000..4f32007495 --- /dev/null +++ b/documentation/classes/ViewComponentContext.html @@ -0,0 +1,436 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          File

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          + src/app/core/ui/abstract-view/abstract-view.component.ts +

                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Service to share context for components that can be used both +in dialogs (wrapped by DialogViewComponent) and +in full screen (wrapped by RoutedViewComponent).

                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                          +constructor(isDialog: boolean) +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                          isDialog + boolean + + No +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          + + + actions + + +
                                                                                                                                                                                                                          + Type : ViewActionsComponent + +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          + + + Public + isDialog + + +
                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          + + + title + + +
                                                                                                                                                                                                                          + Type : ViewTitleComponent + +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + + + + + + +
                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          import { Injector } from "@angular/core";
                                                                                                                                                                                                                          +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                          +import { ViewActionsComponent } from "../../common-components/view-actions/view-actions.component";
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                          + * Base class for wrapper components like RoutedViewComponent or DialogViewComponent
                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                          +export abstract class AbstractViewComponent {
                                                                                                                                                                                                                          +  viewContext: ViewComponentContext;
                                                                                                                                                                                                                          +  componentInjector: Injector | undefined;
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +  constructor(injector: Injector, isDialog: boolean) {
                                                                                                                                                                                                                          +    this.viewContext = new ViewComponentContext(isDialog);
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +    this.componentInjector = Injector.create({
                                                                                                                                                                                                                          +      providers: [
                                                                                                                                                                                                                          +        { provide: ViewComponentContext, useValue: this.viewContext },
                                                                                                                                                                                                                          +      ],
                                                                                                                                                                                                                          +      parent: injector,
                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                          + * Service to share context for components that can be used both
                                                                                                                                                                                                                          + * in dialogs (wrapped by DialogViewComponent) and
                                                                                                                                                                                                                          + * in full screen (wrapped by RoutedViewComponent).
                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                          +export class ViewComponentContext {
                                                                                                                                                                                                                          +  title: ViewTitleComponent;
                                                                                                                                                                                                                          +  actions: ViewActionsComponent;
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +  constructor(public isDialog: boolean) {}
                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                          +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AccountPageComponent.html b/documentation/components/AccountPageComponent.html new file mode 100644 index 0000000000..f27bd07ea1 --- /dev/null +++ b/documentation/components/AccountPageComponent.html @@ -0,0 +1,671 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            File

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            + src/app/core/session/auth/keycloak/account-page/account-page.component.ts +

                                                                                                                                                                                                                            + + + + +

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                            +constructor(authService: KeycloakAuthService, alertService: AlertService) +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                            authService + KeycloakAuthService + + No +
                                                                                                                                                                                                                            alertService + AlertService + + No +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                            + + disabled +
                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            + + + setEmail + + +
                                                                                                                                                                                                                            +setEmail() +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            + + + Public + authService + + +
                                                                                                                                                                                                                            + Type : KeycloakAuthService + +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            + + + email + + +
                                                                                                                                                                                                                            + Default value : new FormControl("", [Validators.required, Validators.email]) +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                            +import { KeycloakAuthService } from "../keycloak-auth.service";
                                                                                                                                                                                                                            +import { FormControl, ReactiveFormsModule, Validators } from "@angular/forms";
                                                                                                                                                                                                                            +import { AlertService } from "../../../../alerts/alert.service";
                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                            +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                            +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                            +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                            +  selector: "app-account-page",
                                                                                                                                                                                                                            +  templateUrl: "./account-page.component.html",
                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                            +    Angulartics2Module,
                                                                                                                                                                                                                            +    MatFormFieldModule,
                                                                                                                                                                                                                            +    ReactiveFormsModule,
                                                                                                                                                                                                                            +    MatInputModule,
                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                            +export class AccountPageComponent implements OnInit {
                                                                                                                                                                                                                            +  @Input() disabled: boolean;
                                                                                                                                                                                                                            +  email = new FormControl("", [Validators.required, Validators.email]);
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                            +    public authService: KeycloakAuthService,
                                                                                                                                                                                                                            +    private alertService: AlertService,
                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +  ngOnInit() {
                                                                                                                                                                                                                            +    if (this.disabled) {
                                                                                                                                                                                                                            +      this.email.disable();
                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                            +    this.authService
                                                                                                                                                                                                                            +      .getUserinfo()
                                                                                                                                                                                                                            +      .then((res) => this.email.setValue(res.email))
                                                                                                                                                                                                                            +      .catch((err) => console.debug("user profile not available", err));
                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +  setEmail() {
                                                                                                                                                                                                                            +    if (this.email.invalid) {
                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +    this.authService.setEmail(this.email.value).subscribe({
                                                                                                                                                                                                                            +      next: () =>
                                                                                                                                                                                                                            +        this.alertService.addInfo(
                                                                                                                                                                                                                            +          $localize`Please click the link in the email we sent you to verify your email address.`,
                                                                                                                                                                                                                            +        ),
                                                                                                                                                                                                                            +      error: (err) => this.email.setErrors({ other: err.error.message }),
                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            <button
                                                                                                                                                                                                                            +  mat-stroked-button
                                                                                                                                                                                                                            +  angulartics2On="click"
                                                                                                                                                                                                                            +  angularticsCategory="User"
                                                                                                                                                                                                                            +  angularticsAction="password_update"
                                                                                                                                                                                                                            +  (click)="authService.changePassword()"
                                                                                                                                                                                                                            +  [disabled]="disabled"
                                                                                                                                                                                                                            +  i18n="Button which opens password reset page"
                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                            +  Change Password
                                                                                                                                                                                                                            +</button>
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +<form style="margin-top: 20px" onSubmit="return false">
                                                                                                                                                                                                                            +  <mat-form-field>
                                                                                                                                                                                                                            +    <input
                                                                                                                                                                                                                            +      [formControl]="email"
                                                                                                                                                                                                                            +      type="email"
                                                                                                                                                                                                                            +      i18n-placeholder="Email address input field"
                                                                                                                                                                                                                            +      placeholder="Your email address"
                                                                                                                                                                                                                            +      matInput
                                                                                                                                                                                                                            +    />
                                                                                                                                                                                                                            +    <mat-error
                                                                                                                                                                                                                            +      *ngIf="email.errors?.email || email.errors?.required"
                                                                                                                                                                                                                            +      i18n="Error message if email format is invalid"
                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                            +      Please provide a valid email
                                                                                                                                                                                                                            +    </mat-error>
                                                                                                                                                                                                                            +    <mat-error *ngIf="email.errors?.other">{{ email.errors.other }}</mat-error>
                                                                                                                                                                                                                            +  </mat-form-field>
                                                                                                                                                                                                                            +  <p>
                                                                                                                                                                                                                            +    <button
                                                                                                                                                                                                                            +      mat-stroked-button
                                                                                                                                                                                                                            +      angulartics2On="click"
                                                                                                                                                                                                                            +      angularticsCategory="User"
                                                                                                                                                                                                                            +      angularticsAction="email_update"
                                                                                                                                                                                                                            +      (click)="setEmail()"
                                                                                                                                                                                                                            +      i18n="Button which updates the user's email"
                                                                                                                                                                                                                            +      style="margin-top: 5px"
                                                                                                                                                                                                                            +      [disabled]="email.disabled"
                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                            +      Update email
                                                                                                                                                                                                                            +    </button>
                                                                                                                                                                                                                            +  </p>
                                                                                                                                                                                                                            +</form>
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                            +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ActivitiesOverviewComponent.html b/documentation/components/ActivitiesOverviewComponent.html new file mode 100644 index 0000000000..1fc2240340 --- /dev/null +++ b/documentation/components/ActivitiesOverviewComponent.html @@ -0,0 +1,1233 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              File

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              + src/app/child-dev-project/attendance/activities-overview/activities-overview.component.ts +

                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              configure a RelatedEntitiesComponent instead

                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              + RelatedEntitiesComponent +

                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + clickMode +
                                                                                                                                                                                                                              + Type : "popup" | "navigate" + +
                                                                                                                                                                                                                              + Default value : "popup" +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + columns +
                                                                                                                                                                                                                              + Type : ColumnConfig[] + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Columns to be displayed in the table

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + editable +
                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                              + Default value : true +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + entity +
                                                                                                                                                                                                                              + Type : Entity + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              currently viewed/main entity for which related entities are displayed in this component

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + entityType +
                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              entity type of the related entities to be displayed

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + filter +
                                                                                                                                                                                                                              + Type : DataFilter<E> + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              This filter is applied before displaying the data.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + loaderMethod +
                                                                                                                                                                                                                              + Type : LoaderMethod + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + property +
                                                                                                                                                                                                                              + Type : string | string[] + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Property name of the related entities (type given in this.entityType) that holds the entity id +to be matched with the id of the current main entity (given in this.entity). +If not explicitly set, this will be inferred based on the defined relations between the entities.

                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              manually setting this is only necessary if you have multiple properties referencing the same entity type +and you want to list only records related to one of them. +For example: if you set entityType = "Project" (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities, +you can set property = "supervisors" to only list those projects where the current User is supervisors, not participant.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + showInactive +
                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Whether inactive/archived records should be shown.

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + createNewRecordFactory + + +
                                                                                                                                                                                                                              +createNewRecordFactory() +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + Returns : () => any + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + Protected + getData + + +
                                                                                                                                                                                                                              + + getData() +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + Returns : Promise<E[]> + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + Protected + getProperty + + +
                                                                                                                                                                                                                              + + getProperty() +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + Returns : string | [] + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + Protected + initFilter + + +
                                                                                                                                                                                                                              + + initFilter() +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + Returns : DataFilter<E> + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + Protected + listenToEntityUpdates + + +
                                                                                                                                                                                                                              + + listenToEntityUpdates() +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + + _columns + + +
                                                                                                                                                                                                                              + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                              + Default value : [ + this.titleColumn, + { id: "type" }, + { id: "assignedTo" }, + { id: "linkedGroups" }, + { id: "excludedParticipants" }, + ] +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + + entityCtr + + +
                                                                                                                                                                                                                              + Default value : RecurringActivity +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + titleColumn + + +
                                                                                                                                                                                                                              + Type : FormFieldConfig + +
                                                                                                                                                                                                                              + Default value : { + id: "title", + editComponent: "EditTextWithAutocomplete", + additional: { + entityType: "RecurringActivity", + relevantProperty: "linkedGroups", + relevantValue: "", + }, + } +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + columnsToDisplay + + +
                                                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              + + + data + + +
                                                                                                                                                                                                                              + Type : E[] + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                              +import { RecurringActivity } from "../model/recurring-activity";
                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                              +import { RelatedEntitiesComponent } from "../../../core/entity-details/related-entities/related-entities.component";
                                                                                                                                                                                                                              +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                              +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                              + * @deprecated configure a RelatedEntitiesComponent instead
                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                              +@DynamicComponent("ActivitiesOverview")
                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                              +  selector: "app-activities-overview",
                                                                                                                                                                                                                              +  templateUrl:
                                                                                                                                                                                                                              +    "../../../core/entity-details/related-entities/related-entities.component.html",
                                                                                                                                                                                                                              +  imports: [EntitiesTableComponent],
                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                              +export class ActivitiesOverviewComponent
                                                                                                                                                                                                                              +  extends RelatedEntitiesComponent<RecurringActivity>
                                                                                                                                                                                                                              +  implements OnInit
                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                              +  override entityCtr = RecurringActivity;
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +  titleColumn: FormFieldConfig = {
                                                                                                                                                                                                                              +    id: "title",
                                                                                                                                                                                                                              +    editComponent: "EditTextWithAutocomplete",
                                                                                                                                                                                                                              +    additional: {
                                                                                                                                                                                                                              +      entityType: "RecurringActivity",
                                                                                                                                                                                                                              +      relevantProperty: "linkedGroups",
                                                                                                                                                                                                                              +      relevantValue: "",
                                                                                                                                                                                                                              +    },
                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                              +  override _columns: FormFieldConfig[] = [
                                                                                                                                                                                                                              +    this.titleColumn,
                                                                                                                                                                                                                              +    { id: "type" },
                                                                                                                                                                                                                              +    { id: "assignedTo" },
                                                                                                                                                                                                                              +    { id: "linkedGroups" },
                                                                                                                                                                                                                              +    { id: "excludedParticipants" },
                                                                                                                                                                                                                              +  ];
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +  override async ngOnInit() {
                                                                                                                                                                                                                              +    this.titleColumn.additional.relevantValue = this.entity.getId();
                                                                                                                                                                                                                              +    await super.ngOnInit();
                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              <app-entities-table
                                                                                                                                                                                                                              +  [entityType]="entityCtr"
                                                                                                                                                                                                                              +  [records]="data"
                                                                                                                                                                                                                              +  [filter]="filter"
                                                                                                                                                                                                                              +  [customColumns]="_columns"
                                                                                                                                                                                                                              +  [columnsToDisplay]="columnsToDisplay"
                                                                                                                                                                                                                              +  [newRecordFactory]="createNewRecordFactory()"
                                                                                                                                                                                                                              +  [showInactive]="showInactive"
                                                                                                                                                                                                                              +  [clickMode]="clickMode"
                                                                                                                                                                                                                              +  [editable]="editable"
                                                                                                                                                                                                                              +></app-entities-table>
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ActivityAttendanceSectionComponent.html b/documentation/components/ActivityAttendanceSectionComponent.html new file mode 100644 index 0000000000..c718d7db9a --- /dev/null +++ b/documentation/components/ActivityAttendanceSectionComponent.html @@ -0,0 +1,1209 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                + src/app/child-dev-project/attendance/activity-attendance-section/activity-attendance-section.component.ts +

                                                                                                                                                                                                                                + + + + +

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                + OnInit +

                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                +constructor(attendanceService: AttendanceService, locale: string, dialog: MatDialog) +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                attendanceService + AttendanceService + + No +
                                                                                                                                                                                                                                locale + string + + No +
                                                                                                                                                                                                                                dialog + MatDialog + + No +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                + Type : RecurringActivity + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + forChild +
                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + Async + init + + +
                                                                                                                                                                                                                                + + init(loadAll: boolean) +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                NameTypeOptionalDefault value
                                                                                                                                                                                                                                loadAll + boolean + + No + + false +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + showDetails + + +
                                                                                                                                                                                                                                +showDetails(activity: ActivityAttendance) +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                activity + ActivityAttendance + + No +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + updateDisplayedRecords + + +
                                                                                                                                                                                                                                +updateDisplayedRecords(includeRecordsWithoutParticipation: boolean) +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                includeRecordsWithoutParticipation + boolean + + No +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + allRecords + + +
                                                                                                                                                                                                                                + Type : ActivityAttendance[] + +
                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + columns + + +
                                                                                                                                                                                                                                + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                + Default value : [ + { + id: "periodFrom", + label: $localize`:The month something took place:Month`, + viewComponent: "DisplayMonth", + }, + { + id: "presentEvents", + label: $localize`:How many children are present at a meeting|Title of table column:Present`, + viewComponent: "ReadonlyFunction", + additional: (e: ActivityAttendance) => + this.forChild + ? e.countEventsPresent(this.forChild) + : e.countTotalPresent(), + }, + { + id: "totalEvents", + label: $localize`:Events of an attendance:Events`, + viewComponent: "ReadonlyFunction", + additional: (e: ActivityAttendance) => e.countEventsTotal(), + }, + { + id: "attendancePercentage", + label: $localize`:Percentage of people that attended an event:Attended`, + viewComponent: "ReadonlyFunction", + additional: (e: ActivityAttendance) => + formatPercent( + this.forChild + ? e.getAttendancePercentage(this.forChild) + : e.getAttendancePercentageAverage(), + this.locale, + "1.0-0", + ), + }, + ] +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + combinedAttendance + + +
                                                                                                                                                                                                                                + Type : ActivityAttendance + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + entityCtr + + +
                                                                                                                                                                                                                                + Default value : ActivityAttendance +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + Optional + getBackgroundColor + + +
                                                                                                                                                                                                                                + Type : function + +
                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + loading + + +
                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                + Default value : true +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                + + + records + + +
                                                                                                                                                                                                                                + Type : ActivityAttendance[] + +
                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                import { Component, Inject, Input, LOCALE_ID, OnInit } from "@angular/core";
                                                                                                                                                                                                                                +import { RecurringActivity } from "../model/recurring-activity";
                                                                                                                                                                                                                                +import { AttendanceDetailsComponent } from "../attendance-details/attendance-details.component";
                                                                                                                                                                                                                                +import { AttendanceService } from "../attendance.service";
                                                                                                                                                                                                                                +import { formatPercent, NgIf } from "@angular/common";
                                                                                                                                                                                                                                +import { ActivityAttendance } from "../model/activity-attendance";
                                                                                                                                                                                                                                +import moment from "moment";
                                                                                                                                                                                                                                +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                +import { AttendanceCalendarComponent } from "../attendance-calendar/attendance-calendar.component";
                                                                                                                                                                                                                                +import { AttendanceSummaryComponent } from "../attendance-summary/attendance-summary.component";
                                                                                                                                                                                                                                +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +@DynamicComponent("ActivityAttendanceSection")
                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                +  selector: "app-activity-attendance-section",
                                                                                                                                                                                                                                +  templateUrl: "./activity-attendance-section.component.html",
                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                +    MatProgressBarModule,
                                                                                                                                                                                                                                +    EntitiesTableComponent,
                                                                                                                                                                                                                                +    MatSlideToggleModule,
                                                                                                                                                                                                                                +    MatTooltipModule,
                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                +    AttendanceCalendarComponent,
                                                                                                                                                                                                                                +    AttendanceSummaryComponent,
                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                +export class ActivityAttendanceSectionComponent implements OnInit {
                                                                                                                                                                                                                                +  @Input() entity: RecurringActivity;
                                                                                                                                                                                                                                +  @Input() forChild?: string;
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  loading: boolean = true;
                                                                                                                                                                                                                                +  records: ActivityAttendance[] = [];
                                                                                                                                                                                                                                +  entityCtr = ActivityAttendance;
                                                                                                                                                                                                                                +  allRecords: ActivityAttendance[] = [];
                                                                                                                                                                                                                                +  combinedAttendance: ActivityAttendance;
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  columns: FormFieldConfig[] = [
                                                                                                                                                                                                                                +    {
                                                                                                                                                                                                                                +      id: "periodFrom",
                                                                                                                                                                                                                                +      label: $localize`:The month something took place:Month`,
                                                                                                                                                                                                                                +      viewComponent: "DisplayMonth",
                                                                                                                                                                                                                                +    },
                                                                                                                                                                                                                                +    {
                                                                                                                                                                                                                                +      id: "presentEvents",
                                                                                                                                                                                                                                +      label: $localize`:How many children are present at a meeting|Title of table column:Present`,
                                                                                                                                                                                                                                +      viewComponent: "ReadonlyFunction",
                                                                                                                                                                                                                                +      additional: (e: ActivityAttendance) =>
                                                                                                                                                                                                                                +        this.forChild
                                                                                                                                                                                                                                +          ? e.countEventsPresent(this.forChild)
                                                                                                                                                                                                                                +          : e.countTotalPresent(),
                                                                                                                                                                                                                                +    },
                                                                                                                                                                                                                                +    {
                                                                                                                                                                                                                                +      id: "totalEvents",
                                                                                                                                                                                                                                +      label: $localize`:Events of an attendance:Events`,
                                                                                                                                                                                                                                +      viewComponent: "ReadonlyFunction",
                                                                                                                                                                                                                                +      additional: (e: ActivityAttendance) => e.countEventsTotal(),
                                                                                                                                                                                                                                +    },
                                                                                                                                                                                                                                +    {
                                                                                                                                                                                                                                +      id: "attendancePercentage",
                                                                                                                                                                                                                                +      label: $localize`:Percentage of people that attended an event:Attended`,
                                                                                                                                                                                                                                +      viewComponent: "ReadonlyFunction",
                                                                                                                                                                                                                                +      additional: (e: ActivityAttendance) =>
                                                                                                                                                                                                                                +        formatPercent(
                                                                                                                                                                                                                                +          this.forChild
                                                                                                                                                                                                                                +            ? e.getAttendancePercentage(this.forChild)
                                                                                                                                                                                                                                +            : e.getAttendancePercentageAverage(),
                                                                                                                                                                                                                                +          this.locale,
                                                                                                                                                                                                                                +          "1.0-0",
                                                                                                                                                                                                                                +        ),
                                                                                                                                                                                                                                +    },
                                                                                                                                                                                                                                +  ];
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                +    @Inject(LOCALE_ID) private locale: string,
                                                                                                                                                                                                                                +    private dialog: MatDialog,
                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  ngOnInit() {
                                                                                                                                                                                                                                +    return this.init();
                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  async init(loadAll: boolean = false) {
                                                                                                                                                                                                                                +    this.loading = true;
                                                                                                                                                                                                                                +    if (loadAll) {
                                                                                                                                                                                                                                +      this.allRecords = await this.attendanceService.getActivityAttendances(
                                                                                                                                                                                                                                +        this.entity,
                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                +      this.allRecords = await this.attendanceService.getActivityAttendances(
                                                                                                                                                                                                                                +        this.entity,
                                                                                                                                                                                                                                +        moment().startOf("month").subtract(6, "months").toDate(),
                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                +    this.updateDisplayedRecords(false);
                                                                                                                                                                                                                                +    this.createCombinedAttendance();
                                                                                                                                                                                                                                +    this.loading = false;
                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  private createCombinedAttendance() {
                                                                                                                                                                                                                                +    this.combinedAttendance = new ActivityAttendance();
                                                                                                                                                                                                                                +    this.combinedAttendance.activity = this.entity;
                                                                                                                                                                                                                                +    this.allRecords.forEach((record) => {
                                                                                                                                                                                                                                +      this.combinedAttendance.events.push(...record.events);
                                                                                                                                                                                                                                +      if (
                                                                                                                                                                                                                                +        !this.combinedAttendance.periodFrom ||
                                                                                                                                                                                                                                +        moment(record.periodFrom).isBefore(
                                                                                                                                                                                                                                +          this.combinedAttendance.periodFrom,
                                                                                                                                                                                                                                +          "day",
                                                                                                                                                                                                                                +        )
                                                                                                                                                                                                                                +      ) {
                                                                                                                                                                                                                                +        this.combinedAttendance.periodFrom = record.periodFrom;
                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +      if (
                                                                                                                                                                                                                                +        !this.combinedAttendance.periodTo ||
                                                                                                                                                                                                                                +        moment(record.periodTo).isAfter(this.combinedAttendance.periodTo, "day")
                                                                                                                                                                                                                                +      ) {
                                                                                                                                                                                                                                +        this.combinedAttendance.periodTo = record.periodTo;
                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  updateDisplayedRecords(includeRecordsWithoutParticipation: boolean) {
                                                                                                                                                                                                                                +    if (includeRecordsWithoutParticipation || !this.forChild) {
                                                                                                                                                                                                                                +      this.records = this.allRecords;
                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                +      this.records = this.allRecords.filter(
                                                                                                                                                                                                                                +        (r) =>
                                                                                                                                                                                                                                +          r.countEventsAbsent(this.forChild) +
                                                                                                                                                                                                                                +            r.countEventsPresent(this.forChild) >
                                                                                                                                                                                                                                +          0,
                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +    if (this.records?.length > 0) {
                                                                                                                                                                                                                                +      this.records.sort(
                                                                                                                                                                                                                                +        (a, b) => b.periodFrom.getTime() - a.periodFrom.getTime(),
                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  showDetails(activity: ActivityAttendance) {
                                                                                                                                                                                                                                +    this.dialog.open(AttendanceDetailsComponent, {
                                                                                                                                                                                                                                +      data: {
                                                                                                                                                                                                                                +        forChild: this.forChild,
                                                                                                                                                                                                                                +        attendance: activity,
                                                                                                                                                                                                                                +      },
                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +  getBackgroundColor?: (rec: ActivityAttendance) => string = (
                                                                                                                                                                                                                                +    rec: ActivityAttendance,
                                                                                                                                                                                                                                +  ) => rec.getColor(this.forChild);
                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                <div *ngIf="loading">
                                                                                                                                                                                                                                +  <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +<div class="flex-row flex-wrap gap-large" *ngIf="!loading">
                                                                                                                                                                                                                                +  <app-attendance-calendar
                                                                                                                                                                                                                                +    class="flex-grow"
                                                                                                                                                                                                                                +    [records]="combinedAttendance?.events || []"
                                                                                                                                                                                                                                +    [highlightForChild]="forChild"
                                                                                                                                                                                                                                +    [activity]="entity"
                                                                                                                                                                                                                                +  ></app-attendance-calendar>
                                                                                                                                                                                                                                +  <app-attendance-summary
                                                                                                                                                                                                                                +    [attendance]="combinedAttendance"
                                                                                                                                                                                                                                +    [forChild]="forChild"
                                                                                                                                                                                                                                +    [columns]="columns"
                                                                                                                                                                                                                                +    class="margin-top-regular flex-grow"
                                                                                                                                                                                                                                +  ></app-attendance-summary>
                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +<app-entities-table
                                                                                                                                                                                                                                +  [entityType]="entityCtr"
                                                                                                                                                                                                                                +  [records]="records"
                                                                                                                                                                                                                                +  [customColumns]="columns"
                                                                                                                                                                                                                                +  clickMode="none"
                                                                                                                                                                                                                                +  (entityClick)="showDetails($event)"
                                                                                                                                                                                                                                +  [getBackgroundColor]="getBackgroundColor"
                                                                                                                                                                                                                                +  [editable]="false"
                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                +</app-entities-table>
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +<div class="margin-top-regular">
                                                                                                                                                                                                                                +  <mat-slide-toggle
                                                                                                                                                                                                                                +    i18n="
                                                                                                                                                                                                                                +      slider|show unrelated attendance-entries for an activity that are not
                                                                                                                                                                                                                                +      linked to the child of interest
                                                                                                                                                                                                                                +    "
                                                                                                                                                                                                                                +    (change)="updateDisplayedRecords($event.checked)"
                                                                                                                                                                                                                                +    i18n-matTooltip="
                                                                                                                                                                                                                                +      Show unrelated tooltip|Tooltip that will appear when hovered over the
                                                                                                                                                                                                                                +      show-unrelated button
                                                                                                                                                                                                                                +    "
                                                                                                                                                                                                                                +    matTooltip="Activate to also show entries for the activity that do not have any events with actual participation of this person"
                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                +    Also show unrelated
                                                                                                                                                                                                                                +  </mat-slide-toggle>
                                                                                                                                                                                                                                +  &nbsp;
                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                +    i18n="
                                                                                                                                                                                                                                +      load-all button|load all records, not only the ones from the last 6 months
                                                                                                                                                                                                                                +    "
                                                                                                                                                                                                                                +    mat-stroked-button
                                                                                                                                                                                                                                +    (click)="init(true)"
                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                +    Load all records
                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ActivityCardComponent.html b/documentation/components/ActivityCardComponent.html new file mode 100644 index 0000000000..8ebb165896 --- /dev/null +++ b/documentation/components/ActivityCardComponent.html @@ -0,0 +1,653 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  + src/app/child-dev-project/attendance/activity-card/activity-card.component.ts +

                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  Accessors
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  + + event +
                                                                                                                                                                                                                                  + Type : Note + +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  The Note representing the event to be displayed

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  + + recurring +
                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Whether the event or activity is displayed in the style of events generated from a generic recurring activity.

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  If not explicitly defined, it is inferred from the given event Note's reference to an activity.

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  + Accessors +

                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  + + recurring +
                                                                                                                                                                                                                                  + getrecurring() +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  + setrecurring(value: boolean) +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Whether the event or activity is displayed in the style of events generated from a generic recurring activity.

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  If not explicitly defined, it is inferred from the given event Note's reference to an activity.

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                  value + boolean + + No +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  + + warningLevel +
                                                                                                                                                                                                                                  + getwarningLevel() +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                  +import { Note } from "../../notes/model/note";
                                                                                                                                                                                                                                  +import { RecurringActivity } from "../model/recurring-activity";
                                                                                                                                                                                                                                  +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                  +import { BorderHighlightDirective } from "../../../core/common-components/border-highlight/border-highlight.directive";
                                                                                                                                                                                                                                  +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                  +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                  +  selector: "app-activity-card",
                                                                                                                                                                                                                                  +  templateUrl: "./activity-card.component.html",
                                                                                                                                                                                                                                  +  styleUrls: ["./activity-card.component.scss"],
                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                  +    MatCardModule,
                                                                                                                                                                                                                                  +    BorderHighlightDirective,
                                                                                                                                                                                                                                  +    FontAwesomeModule,
                                                                                                                                                                                                                                  +    DatePipe,
                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                  +export class ActivityCardComponent {
                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                  +   * The Note representing the event to be displayed
                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                  +  @Input() event: Note;
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +  private _displayAsRecurring: boolean | null = null;
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                  +   * Whether the event or activity is displayed in the style of events generated from a generic recurring activity.
                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                  +   * If not explicitly defined, it is inferred from the given event Note's reference to an activity.
                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                  +  @Input() set recurring(value: boolean) {
                                                                                                                                                                                                                                  +    this._displayAsRecurring = value;
                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +  get recurring(): boolean {
                                                                                                                                                                                                                                  +    if (this._displayAsRecurring !== null) {
                                                                                                                                                                                                                                  +      return this._displayAsRecurring;
                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                  +      return RecurringActivity.isActivityEventNote(this.event);
                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +  get warningLevel(): "ok" | "warning" | "urgent" {
                                                                                                                                                                                                                                  +    if (!this.event.hasUnknownAttendances()) {
                                                                                                                                                                                                                                  +      return "ok";
                                                                                                                                                                                                                                  +    } else if (!this.recurring && this.event.hasUnknownAttendances()) {
                                                                                                                                                                                                                                  +      return "urgent";
                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                  +      return "warning";
                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  <mat-card
                                                                                                                                                                                                                                  +  appBorderHighlight
                                                                                                                                                                                                                                  +  [borderClass]="'border-' + warningLevel"
                                                                                                                                                                                                                                  +  class="main-card"
                                                                                                                                                                                                                                  +>
                                                                                                                                                                                                                                  +  <mat-card-header>
                                                                                                                                                                                                                                  +    <mat-card-title>{{ event?.subject }}</mat-card-title>
                                                                                                                                                                                                                                  +  </mat-card-header>
                                                                                                                                                                                                                                  +  <mat-card-content class="text-secondary">
                                                                                                                                                                                                                                  +    <fa-icon icon="child"></fa-icon>
                                                                                                                                                                                                                                  +    {{ event.children.length }}
                                                                                                                                                                                                                                  +    {event.children.length, plural, one {participant} other {participants}}
                                                                                                                                                                                                                                  +    <ng-container *ngIf="!recurring">
                                                                                                                                                                                                                                  +      <span class="sep">/</span>
                                                                                                                                                                                                                                  +      <fa-icon icon="calendar"></fa-icon>
                                                                                                                                                                                                                                  +      {{ event.date | date: "shortDate" }}
                                                                                                                                                                                                                                  +    </ng-container>
                                                                                                                                                                                                                                  +    <span class="sep">/</span>{{ event.category?.label }}
                                                                                                                                                                                                                                  +  </mat-card-content>
                                                                                                                                                                                                                                  +</mat-card>
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  + ./activity-card.component.scss +

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  @use "variables/colors";
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +.border-ok {
                                                                                                                                                                                                                                  +  border-color: colors.$success !important;
                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +.border-warning {
                                                                                                                                                                                                                                  +  border-color: colors.$warn !important;
                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +.border-urgent {
                                                                                                                                                                                                                                  +  border-color: colors.$error !important;
                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +.main-card {
                                                                                                                                                                                                                                  +  max-width: 500px;
                                                                                                                                                                                                                                  +  height: 100%;
                                                                                                                                                                                                                                  +  box-sizing: border-box;
                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +.card-title {
                                                                                                                                                                                                                                  +  font-weight: bold;
                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +.sep {
                                                                                                                                                                                                                                  +  font-weight: 900;
                                                                                                                                                                                                                                  +  color: colors.$disabled;
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +  /* Add a whitespace before the separator */
                                                                                                                                                                                                                                  +  &::before {
                                                                                                                                                                                                                                  +    content: " ";
                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +  /* Add a whitespace before the separator */
                                                                                                                                                                                                                                  +  &::after {
                                                                                                                                                                                                                                  +    content: " ";
                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AddDayAttendanceComponent.html b/documentation/components/AddDayAttendanceComponent.html new file mode 100644 index 0000000000..75045a66da --- /dev/null +++ b/documentation/components/AddDayAttendanceComponent.html @@ -0,0 +1,1074 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    + src/app/child-dev-project/attendance/add-day-attendance/add-day-attendance.component.ts +

                                                                                                                                                                                                                                    + + + + + + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    +constructor(entityMapper: EntityMapperService, confirmationDialog: ConfirmationDialogService) +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                    entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                    confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + sortParticipantsBy +
                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    (optional) property name of the participant entities by which they are sorted for the roll call

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + exit + + +
                                                                                                                                                                                                                                    +exit() +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + finishBasicInformationStage + + +
                                                                                                                                                                                                                                    +finishBasicInformationStage(event: Note) +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                    event + Note + + No +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + finishRollCallState + + +
                                                                                                                                                                                                                                    +finishRollCallState() +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + Async + saveRollCallResult + + +
                                                                                                                                                                                                                                    + + saveRollCallResult(eventNote: Note) +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                    eventNote + Note + + No +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + Readonly + buttons + + +
                                                                                                                                                                                                                                    + Type : ConfirmationDialogButton[] + +
                                                                                                                                                                                                                                    + Default value : [ + { + text: $localize`Save`, + click: (): boolean => { + this.saveRollCallResult(this.event).then(() => { + this.finishRollCallState(); + }); + return true; + }, + }, + { + text: $localize`:Discard changes made to a form:Discard`, + click: (): boolean => { + this.finishRollCallState(); + return false; + }, + }, + ] +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + currentStage + + +
                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                    + Default value : 0 +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + day + + +
                                                                                                                                                                                                                                    + Default value : new Date() +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + event + + +
                                                                                                                                                                                                                                    + Type : Note + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + + rollCallComponent + + +
                                                                                                                                                                                                                                    + Type : RollCallComponent + +
                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                    + + @ViewChild(RollCallComponent)
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    + + + stages + + +
                                                                                                                                                                                                                                    + Type : [] + +
                                                                                                                                                                                                                                    + Default value : [ + $localize`:One of the stages while recording child-attendances:Select Event`, + $localize`:One of the stages while recording child-attendances:Record Attendance`, + ] +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    import { Component, Input, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                    +import { Note } from "../../notes/model/note";
                                                                                                                                                                                                                                    +import { ConfirmationDialogService } from "../../../core/common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                    +import { ConfirmationDialogButton } from "../../../core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component";
                                                                                                                                                                                                                                    +import { RollCallComponent } from "./roll-call/roll-call.component";
                                                                                                                                                                                                                                    +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                    +import { RollCallSetupComponent } from "./roll-call-setup/roll-call-setup.component";
                                                                                                                                                                                                                                    +import { ViewTitleComponent } from "../../../core/common-components/view-title/view-title.component";
                                                                                                                                                                                                                                    +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +@RouteTarget("AddDayAttendance")
                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                    +  selector: "app-add-day-attendance",
                                                                                                                                                                                                                                    +  templateUrl: "./add-day-attendance.component.html",
                                                                                                                                                                                                                                    +  styleUrls: ["./add-day-attendance.component.scss"],
                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                    +    MatButtonModule,
                                                                                                                                                                                                                                    +    FontAwesomeModule,
                                                                                                                                                                                                                                    +    MatTooltipModule,
                                                                                                                                                                                                                                    +    RollCallSetupComponent,
                                                                                                                                                                                                                                    +    RollCallComponent,
                                                                                                                                                                                                                                    +    ViewTitleComponent,
                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                    +export class AddDayAttendanceComponent {
                                                                                                                                                                                                                                    +  /** (optional) property name of the participant entities by which they are sorted for the roll call */
                                                                                                                                                                                                                                    +  @Input() sortParticipantsBy: string;
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  currentStage = 0;
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  day = new Date();
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  event: Note;
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  @ViewChild(RollCallComponent) rollCallComponent: RollCallComponent;
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  readonly buttons: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                    +    {
                                                                                                                                                                                                                                    +      text: $localize`Save`,
                                                                                                                                                                                                                                    +      click: (): boolean => {
                                                                                                                                                                                                                                    +        this.saveRollCallResult(this.event).then(() => {
                                                                                                                                                                                                                                    +          this.finishRollCallState();
                                                                                                                                                                                                                                    +        });
                                                                                                                                                                                                                                    +        return true;
                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                    +    },
                                                                                                                                                                                                                                    +    {
                                                                                                                                                                                                                                    +      text: $localize`:Discard changes made to a form:Discard`,
                                                                                                                                                                                                                                    +      click: (): boolean => {
                                                                                                                                                                                                                                    +        this.finishRollCallState();
                                                                                                                                                                                                                                    +        return false;
                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                    +    },
                                                                                                                                                                                                                                    +  ];
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  stages = [
                                                                                                                                                                                                                                    +    $localize`:One of the stages while recording child-attendances:Select Event`,
                                                                                                                                                                                                                                    +    $localize`:One of the stages while recording child-attendances:Record Attendance`,
                                                                                                                                                                                                                                    +  ];
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                    +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                    +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  finishBasicInformationStage(event: Note) {
                                                                                                                                                                                                                                    +    this.event = event;
                                                                                                                                                                                                                                    +    this.currentStage = 1;
                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  exit() {
                                                                                                                                                                                                                                    +    if (this.rollCallComponent?.isDirty) {
                                                                                                                                                                                                                                    +      this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                    +        $localize`:Exit from the current screen:Exit`,
                                                                                                                                                                                                                                    +        $localize`Do you want to save your progress before going back?`,
                                                                                                                                                                                                                                    +        this.buttons,
                                                                                                                                                                                                                                    +        true,
                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                    +      this.finishRollCallState();
                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  finishRollCallState() {
                                                                                                                                                                                                                                    +    this.currentStage = 0;
                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +  async saveRollCallResult(eventNote: Note) {
                                                                                                                                                                                                                                    +    await this.entityMapper.save(eventNote);
                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    <app-view-title
                                                                                                                                                                                                                                    +  [disableBackButton]="currentStage !== 0"
                                                                                                                                                                                                                                    +  i18n="
                                                                                                                                                                                                                                    +    Record Attendance|Title when recording the attendance at a particular stage
                                                                                                                                                                                                                                    +    (e.g. selecting the event, recording it)
                                                                                                                                                                                                                                    +  "
                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                    +  Record Attendance
                                                                                                                                                                                                                                    +</app-view-title>
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +<h2 *ngIf="currentStage === 0">
                                                                                                                                                                                                                                    +  {{ stages[currentStage] }}
                                                                                                                                                                                                                                    +</h2>
                                                                                                                                                                                                                                    +<div
                                                                                                                                                                                                                                    +  class="flex-row align-center relative-left margin-bottom-small"
                                                                                                                                                                                                                                    +  *ngIf="currentStage !== 0"
                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                    +  <button mat-icon-button (click)="exit()" matTooltip="Back" i18n-matTooltip>
                                                                                                                                                                                                                                    +    <fa-icon icon="arrow-left"></fa-icon>
                                                                                                                                                                                                                                    +  </button>
                                                                                                                                                                                                                                    +  <h2 class="remove-margin-bottom">{{ event.subject }}</h2>
                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                    +<app-roll-call-setup
                                                                                                                                                                                                                                    +  *ngIf="currentStage === 0"
                                                                                                                                                                                                                                    +  (eventSelected)="finishBasicInformationStage($event)"
                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                    +</app-roll-call-setup>
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +<app-roll-call
                                                                                                                                                                                                                                    +  *ngIf="currentStage === 1"
                                                                                                                                                                                                                                    +  [eventEntity]="event"
                                                                                                                                                                                                                                    +  [sortParticipantsBy]="sortParticipantsBy"
                                                                                                                                                                                                                                    +  (exit)="finishRollCallState()"
                                                                                                                                                                                                                                    +  (complete)="saveRollCallResult($event)"
                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                    +</app-roll-call>
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    + ./add-day-attendance.component.scss +

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    /* Moves the component 12 pixels to the left so that the "go back" button is aligned with the left border */
                                                                                                                                                                                                                                    +.relative-left {
                                                                                                                                                                                                                                    +  position: relative;
                                                                                                                                                                                                                                    +  left: -12px;
                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +:host {
                                                                                                                                                                                                                                    +  display: flex;
                                                                                                                                                                                                                                    +  flex-direction: column;
                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AddressEditComponent.html b/documentation/components/AddressEditComponent.html new file mode 100644 index 0000000000..2f5811ba55 --- /dev/null +++ b/documentation/components/AddressEditComponent.html @@ -0,0 +1,1039 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      + src/app/features/location/address-edit/address-edit.component.ts +

                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Edit a GeoLocation / Address, including options to search via API and customize the string location being saved.

                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Outputs
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      +constructor(confirmationDialog: ConfirmationDialogService) +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                      confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + disabled +
                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Whether the search box is enabled and visible.

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + selectedLocation +
                                                                                                                                                                                                                                      + Type : GeoLocation + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      The initially pre-selected location (displayed in addition to the search field allowing to change it).

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Outputs

                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + selectedLocationChange +
                                                                                                                                                                                                                                      + Type : EventEmitter + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Whenever the user selects an actual looked up location, it is emitted here.

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + + clearLocation + + +
                                                                                                                                                                                                                                      +clearLocation() +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + + Async + updateFromAddressSearch + + +
                                                                                                                                                                                                                                      + + updateFromAddressSearch(value: GeoLocation | undefined, skipConfirmation: boolean) +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      NameTypeOptionalDefault value
                                                                                                                                                                                                                                      value + GeoLocation | undefined + + No + +
                                                                                                                                                                                                                                      skipConfirmation + boolean + + No + + false +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + + updateLocation + + +
                                                                                                                                                                                                                                      +updateLocation(selected: GeoLocation | undefined) +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                      selected + GeoLocation | undefined + + No +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + + updateLocationString + + +
                                                                                                                                                                                                                                      +updateLocationString(value: string) +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                      value + string + + No +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      + + + manualAddressEnabled + + +
                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                      +import { MatButton, MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                      +import { AddressSearchComponent } from "../address-search/address-search.component";
                                                                                                                                                                                                                                      +import { GeoResult } from "../geo.service";
                                                                                                                                                                                                                                      +import { ConfirmationDialogService } from "../../../core/common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                      +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                      +import { MatFormField, MatHint, MatLabel } from "@angular/material/form-field";
                                                                                                                                                                                                                                      +import { MatInput } from "@angular/material/input";
                                                                                                                                                                                                                                      +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                      +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                      + * Edit a GeoLocation / Address, including options to search via API and customize the string location being saved.
                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                      +  selector: "app-address-edit",
                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                      +    MatButton,
                                                                                                                                                                                                                                      +    AddressSearchComponent,
                                                                                                                                                                                                                                      +    MatFormField,
                                                                                                                                                                                                                                      +    MatLabel,
                                                                                                                                                                                                                                      +    MatInput,
                                                                                                                                                                                                                                      +    MatHint,
                                                                                                                                                                                                                                      +    MatTooltip,
                                                                                                                                                                                                                                      +    MatIconButton,
                                                                                                                                                                                                                                      +    FaIconComponent,
                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                      +  templateUrl: "./address-edit.component.html",
                                                                                                                                                                                                                                      +  styleUrl: "./address-edit.component.scss",
                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                      +export class AddressEditComponent {
                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                      +   * Whenever the user selects an actual looked up location, it is emitted here.
                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                      +  @Output() selectedLocationChange = new EventEmitter<GeoLocation>();
                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                      +   * The initially pre-selected location (displayed in addition to the search field allowing to change it).
                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                      +  @Input() selectedLocation: GeoLocation;
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                      +   * Whether the search box is enabled and visible.
                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                      +  @Input() disabled: boolean;
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +  manualAddressEnabled: boolean;
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +  constructor(private confirmationDialog: ConfirmationDialogService) {}
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +  updateLocation(selected: GeoLocation | undefined) {
                                                                                                                                                                                                                                      +    this.selectedLocation = selected;
                                                                                                                                                                                                                                      +    this.selectedLocationChange.emit(selected);
                                                                                                                                                                                                                                      +    this.manualAddressEnabled =
                                                                                                                                                                                                                                      +      this.selectedLocation?.geoLookup?.display_name !==
                                                                                                                                                                                                                                      +      this.selectedLocation?.locationString;
                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +  clearLocation() {
                                                                                                                                                                                                                                      +    this.updateLocation(undefined);
                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +  updateLocationString(value: string) {
                                                                                                                                                                                                                                      +    const manualAddress: string = value ?? "";
                                                                                                                                                                                                                                      +    if (manualAddress === "" && this.selectedLocation?.geoLookup) {
                                                                                                                                                                                                                                      +      this.clearLocation();
                                                                                                                                                                                                                                      +      // possible alternative UX: ask user if they want to remove the mapped location also? or update the location with the display_location?
                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +    this.updateLocation({
                                                                                                                                                                                                                                      +      locationString: manualAddress,
                                                                                                                                                                                                                                      +      geoLookup: this.selectedLocation?.geoLookup,
                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +  async updateFromAddressSearch(
                                                                                                                                                                                                                                      +    value: GeoLocation | undefined,
                                                                                                                                                                                                                                      +    skipConfirmation: boolean = false,
                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                      +    if (
                                                                                                                                                                                                                                      +      value?.geoLookup === this.selectedLocation?.geoLookup &&
                                                                                                                                                                                                                                      +      value?.locationString === this.selectedLocation?.locationString
                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                      +      // nothing changed, skip
                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +    let manualAddress: string = this.selectedLocation?.locationString ?? "";
                                                                                                                                                                                                                                      +    let lookupAddress: string =
                                                                                                                                                                                                                                      +      value?.locationString ?? value?.geoLookup?.display_name ?? "";
                                                                                                                                                                                                                                      +    if (manualAddress === "") {
                                                                                                                                                                                                                                      +      // auto-apply lookup location for empty field
                                                                                                                                                                                                                                      +      manualAddress = lookupAddress;
                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +    if (manualAddress !== lookupAddress) {
                                                                                                                                                                                                                                      +      if (
                                                                                                                                                                                                                                      +        // if manualAddress has been automatically set before, we assume the user wants to auto update now also
                                                                                                                                                                                                                                      +        manualAddress === this.selectedLocation?.geoLookup?.display_name ||
                                                                                                                                                                                                                                      +        // otherwise ask user if they want to apply the lookup location
                                                                                                                                                                                                                                      +        (!skipConfirmation &&
                                                                                                                                                                                                                                      +          (await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                      +            $localize`Update custom address?`,
                                                                                                                                                                                                                                      +            $localize`Do you want to overwrite the custom address to the full address from the online lookup? This will replace "${manualAddress}" with "${lookupAddress}". The marked location on the map will be unaffected by this choice.`,
                                                                                                                                                                                                                                      +          )))
                                                                                                                                                                                                                                      +      ) {
                                                                                                                                                                                                                                      +        manualAddress = lookupAddress;
                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +    this.updateLocation({
                                                                                                                                                                                                                                      +      locationString: manualAddress,
                                                                                                                                                                                                                                      +      geoLookup: value?.geoLookup,
                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +function matchGeoResults(a: GeoResult, b: GeoResult) {
                                                                                                                                                                                                                                      +  return a.lat === b.lat && a.lon === b.lon;
                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      <div class="margin-bottom-regular container">
                                                                                                                                                                                                                                      +  <div class="flex-row gap-regular align-center full-width">
                                                                                                                                                                                                                                      +    <mat-form-field floatLabel="always" class="full-width">
                                                                                                                                                                                                                                      +      <mat-label i18n>Selected Location</mat-label>
                                                                                                                                                                                                                                      +      <input
                                                                                                                                                                                                                                      +        #manualAddressInput
                                                                                                                                                                                                                                      +        matInput
                                                                                                                                                                                                                                      +        [value]="
                                                                                                                                                                                                                                      +          selectedLocation?.locationString ??
                                                                                                                                                                                                                                      +          selectedLocation?.geoLookup?.display_name
                                                                                                                                                                                                                                      +        "
                                                                                                                                                                                                                                      +        (change)="updateLocationString(manualAddressInput.value)"
                                                                                                                                                                                                                                      +        placeholder="no location selected"
                                                                                                                                                                                                                                      +        i18n-placeholder
                                                                                                                                                                                                                                      +        [disabled]="disabled || !manualAddressEnabled"
                                                                                                                                                                                                                                      +      />
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +      @if (
                                                                                                                                                                                                                                      +        selectedLocation?.geoLookup?.display_name !==
                                                                                                                                                                                                                                      +        selectedLocation?.locationString
                                                                                                                                                                                                                                      +      ) {
                                                                                                                                                                                                                                      +        <mat-hint>
                                                                                                                                                                                                                                      +          @if (selectedLocation?.geoLookup) {
                                                                                                                                                                                                                                      +            <span
                                                                                                                                                                                                                                      +              matTooltip="You have manually edited the exact address above, this is the actual mapped location. To change the location marked on the map, use the adress search field or click on the map."
                                                                                                                                                                                                                                      +              i18n-matTooltip
                                                                                                                                                                                                                                      +            >
                                                                                                                                                                                                                                      +              {{ selectedLocation.geoLookup.display_name }}
                                                                                                                                                                                                                                      +            </span>
                                                                                                                                                                                                                                      +          } @else {
                                                                                                                                                                                                                                      +            <span
                                                                                                                                                                                                                                      +              matTooltip="You have manually entered the address above without locating it on the map. To change the location marked on the map, use the adress search field or click on the map."
                                                                                                                                                                                                                                      +              i18n-matTooltip
                                                                                                                                                                                                                                      +              i18n
                                                                                                                                                                                                                                      +            >
                                                                                                                                                                                                                                      +              No location marked on map
                                                                                                                                                                                                                                      +            </span>
                                                                                                                                                                                                                                      +          }
                                                                                                                                                                                                                                      +        </mat-hint>
                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                      +    </mat-form-field>
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +    @if (!disabled && selectedLocation) {
                                                                                                                                                                                                                                      +      @if (!manualAddressEnabled) {
                                                                                                                                                                                                                                      +        <button
                                                                                                                                                                                                                                      +          mat-icon-button
                                                                                                                                                                                                                                      +          (click)="manualAddressEnabled = true"
                                                                                                                                                                                                                                      +          matTooltip="Manually overwrite the address text (e.g. to add details that are not available from the automatic address lookup). The mapped location will be unaffected by this."
                                                                                                                                                                                                                                      +          i18n-matTooltip
                                                                                                                                                                                                                                      +        >
                                                                                                                                                                                                                                      +          <fa-icon icon="edit"></fa-icon>
                                                                                                                                                                                                                                      +        </button>
                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +      <button
                                                                                                                                                                                                                                      +        mat-icon-button
                                                                                                                                                                                                                                      +        (click)="clearLocation()"
                                                                                                                                                                                                                                      +        matTooltip="Delete the selected location."
                                                                                                                                                                                                                                      +        i18n-matTooltip
                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                      +        <fa-icon icon="trash"></fa-icon>
                                                                                                                                                                                                                                      +      </button>
                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                      +</div>
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +@if (!disabled) {
                                                                                                                                                                                                                                      +  <app-address-search
                                                                                                                                                                                                                                      +    (locationSelected)="updateFromAddressSearch($event)"
                                                                                                                                                                                                                                      +  ></app-address-search>
                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AddressSearchComponent.html b/documentation/components/AddressSearchComponent.html new file mode 100644 index 0000000000..11a5e74a66 --- /dev/null +++ b/documentation/components/AddressSearchComponent.html @@ -0,0 +1,1094 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        + src/app/features/location/address-search/address-search.component.ts +

                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        A search box integrated with OpenStreetMaps lookup of the entered address, +offering matching locations as an autocomplete-style dropdown.

                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        + OnInit +

                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Outputs
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Accessors
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        +constructor(location: GeoService) +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                        location + GeoService + + No +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + searchText +
                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        The search text, for which locations are looked up (as initial input to prefill the field).

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Outputs

                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + locationSelected +
                                                                                                                                                                                                                                        + Type : EventEmitter + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Whenever the user selects an actual looked up location, it is emitted here.

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + searchClick + + +
                                                                                                                                                                                                                                        +searchClick() +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + selectLocation + + +
                                                                                                                                                                                                                                        +selectLocation(selected: GeoResult | string | undefined) +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                        selected + GeoResult | string | undefined + + No +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + triggerInputUpdate + + +
                                                                                                                                                                                                                                        +triggerInputUpdate() +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + _searchText + + +
                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                        + Default value : "" +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + displayFn + + +
                                                                                                                                                                                                                                        + Default value : () => {...} +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        do not display selected item in the input field because this should be an empty search field

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + filteredOptions + + +
                                                                                                                                                                                                                                        + Default value : new Subject<GeoResult[]>() +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + loading + + +
                                                                                                                                                                                                                                        + Default value : false +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + + nothingFound + + +
                                                                                                                                                                                                                                        + Default value : false +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        + Accessors +

                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        + + searchText +
                                                                                                                                                                                                                                        + setsearchText(value: string) +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        The search text, for which locations are looked up (as initial input to prefill the field).

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                        value + string + + No +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                        +  ElementRef,
                                                                                                                                                                                                                                        +  EventEmitter,
                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                        +  Output,
                                                                                                                                                                                                                                        +  ViewChild,
                                                                                                                                                                                                                                        +  OnInit,
                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                        +  MatAutocomplete,
                                                                                                                                                                                                                                        +  MatAutocompleteTrigger,
                                                                                                                                                                                                                                        +  MatOption,
                                                                                                                                                                                                                                        +} from "@angular/material/autocomplete";
                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                        +  MatFormField,
                                                                                                                                                                                                                                        +  MatLabel,
                                                                                                                                                                                                                                        +  MatSuffix,
                                                                                                                                                                                                                                        +} from "@angular/material/form-field";
                                                                                                                                                                                                                                        +import { MatInput } from "@angular/material/input";
                                                                                                                                                                                                                                        +import { AsyncPipe } from "@angular/common";
                                                                                                                                                                                                                                        +import { merge, Subject } from "rxjs";
                                                                                                                                                                                                                                        +import { GeoResult, GeoService } from "../geo.service";
                                                                                                                                                                                                                                        +import { concatMap, debounceTime, filter, map, tap } from "rxjs/operators";
                                                                                                                                                                                                                                        +import { Logging } from "../../../core/logging/logging.service";
                                                                                                                                                                                                                                        +import { MatButton, MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                        +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                        +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                        + * A search box integrated with OpenStreetMaps lookup of the entered address,
                                                                                                                                                                                                                                        + * offering matching locations as an autocomplete-style dropdown.
                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                        +  selector: "app-address-search",
                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                        +    MatOption,
                                                                                                                                                                                                                                        +    MatAutocomplete,
                                                                                                                                                                                                                                        +    MatLabel,
                                                                                                                                                                                                                                        +    MatFormField,
                                                                                                                                                                                                                                        +    MatAutocompleteTrigger,
                                                                                                                                                                                                                                        +    MatInput,
                                                                                                                                                                                                                                        +    AsyncPipe,
                                                                                                                                                                                                                                        +    MatButton,
                                                                                                                                                                                                                                        +    MatIconButton,
                                                                                                                                                                                                                                        +    MatSuffix,
                                                                                                                                                                                                                                        +    FaIconComponent,
                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                        +  templateUrl: "./address-search.component.html",
                                                                                                                                                                                                                                        +  styleUrl: "./address-search.component.scss",
                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                        +export class AddressSearchComponent implements OnInit {
                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                        +   * The search text, for which locations are looked up (as initial input to prefill the field).
                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                        +  @Input() set searchText(value: string) {
                                                                                                                                                                                                                                        +    if (!(typeof value === "string")) {
                                                                                                                                                                                                                                        +      Logging.debug("Invalid address searchText input", value);
                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +    this._searchText = value;
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +  _searchText: string = "";
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                        +   * Whenever the user selects an actual looked up location, it is emitted here.
                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                        +  @Output() locationSelected = new EventEmitter<GeoLocation>();
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  filteredOptions = new Subject<GeoResult[]>();
                                                                                                                                                                                                                                        +  loading = false;
                                                                                                                                                                                                                                        +  nothingFound = false;
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  @ViewChild("inputElement") private inputElem: ElementRef<HTMLInputElement>;
                                                                                                                                                                                                                                        +  private inputStream = new Subject<string>();
                                                                                                                                                                                                                                        +  private searchClickStream = new Subject<string>();
                                                                                                                                                                                                                                        +  private lastSearch: string;
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  /** do not display selected item in the input field because this should be an empty search field */
                                                                                                                                                                                                                                        +  displayFn = () => "";
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  constructor(private location: GeoService) {}
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  ngOnInit() {
                                                                                                                                                                                                                                        +    this.initSearchPipeline();
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  private initSearchPipeline() {
                                                                                                                                                                                                                                        +    merge(this.inputStream.pipe(debounceTime(2500)), this.searchClickStream)
                                                                                                                                                                                                                                        +      .pipe(
                                                                                                                                                                                                                                        +        map((input) => input.trim()),
                                                                                                                                                                                                                                        +        filter((input) => this.isRelevantInput(input)),
                                                                                                                                                                                                                                        +        tap(() => {
                                                                                                                                                                                                                                        +          this.nothingFound = false;
                                                                                                                                                                                                                                        +          this.loading = true;
                                                                                                                                                                                                                                        +        }),
                                                                                                                                                                                                                                        +        debounceTime(200),
                                                                                                                                                                                                                                        +        concatMap((res) => this.getGeoLookupResult(res)),
                                                                                                                                                                                                                                        +      )
                                                                                                                                                                                                                                        +      .subscribe((res) => this.filteredOptions.next(res));
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  triggerInputUpdate() {
                                                                                                                                                                                                                                        +    this.inputStream.next(this.inputElem.nativeElement.value);
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +  searchClick() {
                                                                                                                                                                                                                                        +    this.searchClickStream.next(this.inputElem.nativeElement.value);
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  private isRelevantInput(input: string): boolean {
                                                                                                                                                                                                                                        +    return (
                                                                                                                                                                                                                                        +      !!input &&
                                                                                                                                                                                                                                        +      input.length > 3 &&
                                                                                                                                                                                                                                        +      input.localeCompare("[object Object]") !== 0 &&
                                                                                                                                                                                                                                        +      input.localeCompare(this.lastSearch) !== 0
                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  selectLocation(selected: GeoResult | string | undefined) {
                                                                                                                                                                                                                                        +    let result: GeoLocation;
                                                                                                                                                                                                                                        +    if (typeof selected === "object") {
                                                                                                                                                                                                                                        +      result = { geoLookup: selected };
                                                                                                                                                                                                                                        +    } else if (typeof selected === "string") {
                                                                                                                                                                                                                                        +      // special case to set address text from search without mapped location (when no result was found)
                                                                                                                                                                                                                                        +      result = { locationString: selected };
                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +    this.locationSelected.emit(result);
                                                                                                                                                                                                                                        +    this.filteredOptions.next([]);
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  private getGeoLookupResult(searchTerm: string) {
                                                                                                                                                                                                                                        +    return this.location.lookup(searchTerm).pipe(
                                                                                                                                                                                                                                        +      tap((res) => {
                                                                                                                                                                                                                                        +        this.lastSearch = searchTerm;
                                                                                                                                                                                                                                        +        this.loading = false;
                                                                                                                                                                                                                                        +        this.nothingFound = res.length === 0;
                                                                                                                                                                                                                                        +      }),
                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        <mat-form-field class="form-field">
                                                                                                                                                                                                                                        +  <mat-label i18n>Search an address</mat-label>
                                                                                                                                                                                                                                        +  <input
                                                                                                                                                                                                                                        +    #inputElement
                                                                                                                                                                                                                                        +    class="address-search-input"
                                                                                                                                                                                                                                        +    type="text"
                                                                                                                                                                                                                                        +    matInput
                                                                                                                                                                                                                                        +    [value]="_searchText"
                                                                                                                                                                                                                                        +    (keyup)="triggerInputUpdate()"
                                                                                                                                                                                                                                        +    [matAutocomplete]="auto"
                                                                                                                                                                                                                                        +  />
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  <button mat-icon-button matIconSuffix (click)="searchClick()">
                                                                                                                                                                                                                                        +    <fa-icon icon="search"></fa-icon>
                                                                                                                                                                                                                                        +  </button>
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +  <mat-autocomplete
                                                                                                                                                                                                                                        +    #auto="matAutocomplete"
                                                                                                                                                                                                                                        +    (optionSelected)="selectLocation($event.option.value)"
                                                                                                                                                                                                                                        +    [displayWith]="displayFn"
                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                        +    @if (loading) {
                                                                                                                                                                                                                                        +      <mat-option disabled i18n>Loading results...</mat-option>
                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                        +    @if (nothingFound) {
                                                                                                                                                                                                                                        +      <mat-option disabled i18n>Location not found</mat-option>
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +      @if (inputElement.value?.length > 2) {
                                                                                                                                                                                                                                        +        <mat-option [value]="inputElement.value" i18n
                                                                                                                                                                                                                                        +          >Set address without map location as "{{
                                                                                                                                                                                                                                        +            inputElement.value
                                                                                                                                                                                                                                        +          }}"</mat-option
                                                                                                                                                                                                                                        +        >
                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +    @for (option of filteredOptions | async; track option) {
                                                                                                                                                                                                                                        +      <mat-option [value]="option">
                                                                                                                                                                                                                                        +        {{ option.display_name }}
                                                                                                                                                                                                                                        +      </mat-option>
                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                        +  </mat-autocomplete>
                                                                                                                                                                                                                                        +</mat-form-field>
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEditDescriptionOnlyFieldComponent.html b/documentation/components/AdminEditDescriptionOnlyFieldComponent.html new file mode 100644 index 0000000000..3f47f9fa0d --- /dev/null +++ b/documentation/components/AdminEditDescriptionOnlyFieldComponent.html @@ -0,0 +1,701 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          + src/app/core/admin/admin-entity-details/admin-entity-field/admin-edit-description-only-field/admin-edit-description-only-field.component.ts +

                                                                                                                                                                                                                                          + + + + +

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          + OnChanges +

                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          +constructor(data: FormFieldConfig, dialogRef: MatDialogRef, fb: FormBuilder) +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                          data + FormFieldConfig + + No +
                                                                                                                                                                                                                                          dialogRef + MatDialogRef<any> + + No +
                                                                                                                                                                                                                                          fb + FormBuilder + + No +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          + + + Public + initSettings + + +
                                                                                                                                                                                                                                          + + initSettings() +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          + + + save + + +
                                                                                                                                                                                                                                          +save() +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          + + + formField + + +
                                                                                                                                                                                                                                          + Type : FormFieldConfig + +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          + + + schemaFieldsForm + + +
                                                                                                                                                                                                                                          + Type : FormGroup + +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          import { Component, Inject, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                          +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                          +  MatDialogModule,
                                                                                                                                                                                                                                          +  MatDialogRef,
                                                                                                                                                                                                                                          +} from "@angular/material/dialog";
                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                          +import { DialogCloseComponent } from "../../../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                          +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                          +import { ErrorHintComponent } from "../../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                          +  FormBuilder,
                                                                                                                                                                                                                                          +  FormGroup,
                                                                                                                                                                                                                                          +  FormsModule,
                                                                                                                                                                                                                                          +  ReactiveFormsModule,
                                                                                                                                                                                                                                          +  Validators,
                                                                                                                                                                                                                                          +} from "@angular/forms";
                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                          +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                          +import { v4 as uuid } from "uuid";
                                                                                                                                                                                                                                          +import { FormFieldConfig } from "../../../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                          +  selector: "app-admin-edit-description-only-field",
                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                          +    MatDialogModule,
                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                          +    DialogCloseComponent,
                                                                                                                                                                                                                                          +    MatInputModule,
                                                                                                                                                                                                                                          +    ErrorHintComponent,
                                                                                                                                                                                                                                          +    FormsModule,
                                                                                                                                                                                                                                          +    ReactiveFormsModule,
                                                                                                                                                                                                                                          +    FontAwesomeModule,
                                                                                                                                                                                                                                          +    MatTooltipModule,
                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                          +  templateUrl: "./admin-edit-description-only-field.component.html",
                                                                                                                                                                                                                                          +  styleUrl: "./admin-edit-description-only-field.component.scss",
                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                          +export class AdminEditDescriptionOnlyFieldComponent implements OnChanges {
                                                                                                                                                                                                                                          +  formField: FormFieldConfig;
                                                                                                                                                                                                                                          +  schemaFieldsForm: FormGroup;
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                          +    @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                          +    data: FormFieldConfig,
                                                                                                                                                                                                                                          +    private dialogRef: MatDialogRef<any>,
                                                                                                                                                                                                                                          +    private fb: FormBuilder,
                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                          +    this.formField = data;
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +    this.initSettings();
                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                          +    if (changes.entitySchemaField) {
                                                                                                                                                                                                                                          +      this.initSettings();
                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +  public initSettings() {
                                                                                                                                                                                                                                          +    this.schemaFieldsForm = this.fb.group({
                                                                                                                                                                                                                                          +      label: [this.formField.label, Validators.required],
                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +  save() {
                                                                                                                                                                                                                                          +    this.schemaFieldsForm.markAllAsTouched();
                                                                                                                                                                                                                                          +    if (this.schemaFieldsForm.invalid) {
                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                          +    if (!this.formField.id) {
                                                                                                                                                                                                                                          +      this.formField.id = uuid();
                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +    const newSchemaField = {
                                                                                                                                                                                                                                          +      id: this.formField.id,
                                                                                                                                                                                                                                          +      editComponent: "EditDescriptionOnly",
                                                                                                                                                                                                                                          +      label: this.schemaFieldsForm.get("label").value,
                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +    this.dialogRef.close(newSchemaField);
                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          <h2 mat-dialog-title i18n>Configure Text Block</h2>
                                                                                                                                                                                                                                          +<app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +<mat-dialog-content>
                                                                                                                                                                                                                                          +  <p i18n>
                                                                                                                                                                                                                                          +    This text is displayed as part of the form to provide additional information
                                                                                                                                                                                                                                          +    without any input options for the user:
                                                                                                                                                                                                                                          +  </p>
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +  <form [formGroup]="schemaFieldsForm">
                                                                                                                                                                                                                                          +    <div class="entity-form-cell">
                                                                                                                                                                                                                                          +      <mat-form-field>
                                                                                                                                                                                                                                          +        <textarea formControlName="label" matInput rows="3"></textarea>
                                                                                                                                                                                                                                          +      </mat-form-field>
                                                                                                                                                                                                                                          +    </div>
                                                                                                                                                                                                                                          +  </form>
                                                                                                                                                                                                                                          +</mat-dialog-content>
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +<mat-dialog-actions>
                                                                                                                                                                                                                                          +  <button mat-button (click)="save()" i18n="Button label">Save</button>
                                                                                                                                                                                                                                          +  <button mat-button mat-dialog-close i18n="Button label">Cancel</button>
                                                                                                                                                                                                                                          +</mat-dialog-actions>
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityComponent.html b/documentation/components/AdminEntityComponent.html new file mode 100644 index 0000000000..a9d728cbdb --- /dev/null +++ b/documentation/components/AdminEntityComponent.html @@ -0,0 +1,1070 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            + src/app/core/admin/admin-entity/admin-entity.component.ts +

                                                                                                                                                                                                                                            + + + + +

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            +constructor(entities: EntityRegistry, configService: ConfigService, location: Location, entityMapper: EntityMapperService, entityActionsService: EntityActionsService, routes: ActivatedRoute) +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                            entities + EntityRegistry + + No +
                                                                                                                                                                                                                                            configService + ConfigService + + No +
                                                                                                                                                                                                                                            location + Location + + No +
                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                            entityActionsService + EntityActionsService + + No +
                                                                                                                                                                                                                                            routes + ActivatedRoute + + No +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + entityType +
                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + cancel + + +
                                                                                                                                                                                                                                            +cancel() +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + Async + save + + +
                                                                                                                                                                                                                                            + + save() +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + configDetailsView + + +
                                                                                                                                                                                                                                            + Type : EntityDetailsConfig + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + configEntitySettings + + +
                                                                                                                                                                                                                                            + Type : EntityConfig + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + configListView + + +
                                                                                                                                                                                                                                            + Type : EntityListConfig + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + entityConstructor + + +
                                                                                                                                                                                                                                            + Type : EntityConstructor + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + Protected + mode + + +
                                                                                                                                                                                                                                            + Type : "details" | "list" | "general" + +
                                                                                                                                                                                                                                            + Default value : "details" +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            + + + + templateRef + + +
                                                                                                                                                                                                                                            + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                                                            + + @ContentChild(TemplateRef)
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            import {
                                                                                                                                                                                                                                            +  Component,
                                                                                                                                                                                                                                            +  ContentChild,
                                                                                                                                                                                                                                            +  Input,
                                                                                                                                                                                                                                            +  OnInit,
                                                                                                                                                                                                                                            +  TemplateRef,
                                                                                                                                                                                                                                            +} from "@angular/core";
                                                                                                                                                                                                                                            +import { CommonModule, Location } from "@angular/common";
                                                                                                                                                                                                                                            +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                            +import { ConfigService } from "../../config/config.service";
                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                            +import { EntityActionsService } from "../../entity/entity-actions/entity-actions.service";
                                                                                                                                                                                                                                            +import { ViewConfig } from "../../config/dynamic-routing/view-config.interface";
                                                                                                                                                                                                                                            +import { EntityDetailsConfig } from "../../entity-details/EntityDetailsConfig";
                                                                                                                                                                                                                                            +import { EntityConfigService } from "../../entity/entity-config.service";
                                                                                                                                                                                                                                            +import { Config } from "../../config/config";
                                                                                                                                                                                                                                            +import { EntityConfig } from "../../entity/entity-config";
                                                                                                                                                                                                                                            +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                            +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                            +import { EntityListConfig } from "../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                            +import { EntityTypeLabelPipe } from "../../common-components/entity-type-label/entity-type-label.pipe";
                                                                                                                                                                                                                                            +import { MatButton, MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                            +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                                            +import { AdminEntityListComponent } from "../admin-entity-list/admin-entity-list.component";
                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                            +  MatSidenav,
                                                                                                                                                                                                                                            +  MatSidenavContainer,
                                                                                                                                                                                                                                            +  MatSidenavContent,
                                                                                                                                                                                                                                            +} from "@angular/material/sidenav";
                                                                                                                                                                                                                                            +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                            +import { ActivatedRoute, RouterLink } from "@angular/router";
                                                                                                                                                                                                                                            +import { MatListItem, MatNavList } from "@angular/material/list";
                                                                                                                                                                                                                                            +import { AdminEntityDetailsComponent } from "../admin-entity-details/admin-entity-details/admin-entity-details.component";
                                                                                                                                                                                                                                            +import { AdminEntityGeneralSettingsComponent } from "./admin-entity-general-settings/admin-entity-general-settings.component";
                                                                                                                                                                                                                                            +import { BetaFeatureComponent } from "../../../features/coming-soon/beta-feature/beta-feature.component";
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                            +  selector: "app-admin-entity",
                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                            +    CommonModule,
                                                                                                                                                                                                                                            +    EntityTypeLabelPipe,
                                                                                                                                                                                                                                            +    MatButton,
                                                                                                                                                                                                                                            +    ViewTitleComponent,
                                                                                                                                                                                                                                            +    AdminEntityListComponent,
                                                                                                                                                                                                                                            +    MatSidenav,
                                                                                                                                                                                                                                            +    MatSidenavContainer,
                                                                                                                                                                                                                                            +    MatSidenavContent,
                                                                                                                                                                                                                                            +    FaIconComponent,
                                                                                                                                                                                                                                            +    MatIconButton,
                                                                                                                                                                                                                                            +    RouterLink,
                                                                                                                                                                                                                                            +    MatNavList,
                                                                                                                                                                                                                                            +    MatListItem,
                                                                                                                                                                                                                                            +    AdminEntityDetailsComponent,
                                                                                                                                                                                                                                            +    AdminEntityGeneralSettingsComponent,
                                                                                                                                                                                                                                            +    BetaFeatureComponent,
                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                            +  templateUrl: "./admin-entity.component.html",
                                                                                                                                                                                                                                            +  styleUrl: "./admin-entity.component.scss",
                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                            +export class AdminEntityComponent implements OnInit {
                                                                                                                                                                                                                                            +  @Input() entityType: string;
                                                                                                                                                                                                                                            +  entityConstructor: EntityConstructor;
                                                                                                                                                                                                                                            +  private originalEntitySchemaFields: [string, EntitySchemaField][];
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  configDetailsView: EntityDetailsConfig;
                                                                                                                                                                                                                                            +  configListView: EntityListConfig;
                                                                                                                                                                                                                                            +  configEntitySettings: EntityConfig;
                                                                                                                                                                                                                                            +  protected mode: "details" | "list" | "general" = "details";
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  @ContentChild(TemplateRef) templateRef: TemplateRef<any>;
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                            +    private entities: EntityRegistry,
                                                                                                                                                                                                                                            +    private configService: ConfigService,
                                                                                                                                                                                                                                            +    private location: Location,
                                                                                                                                                                                                                                            +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                            +    private entityActionsService: EntityActionsService,
                                                                                                                                                                                                                                            +    private routes: ActivatedRoute,
                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  ngOnInit(): void {
                                                                                                                                                                                                                                            +    this.init();
                                                                                                                                                                                                                                            +    this.routes.queryParams.subscribe((params) => {
                                                                                                                                                                                                                                            +      this.mode = params.mode ?? this.mode;
                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  private init() {
                                                                                                                                                                                                                                            +    this.entityConstructor = this.entities.get(this.entityType);
                                                                                                                                                                                                                                            +    this.originalEntitySchemaFields = JSON.parse(
                                                                                                                                                                                                                                            +      JSON.stringify(Array.from(this.entityConstructor.schema.entries())),
                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    this.configDetailsView = this.loadViewConfig(
                                                                                                                                                                                                                                            +      EntityConfigService.getDetailsViewId(this.entityConstructor),
                                                                                                                                                                                                                                            +    ) ?? { entityType: this.entityType, panels: [] };
                                                                                                                                                                                                                                            +    this.configListView = this.loadViewConfig(
                                                                                                                                                                                                                                            +      EntityConfigService.getListViewId(this.entityConstructor),
                                                                                                                                                                                                                                            +    ) ?? { entityType: this.entityType };
                                                                                                                                                                                                                                            +    this.configEntitySettings = this.entityConstructor;
                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  private loadViewConfig<
                                                                                                                                                                                                                                            +    C = EntityDetailsConfig | EntityListConfig | undefined,
                                                                                                                                                                                                                                            +  >(viewId: string): C | undefined {
                                                                                                                                                                                                                                            +    const viewConfig: ViewConfig<C> = this.configService.getConfig(viewId);
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    // work on a deep copy as we are editing in place (for titles, sections, etc.)
                                                                                                                                                                                                                                            +    return viewConfig?.config
                                                                                                                                                                                                                                            +      ? JSON.parse(JSON.stringify(viewConfig.config))
                                                                                                                                                                                                                                            +      : undefined;
                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  cancel() {
                                                                                                                                                                                                                                            +    this.entityConstructor.schema = new Map(this.originalEntitySchemaFields);
                                                                                                                                                                                                                                            +    this.location.back();
                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  async save() {
                                                                                                                                                                                                                                            +    const originalConfig = await this.entityMapper.load(
                                                                                                                                                                                                                                            +      Config,
                                                                                                                                                                                                                                            +      Config.CONFIG_KEY,
                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                            +    const newConfig = originalConfig.copy();
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    this.setViewConfig(
                                                                                                                                                                                                                                            +      newConfig,
                                                                                                                                                                                                                                            +      EntityConfigService.getDetailsViewId(this.entityConstructor),
                                                                                                                                                                                                                                            +      this.configDetailsView,
                                                                                                                                                                                                                                            +      "EntityDetails",
                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                            +    this.setViewConfig(
                                                                                                                                                                                                                                            +      newConfig,
                                                                                                                                                                                                                                            +      EntityConfigService.getListViewId(this.entityConstructor),
                                                                                                                                                                                                                                            +      this.configListView,
                                                                                                                                                                                                                                            +      "EntityList",
                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                            +    this.setEntityConfig(newConfig);
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    await this.entityMapper.save(newConfig);
                                                                                                                                                                                                                                            +    this.entityActionsService.showSnackbarConfirmationWithUndo(
                                                                                                                                                                                                                                            +      $localize`:Save config confirmation message:Configuration updated`,
                                                                                                                                                                                                                                            +      [originalConfig],
                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    this.location.back();
                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  private setEntityConfig(newConfig: Config) {
                                                                                                                                                                                                                                            +    const entityConfigKey =
                                                                                                                                                                                                                                            +      EntityConfigService.PREFIX_ENTITY_CONFIG + this.entityType;
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    // init config if not present
                                                                                                                                                                                                                                            +    newConfig.data[entityConfigKey] =
                                                                                                                                                                                                                                            +      newConfig.data[entityConfigKey] ?? ({ attributes: {} } as EntityConfig);
                                                                                                                                                                                                                                            +    newConfig.data[entityConfigKey].attributes =
                                                                                                                                                                                                                                            +      newConfig.data[entityConfigKey].attributes ?? {};
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    const entitySchemaConfig: EntityConfig = newConfig.data[entityConfigKey];
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    for (const [fieldId, field] of this.entityConstructor.schema.entries()) {
                                                                                                                                                                                                                                            +      entitySchemaConfig.attributes[fieldId] = field;
                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                            +    if (this.configEntitySettings) {
                                                                                                                                                                                                                                            +      entitySchemaConfig.label = this.configEntitySettings.label;
                                                                                                                                                                                                                                            +      entitySchemaConfig.labelPlural = this.configEntitySettings.labelPlural;
                                                                                                                                                                                                                                            +      entitySchemaConfig.icon = this.configEntitySettings.icon;
                                                                                                                                                                                                                                            +      entitySchemaConfig.toStringAttributes =
                                                                                                                                                                                                                                            +        this.configEntitySettings.toStringAttributes;
                                                                                                                                                                                                                                            +      entitySchemaConfig.hasPII = this.configEntitySettings.hasPII;
                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  private setViewConfig(
                                                                                                                                                                                                                                            +    targetConfig,
                                                                                                                                                                                                                                            +    detailsViewId: string,
                                                                                                                                                                                                                                            +    viewConfig: EntityDetailsConfig | EntityListConfig,
                                                                                                                                                                                                                                            +    componentForNewConfig: string,
                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                            +    if (targetConfig.data[detailsViewId]) {
                                                                                                                                                                                                                                            +      targetConfig.data[detailsViewId].config = viewConfig;
                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                            +      // create new config
                                                                                                                                                                                                                                            +      viewConfig.entityType = this.entityType;
                                                                                                                                                                                                                                            +      targetConfig.data[detailsViewId] = {
                                                                                                                                                                                                                                            +        component: componentForNewConfig,
                                                                                                                                                                                                                                            +        config: viewConfig,
                                                                                                                                                                                                                                            +      } as ViewConfig<EntityDetailsConfig | EntityListConfig>;
                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            <div class="host-container flex-column">
                                                                                                                                                                                                                                            +  <div class="header flex-row flex-wrap justify-space-between">
                                                                                                                                                                                                                                            +    <app-view-title
                                                                                                                                                                                                                                            +      class="admin-ui-title"
                                                                                                                                                                                                                                            +      i18n="page title"
                                                                                                                                                                                                                                            +      [displayInPlace]="true"
                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                            +      Editing data structure for "{{ entityType | entityTypeLabel }}" records
                                                                                                                                                                                                                                            +    </app-view-title>
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    <div class="flex-row gap-small save-buttons">
                                                                                                                                                                                                                                            +      <button mat-raised-button color="accent" (click)="save()" i18n>
                                                                                                                                                                                                                                            +        Save
                                                                                                                                                                                                                                            +      </button>
                                                                                                                                                                                                                                            +      <button mat-stroked-button (click)="cancel()" i18n>Cancel</button>
                                                                                                                                                                                                                                            +    </div>
                                                                                                                                                                                                                                            +  </div>
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +  <div class="main-container flex-row">
                                                                                                                                                                                                                                            +    <mat-nav-list class="config-nav">
                                                                                                                                                                                                                                            +      <mat-list-item
                                                                                                                                                                                                                                            +        (click)="mode = 'details'"
                                                                                                                                                                                                                                            +        [activated]="mode === 'details'"
                                                                                                                                                                                                                                            +        i18n="admin entity: nav item"
                                                                                                                                                                                                                                            +      >
                                                                                                                                                                                                                                            +        Details View & Fields
                                                                                                                                                                                                                                            +      </mat-list-item>
                                                                                                                                                                                                                                            +      <mat-list-item
                                                                                                                                                                                                                                            +        (click)="mode = 'list'"
                                                                                                                                                                                                                                            +        [activated]="mode === 'list'"
                                                                                                                                                                                                                                            +        i18n="admin entity: nav item"
                                                                                                                                                                                                                                            +      >
                                                                                                                                                                                                                                            +        List View
                                                                                                                                                                                                                                            +      </mat-list-item>
                                                                                                                                                                                                                                            +      <mat-list-item
                                                                                                                                                                                                                                            +        (click)="mode = 'general'"
                                                                                                                                                                                                                                            +        [activated]="mode === 'general'"
                                                                                                                                                                                                                                            +        i18n="admin entity: nav item"
                                                                                                                                                                                                                                            +      >
                                                                                                                                                                                                                                            +        General Settings
                                                                                                                                                                                                                                            +      </mat-list-item>
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +      <app-beta-feature></app-beta-feature>
                                                                                                                                                                                                                                            +    </mat-nav-list>
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +    <div class="config-component flex-grow mat-elevation-z1">
                                                                                                                                                                                                                                            +      @switch (mode) {
                                                                                                                                                                                                                                            +        @case ("details") {
                                                                                                                                                                                                                                            +          <app-admin-entity-details
                                                                                                                                                                                                                                            +            [entityConstructor]="entityConstructor"
                                                                                                                                                                                                                                            +            [config]="configDetailsView"
                                                                                                                                                                                                                                            +          ></app-admin-entity-details>
                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                            +        @case ("list") {
                                                                                                                                                                                                                                            +          <app-admin-entity-list
                                                                                                                                                                                                                                            +            [entityConstructor]="entityConstructor"
                                                                                                                                                                                                                                            +            [config]="configListView"
                                                                                                                                                                                                                                            +          ></app-admin-entity-list>
                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                            +        @case ("general") {
                                                                                                                                                                                                                                            +          <app-admin-entity-general-settings
                                                                                                                                                                                                                                            +            [entityConstructor]="entityConstructor"
                                                                                                                                                                                                                                            +            [(generalSettings)]="configEntitySettings"
                                                                                                                                                                                                                                            +          ></app-admin-entity-general-settings>
                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                            +    </div>
                                                                                                                                                                                                                                            +  </div>
                                                                                                                                                                                                                                            +</div>
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityDetailsComponent.html b/documentation/components/AdminEntityDetailsComponent.html new file mode 100644 index 0000000000..5f012f1578 --- /dev/null +++ b/documentation/components/AdminEntityDetailsComponent.html @@ -0,0 +1,702 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              + src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.ts +

                                                                                                                                                                                                                                              + + + + + + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                              + + config +
                                                                                                                                                                                                                                              + Type : EntityDetailsConfig + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                              + + entityConstructor +
                                                                                                                                                                                                                                              + Type : EntityConstructor + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              + + + addComponent + + +
                                                                                                                                                                                                                                              +addComponent(panel: Panel) +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                              panel + Panel + + No +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              + + + newPanelFactory + + +
                                                                                                                                                                                                                                              +newPanelFactory() +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + Returns : Panel + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                              +  EntityDetailsConfig,
                                                                                                                                                                                                                                              +  Panel,
                                                                                                                                                                                                                                              +} from "../../../entity-details/EntityDetailsConfig";
                                                                                                                                                                                                                                              +import { EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                              +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                              +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                              +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                              +import { EntityTypeLabelPipe } from "../../../common-components/entity-type-label/entity-type-label.pipe";
                                                                                                                                                                                                                                              +import { ViewTitleComponent } from "../../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                                              +import { AdminSectionHeaderComponent } from "../../building-blocks/admin-section-header/admin-section-header.component";
                                                                                                                                                                                                                                              +import { AdminEntityFormComponent } from "../admin-entity-form/admin-entity-form.component";
                                                                                                                                                                                                                                              +import { AdminEntityPanelComponentComponent } from "../admin-entity-panel-component/admin-entity-panel-component.component";
                                                                                                                                                                                                                                              +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                              +import { AdminTabsComponent } from "../../building-blocks/admin-tabs/admin-tabs.component";
                                                                                                                                                                                                                                              +import { AdminTabTemplateDirective } from "../../building-blocks/admin-tabs/admin-tab-template.directive";
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +@DynamicComponent("AdminEntityDetails")
                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                              +  selector: "app-admin-entity-details",
                                                                                                                                                                                                                                              +  templateUrl: "./admin-entity-details.component.html",
                                                                                                                                                                                                                                              +  styleUrls: [
                                                                                                                                                                                                                                              +    "./admin-entity-details.component.scss",
                                                                                                                                                                                                                                              +    "../../admin-entity/admin-entity-styles.scss",
                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                              +    MatTabsModule,
                                                                                                                                                                                                                                              +    FaIconComponent,
                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                              +    EntityTypeLabelPipe,
                                                                                                                                                                                                                                              +    ViewTitleComponent,
                                                                                                                                                                                                                                              +    AdminSectionHeaderComponent,
                                                                                                                                                                                                                                              +    AdminEntityFormComponent,
                                                                                                                                                                                                                                              +    AdminEntityPanelComponentComponent,
                                                                                                                                                                                                                                              +    MatTooltipModule,
                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                              +    AdminTabsComponent,
                                                                                                                                                                                                                                              +    AdminTabTemplateDirective,
                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                              +export class AdminEntityDetailsComponent {
                                                                                                                                                                                                                                              +  @Input() entityConstructor: EntityConstructor;
                                                                                                                                                                                                                                              +  @Input() config: EntityDetailsConfig;
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +  newPanelFactory(): Panel {
                                                                                                                                                                                                                                              +    return { title: "New Tab", components: [] };
                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +  addComponent(panel: Panel) {
                                                                                                                                                                                                                                              +    panel.components.push({
                                                                                                                                                                                                                                              +      title: $localize`:Default title:New Section`,
                                                                                                                                                                                                                                              +      component: "Form", // TODO: make this configurable
                                                                                                                                                                                                                                              +      config: { fieldGroups: [] },
                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              <div class="hint-banner" i18n>
                                                                                                                                                                                                                                              +  You can edit how users will see the details of a single record of this type.
                                                                                                                                                                                                                                              +  Drag and drop fields and sections in this preview of a profile view and group
                                                                                                                                                                                                                                              +  them as appropriate. The editor below closely resembles how the form will look
                                                                                                                                                                                                                                              +  for users later.
                                                                                                                                                                                                                                              +  <br />
                                                                                                                                                                                                                                              +  We recommend to keep things simple: Only add fields that you really need for
                                                                                                                                                                                                                                              +  your work.
                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +<app-view-title [disableBackButton]="true" [displayInPlace]="true">
                                                                                                                                                                                                                                              +  &lt;Name of displayed {{ this.entityConstructor?.label }}&gt;
                                                                                                                                                                                                                                              +</app-view-title>
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +<app-admin-tabs [tabs]="config?.panels" [newTabFactory]="newPanelFactory">
                                                                                                                                                                                                                                              +  <ng-template [appAdminTabTemplate]="config?.panels" let-item>
                                                                                                                                                                                                                                              +    <div class="flex-column gap-large padding-top-large">
                                                                                                                                                                                                                                              +      <div
                                                                                                                                                                                                                                              +        *ngFor="let componentConfig of item.components; let j = index"
                                                                                                                                                                                                                                              +        class="section-wrapper"
                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                              +        <app-admin-section-header
                                                                                                                                                                                                                                              +          [(title)]="componentConfig.title"
                                                                                                                                                                                                                                              +          (remove)="item.components.splice(j, 1)"
                                                                                                                                                                                                                                              +        ></app-admin-section-header>
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +        <app-admin-entity-form
                                                                                                                                                                                                                                              +          *ngIf="componentConfig.component === 'Form'; else otherComponent"
                                                                                                                                                                                                                                              +          [config]="componentConfig.config"
                                                                                                                                                                                                                                              +          [entityType]="entityConstructor"
                                                                                                                                                                                                                                              +        >
                                                                                                                                                                                                                                              +        </app-admin-entity-form>
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +        <ng-template #otherComponent>
                                                                                                                                                                                                                                              +          <app-admin-entity-panel-component
                                                                                                                                                                                                                                              +            [config]="componentConfig"
                                                                                                                                                                                                                                              +            [entityType]="entityConstructor"
                                                                                                                                                                                                                                              +          ></app-admin-entity-panel-component>
                                                                                                                                                                                                                                              +        </ng-template>
                                                                                                                                                                                                                                              +      </div>
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                              +        mat-stroked-button
                                                                                                                                                                                                                                              +        color="accent"
                                                                                                                                                                                                                                              +        class="section-add-button"
                                                                                                                                                                                                                                              +        (click)="addComponent(item)"
                                                                                                                                                                                                                                              +        i18n
                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                              +        <fa-icon
                                                                                                                                                                                                                                              +          aria-label="add element"
                                                                                                                                                                                                                                              +          icon="plus-circle"
                                                                                                                                                                                                                                              +          class="standard-icon-with-text"
                                                                                                                                                                                                                                              +        ></fa-icon>
                                                                                                                                                                                                                                              +        Add Section
                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                              +  </ng-template>
                                                                                                                                                                                                                                              +</app-admin-tabs>
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              + ./admin-entity-details.component.scss +

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              @use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                              +@use "variables/sizes";
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +.admin-ui-title {
                                                                                                                                                                                                                                              +  font-style: italic;
                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +.save-buttons {
                                                                                                                                                                                                                                              +  margin: auto 0;
                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +.section-wrapper {
                                                                                                                                                                                                                                              +  @include mat-elevation.elevation(1);
                                                                                                                                                                                                                                              +  margin: sizes.$small;
                                                                                                                                                                                                                                              +  padding: sizes.$small;
                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                              +/* TODO: making direct child of app-admin-section-header somehow breaks this
                                                                                                                                                                                                                                              +   although `:has(> app-admin-section-header .group-remove-button` (without :hover) does work ... */
                                                                                                                                                                                                                                              +.section-wrapper:has(> app-admin-section-header .group-remove-button:hover) {
                                                                                                                                                                                                                                              +  border-color: rgb(255, 0, 0);
                                                                                                                                                                                                                                              +  background-color: rgba(255, 0, 0, 0.1);
                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +.section-add-button {
                                                                                                                                                                                                                                              +  padding: sizes.$large;
                                                                                                                                                                                                                                              +  margin: sizes.$small;
                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              + ../../admin-entity/admin-entity-styles.scss +

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              @use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +.hint-banner {
                                                                                                                                                                                                                                              +  background: #e8e8e8;
                                                                                                                                                                                                                                              +  padding: 1em;
                                                                                                                                                                                                                                              +  margin-bottom: 1em;
                                                                                                                                                                                                                                              +  @include mat-elevation.elevation(1);
                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityFieldComponent.html b/documentation/components/AdminEntityFieldComponent.html new file mode 100644 index 0000000000..4fec4c7b00 --- /dev/null +++ b/documentation/components/AdminEntityFieldComponent.html @@ -0,0 +1,1672 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                + src/app/core/admin/admin-entity-details/admin-entity-field/admin-entity-field.component.ts +

                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Allows configuration of the schema of a single Entity field, like its dataType and labels.

                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                + OnChanges +

                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                +constructor(data: literal type, dialogRef: MatDialogRef, fb: FormBuilder, allDataTypes: DefaultDatatype[], configurableEnumService: ConfigurableEnumService, entityRegistry: EntityRegistry, adminEntityService: AdminEntityService, dialog: MatDialog) +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                data + literal type + + No +
                                                                                                                                                                                                                                                dialogRef + MatDialogRef<any> + + No +
                                                                                                                                                                                                                                                fb + FormBuilder + + No +
                                                                                                                                                                                                                                                allDataTypes + DefaultDatatype[] + + No +
                                                                                                                                                                                                                                                configurableEnumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                adminEntityService + AdminEntityService + + No +
                                                                                                                                                                                                                                                dialog + MatDialog + + No +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + entityType +
                                                                                                                                                                                                                                                + Type : EntityConstructor + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + fieldId +
                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + entityFieldValidatorChanges + + +
                                                                                                                                                                                                                                                +entityFieldValidatorChanges(validatorData: FormValidatorConfig) +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                validatorData + FormValidatorConfig + + No +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + openEnumOptions + + +
                                                                                                                                                                                                                                                +openEnumOptions(event: Event) +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                event + Event + + No +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + save + + +
                                                                                                                                                                                                                                                +save() +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + additionalForm + + +
                                                                                                                                                                                                                                                + Type : FormControl + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + createNewAdditionalOption + + +
                                                                                                                                                                                                                                                + Type : function + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + createNewAdditionalOptionAsync + + +
                                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + dataTypes + + +
                                                                                                                                                                                                                                                + Type : SimpleDropdownValue[] + +
                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + entitySchemaField + + +
                                                                                                                                                                                                                                                + Type : EntitySchemaField + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + fieldIdForm + + +
                                                                                                                                                                                                                                                + Type : FormControl + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + form + + +
                                                                                                                                                                                                                                                + Type : FormGroup + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + objectToLabel + + +
                                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + objectToValue + + +
                                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + schemaFieldsForm + + +
                                                                                                                                                                                                                                                + Type : FormGroup + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                form group of all fields in EntitySchemaField (i.e. without fieldId)

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                + + + typeAdditionalOptions + + +
                                                                                                                                                                                                                                                + Type : SimpleDropdownValue[] + +
                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                +  Component,
                                                                                                                                                                                                                                                +  Inject,
                                                                                                                                                                                                                                                +  Input,
                                                                                                                                                                                                                                                +  OnChanges,
                                                                                                                                                                                                                                                +  SimpleChanges,
                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                +  MatDialog,
                                                                                                                                                                                                                                                +  MatDialogModule,
                                                                                                                                                                                                                                                +  MatDialogRef,
                                                                                                                                                                                                                                                +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                +import { DialogCloseComponent } from "../../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                +  FormBuilder,
                                                                                                                                                                                                                                                +  FormControl,
                                                                                                                                                                                                                                                +  FormGroup,
                                                                                                                                                                                                                                                +  FormsModule,
                                                                                                                                                                                                                                                +  ReactiveFormsModule,
                                                                                                                                                                                                                                                +  Validators,
                                                                                                                                                                                                                                                +} from "@angular/forms";
                                                                                                                                                                                                                                                +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                +import { EntitySchemaField } from "../../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                +import { BasicAutocompleteComponent } from "../../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                +import { DefaultDatatype } from "../../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                +import { ConfigurableEnumDatatype } from "../../../basic-datatypes/configurable-enum/configurable-enum-datatype/configurable-enum.datatype";
                                                                                                                                                                                                                                                +import { EntityDatatype } from "../../../basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                +import { ConfigurableEnumService } from "../../../basic-datatypes/configurable-enum/configurable-enum.service";
                                                                                                                                                                                                                                                +import { EntityRegistry } from "../../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                +import { AdminEntityService } from "../../admin-entity.service";
                                                                                                                                                                                                                                                +import { ConfigureEnumPopupComponent } from "../../../basic-datatypes/configurable-enum/configure-enum-popup/configure-enum-popup.component";
                                                                                                                                                                                                                                                +import { ConfigurableEnum } from "../../../basic-datatypes/configurable-enum/configurable-enum";
                                                                                                                                                                                                                                                +import { generateIdFromLabel } from "../../../../utils/generate-id-from-label/generate-id-from-label";
                                                                                                                                                                                                                                                +import { merge } from "rxjs";
                                                                                                                                                                                                                                                +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                +import { uniqueIdValidator } from "app/core/common-components/entity-form/unique-id-validator/unique-id-validator";
                                                                                                                                                                                                                                                +import { ConfigureEntityFieldValidatorComponent } from "./configure-entity-field-validator/configure-entity-field-validator.component";
                                                                                                                                                                                                                                                +import { FormValidatorConfig } from "app/core/common-components/entity-form/dynamic-form-validators/form-validator-config";
                                                                                                                                                                                                                                                +import { AnonymizeOptionsComponent } from "./anonymize-options/anonymize-options.component";
                                                                                                                                                                                                                                                +import { MatCheckbox } from "@angular/material/checkbox";
                                                                                                                                                                                                                                                +import { DefaultValueOptionsComponent } from "./default-value-options/default-value-options.component";
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                + * Allows configuration of the schema of a single Entity field, like its dataType and labels.
                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                +  selector: "app-admin-entity-field",
                                                                                                                                                                                                                                                +  templateUrl: "./admin-entity-field.component.html",
                                                                                                                                                                                                                                                +  styleUrls: [
                                                                                                                                                                                                                                                +    "./admin-entity-field.component.scss",
                                                                                                                                                                                                                                                +    "../../../common-components/entity-form/entity-form/entity-form.component.scss",
                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                +    MatDialogModule,
                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                +    DialogCloseComponent,
                                                                                                                                                                                                                                                +    MatInputModule,
                                                                                                                                                                                                                                                +    ErrorHintComponent,
                                                                                                                                                                                                                                                +    FormsModule,
                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                +    MatTabsModule,
                                                                                                                                                                                                                                                +    MatSlideToggleModule,
                                                                                                                                                                                                                                                +    ReactiveFormsModule,
                                                                                                                                                                                                                                                +    FontAwesomeModule,
                                                                                                                                                                                                                                                +    MatTooltipModule,
                                                                                                                                                                                                                                                +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                +    ConfigureEntityFieldValidatorComponent,
                                                                                                                                                                                                                                                +    AnonymizeOptionsComponent,
                                                                                                                                                                                                                                                +    MatCheckbox,
                                                                                                                                                                                                                                                +    DefaultValueOptionsComponent,
                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                +export class AdminEntityFieldComponent implements OnChanges {
                                                                                                                                                                                                                                                +  @Input() fieldId: string;
                                                                                                                                                                                                                                                +  @Input() entityType: EntityConstructor;
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  entitySchemaField: EntitySchemaField;
                                                                                                                                                                                                                                                +  form: FormGroup;
                                                                                                                                                                                                                                                +  fieldIdForm: FormControl;
                                                                                                                                                                                                                                                +  /** form group of all fields in EntitySchemaField (i.e. without fieldId) */
                                                                                                                                                                                                                                                +  schemaFieldsForm: FormGroup;
                                                                                                                                                                                                                                                +  additionalForm: FormControl;
                                                                                                                                                                                                                                                +  typeAdditionalOptions: SimpleDropdownValue[] = [];
                                                                                                                                                                                                                                                +  dataTypes: SimpleDropdownValue[] = [];
                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                +    @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                +    data: {
                                                                                                                                                                                                                                                +      fieldId: string;
                                                                                                                                                                                                                                                +      entityType: EntityConstructor;
                                                                                                                                                                                                                                                +    },
                                                                                                                                                                                                                                                +    private dialogRef: MatDialogRef<any>,
                                                                                                                                                                                                                                                +    private fb: FormBuilder,
                                                                                                                                                                                                                                                +    @Inject(DefaultDatatype) allDataTypes: DefaultDatatype[],
                                                                                                                                                                                                                                                +    private configurableEnumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                +    private adminEntityService: AdminEntityService,
                                                                                                                                                                                                                                                +    private dialog: MatDialog,
                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                +    this.fieldId = data.fieldId;
                                                                                                                                                                                                                                                +    this.entityType = data.entityType;
                                                                                                                                                                                                                                                +    this.entitySchemaField = this.entityType.schema.get(this.fieldId) ?? {};
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    this.initSettings();
                                                                                                                                                                                                                                                +    this.initAvailableDatatypes(allDataTypes);
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                +    if (changes.entitySchemaField) {
                                                                                                                                                                                                                                                +      this.initSettings();
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  private initSettings() {
                                                                                                                                                                                                                                                +    this.fieldIdForm = this.fb.control(this.fieldId, {
                                                                                                                                                                                                                                                +      validators: [Validators.required],
                                                                                                                                                                                                                                                +      asyncValidators: [
                                                                                                                                                                                                                                                +        uniqueIdValidator(Array.from(this.entityType.schema.keys())),
                                                                                                                                                                                                                                                +      ],
                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                +    this.additionalForm = this.fb.control(this.entitySchemaField.additional);
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    this.schemaFieldsForm = this.fb.group({
                                                                                                                                                                                                                                                +      label: [this.entitySchemaField.label, Validators.required],
                                                                                                                                                                                                                                                +      labelShort: [this.entitySchemaField.labelShort],
                                                                                                                                                                                                                                                +      description: [this.entitySchemaField.description],
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +      dataType: [this.entitySchemaField.dataType, Validators.required],
                                                                                                                                                                                                                                                +      isArray: [this.entitySchemaField.isArray],
                                                                                                                                                                                                                                                +      additional: this.additionalForm,
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +      defaultValue: [this.entitySchemaField.defaultValue],
                                                                                                                                                                                                                                                +      searchable: [this.entitySchemaField.searchable],
                                                                                                                                                                                                                                                +      anonymize: [this.entitySchemaField.anonymize],
                                                                                                                                                                                                                                                +      //viewComponent: [],
                                                                                                                                                                                                                                                +      //editComponent: [],
                                                                                                                                                                                                                                                +      //showInDetailsView: [],
                                                                                                                                                                                                                                                +      //generateIndex: [],
                                                                                                                                                                                                                                                +      validators: [this.entitySchemaField.validators],
                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                +    this.form = this.fb.group({
                                                                                                                                                                                                                                                +      id: this.fieldIdForm,
                                                                                                                                                                                                                                                +      schemaFields: this.schemaFieldsForm,
                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    this.schemaFieldsForm
                                                                                                                                                                                                                                                +      .get("labelShort")
                                                                                                                                                                                                                                                +      .valueChanges.pipe(filter((v) => v === ""))
                                                                                                                                                                                                                                                +      .subscribe((v) => {
                                                                                                                                                                                                                                                +        // labelShort should never be empty string, in that case it has to be removed so that label works as fallback
                                                                                                                                                                                                                                                +        this.schemaFieldsForm.get("labelShort").setValue(null);
                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                +    this.updateDataTypeAdditional(this.schemaFieldsForm.get("dataType").value);
                                                                                                                                                                                                                                                +    this.schemaFieldsForm
                                                                                                                                                                                                                                                +      .get("dataType")
                                                                                                                                                                                                                                                +      .valueChanges.subscribe((v) => this.updateDataTypeAdditional(v));
                                                                                                                                                                                                                                                +    this.updateForNewOrExistingField();
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  private updateForNewOrExistingField() {
                                                                                                                                                                                                                                                +    if (!!this.fieldId) {
                                                                                                                                                                                                                                                +      // existing fields' id is readonly
                                                                                                                                                                                                                                                +      this.fieldIdForm.disable();
                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                +      const autoGenerateSubscr = merge(
                                                                                                                                                                                                                                                +        this.schemaFieldsForm.get("label").valueChanges,
                                                                                                                                                                                                                                                +        this.schemaFieldsForm.get("labelShort").valueChanges,
                                                                                                                                                                                                                                                +      ).subscribe(() => this.autoGenerateId());
                                                                                                                                                                                                                                                +      // stop updating id when user manually edits
                                                                                                                                                                                                                                                +      this.fieldIdForm.valueChanges.subscribe(() =>
                                                                                                                                                                                                                                                +        autoGenerateSubscr.unsubscribe(),
                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  entityFieldValidatorChanges(validatorData: FormValidatorConfig) {
                                                                                                                                                                                                                                                +    this.schemaFieldsForm.get("validators").setValue(validatorData);
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +  private autoGenerateId() {
                                                                                                                                                                                                                                                +    // prefer labelShort if it exists, as this makes less verbose IDs
                                                                                                                                                                                                                                                +    const label =
                                                                                                                                                                                                                                                +      this.schemaFieldsForm.get("labelShort").value ??
                                                                                                                                                                                                                                                +      this.schemaFieldsForm.get("label").value;
                                                                                                                                                                                                                                                +    const generatedId = generateIdFromLabel(label);
                                                                                                                                                                                                                                                +    this.fieldIdForm.setValue(generatedId, { emitEvent: false });
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  private initAvailableDatatypes(dataTypes: DefaultDatatype[]) {
                                                                                                                                                                                                                                                +    this.dataTypes = dataTypes
                                                                                                                                                                                                                                                +      .filter((d) => d.label !== DefaultDatatype.label) // hide "internal" technical dataTypes that did not define a human-readable label
                                                                                                                                                                                                                                                +      .map((d) => ({
                                                                                                                                                                                                                                                +        label: d.label,
                                                                                                                                                                                                                                                +        value: d.dataType,
                                                                                                                                                                                                                                                +      }));
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +  objectToLabel = (v: SimpleDropdownValue) => v?.label;
                                                                                                                                                                                                                                                +  objectToValue = (v: SimpleDropdownValue) => v?.value;
                                                                                                                                                                                                                                                +  createNewAdditionalOption: (input: string) => SimpleDropdownValue;
                                                                                                                                                                                                                                                +  createNewAdditionalOptionAsync = async (input) =>
                                                                                                                                                                                                                                                +    this.createNewAdditionalOption(input);
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  private updateDataTypeAdditional(dataType: string) {
                                                                                                                                                                                                                                                +    this.resetAdditional();
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    if (dataType === ConfigurableEnumDatatype.dataType) {
                                                                                                                                                                                                                                                +      this.initAdditionalForEnum();
                                                                                                                                                                                                                                                +    } else if (dataType === EntityDatatype.dataType) {
                                                                                                                                                                                                                                                +      this.initAdditionalForEntityRef();
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    // hasInnerType: [ArrayDatatype.dataType].includes(d.dataType),
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    // TODO: this mapping of having an "additional" schema should probably become part of Datatype classes
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  private initAdditionalForEnum() {
                                                                                                                                                                                                                                                +    this.typeAdditionalOptions = this.configurableEnumService
                                                                                                                                                                                                                                                +      .listEnums()
                                                                                                                                                                                                                                                +      .map((x) => ({
                                                                                                                                                                                                                                                +        label: Entity.extractEntityIdFromId(x), // TODO: add human-readable label to configurable-enum entities
                                                                                                                                                                                                                                                +        value: Entity.extractEntityIdFromId(x),
                                                                                                                                                                                                                                                +      }));
                                                                                                                                                                                                                                                +    this.additionalForm.addValidators(Validators.required);
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    this.createNewAdditionalOption = (text) => ({
                                                                                                                                                                                                                                                +      value: generateIdFromLabel(text),
                                                                                                                                                                                                                                                +      label: text,
                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    if (this.entitySchemaField.additional) {
                                                                                                                                                                                                                                                +      this.additionalForm.setValue(this.entitySchemaField.additional);
                                                                                                                                                                                                                                                +    } else if (this.schemaFieldsForm.get("label").value) {
                                                                                                                                                                                                                                                +      // when switching to enum datatype in the form, if unset generate a suggested enum-id immediately
                                                                                                                                                                                                                                                +      const newOption = this.createNewAdditionalOption(
                                                                                                                                                                                                                                                +        this.schemaFieldsForm.get("label").value,
                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                +      this.typeAdditionalOptions.push(newOption);
                                                                                                                                                                                                                                                +      this.additionalForm.setValue(newOption.value);
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  private initAdditionalForEntityRef() {
                                                                                                                                                                                                                                                +    this.typeAdditionalOptions = this.entityRegistry
                                                                                                                                                                                                                                                +      .getEntityTypes(true)
                                                                                                                                                                                                                                                +      .map((x) => ({ label: x.value.label, value: x.value.ENTITY_TYPE }));
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    this.additionalForm.addValidators(Validators.required);
                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                +      this.typeAdditionalOptions.some(
                                                                                                                                                                                                                                                +        (x) => x.value === this.entitySchemaField.additional,
                                                                                                                                                                                                                                                +      )
                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                +      this.additionalForm.setValue(this.entitySchemaField.additional);
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  private resetAdditional() {
                                                                                                                                                                                                                                                +    this.additionalForm.removeValidators(Validators.required);
                                                                                                                                                                                                                                                +    this.additionalForm.reset(null);
                                                                                                                                                                                                                                                +    this.typeAdditionalOptions = [];
                                                                                                                                                                                                                                                +    this.createNewAdditionalOption = undefined;
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  save() {
                                                                                                                                                                                                                                                +    this.form.markAllAsTouched();
                                                                                                                                                                                                                                                +    if (this.form.invalid) {
                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    const formValues = this.schemaFieldsForm.getRawValue();
                                                                                                                                                                                                                                                +    for (const key of Object.keys(formValues)) {
                                                                                                                                                                                                                                                +      if (formValues[key] === null) {
                                                                                                                                                                                                                                                +        delete formValues[key];
                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +    const updatedEntitySchema = Object.assign(
                                                                                                                                                                                                                                                +      {},
                                                                                                                                                                                                                                                +      this.entitySchemaField, // TODO: remove this merge once all schema fields are in the form (then only form values should apply)
                                                                                                                                                                                                                                                +      formValues,
                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                +    const fieldId = this.fieldIdForm.getRawValue();
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    this.adminEntityService.updateSchemaField(
                                                                                                                                                                                                                                                +      this.entityType,
                                                                                                                                                                                                                                                +      fieldId,
                                                                                                                                                                                                                                                +      updatedEntitySchema,
                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    this.dialogRef.close(fieldId);
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  openEnumOptions(event: Event) {
                                                                                                                                                                                                                                                +    event.stopPropagation(); // do not open the autocomplete dropdown when clicking the settings icon
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +    let enumEntity = this.configurableEnumService.getEnum(
                                                                                                                                                                                                                                                +      this.additionalForm.value,
                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                +    if (!enumEntity) {
                                                                                                                                                                                                                                                +      // if the user makes changes, the dialog component itself is saving the new entity to the database already
                                                                                                                                                                                                                                                +      enumEntity = new ConfigurableEnum(this.additionalForm.value);
                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                +    this.dialog.open(ConfigureEnumPopupComponent, { data: enumEntity });
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +interface SimpleDropdownValue {
                                                                                                                                                                                                                                                +  label: string;
                                                                                                                                                                                                                                                +  value: string;
                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                <h2 mat-dialog-title i18n>Configure Field "{{ entitySchemaField.label }}"</h2>
                                                                                                                                                                                                                                                +<app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +<mat-dialog-content>
                                                                                                                                                                                                                                                +  <p i18n>
                                                                                                                                                                                                                                                +    The field settings here apply to the record type overall and affect both the
                                                                                                                                                                                                                                                +    field here in the current view as well as all other forms and lists where
                                                                                                                                                                                                                                                +    this field is displayed.
                                                                                                                                                                                                                                                +  </p>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  <form [formGroup]="form">
                                                                                                                                                                                                                                                +    <mat-tab-group formGroupName="schemaFields">
                                                                                                                                                                                                                                                +      <mat-tab label="Basics" i18n-label>
                                                                                                                                                                                                                                                +        <div class="grid-layout margin-top-regular">
                                                                                                                                                                                                                                                +          <div class="entity-form-cell">
                                                                                                                                                                                                                                                +            <mat-form-field>
                                                                                                                                                                                                                                                +              <mat-label i18n>Label</mat-label>
                                                                                                                                                                                                                                                +              <input formControlName="label" matInput #formLabel />
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            <mat-form-field floatLabel="always">
                                                                                                                                                                                                                                                +              <mat-label i18n>
                                                                                                                                                                                                                                                +                Label (short)
                                                                                                                                                                                                                                                +                <fa-icon
                                                                                                                                                                                                                                                +                  icon="question-circle"
                                                                                                                                                                                                                                                +                  matTooltip="Optionally you can define an additional shorter label to be displayed in table headers and other places where space is limited."
                                                                                                                                                                                                                                                +                  i18n-matTooltip
                                                                                                                                                                                                                                                +                ></fa-icon>
                                                                                                                                                                                                                                                +              </mat-label>
                                                                                                                                                                                                                                                +              <input
                                                                                                                                                                                                                                                +                formControlName="labelShort"
                                                                                                                                                                                                                                                +                matInput
                                                                                                                                                                                                                                                +                [placeholder]="formLabel.value"
                                                                                                                                                                                                                                                +              />
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            <mat-form-field>
                                                                                                                                                                                                                                                +              <mat-label i18n>
                                                                                                                                                                                                                                                +                Description
                                                                                                                                                                                                                                                +                <fa-icon
                                                                                                                                                                                                                                                +                  icon="question-circle"
                                                                                                                                                                                                                                                +                  matTooltip="The description provides additional explanation or context about this field. It is usually displayed as a help icon with tooltip."
                                                                                                                                                                                                                                                +                  i18n-matTooltip
                                                                                                                                                                                                                                                +                ></fa-icon>
                                                                                                                                                                                                                                                +              </mat-label>
                                                                                                                                                                                                                                                +              <textarea
                                                                                                                                                                                                                                                +                formControlName="description"
                                                                                                                                                                                                                                                +                matInput
                                                                                                                                                                                                                                                +                rows="3"
                                                                                                                                                                                                                                                +              ></textarea>
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +          </div>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +          <div class="entity-form-cell">
                                                                                                                                                                                                                                                +            <mat-form-field>
                                                                                                                                                                                                                                                +              <mat-label i18n>
                                                                                                                                                                                                                                                +                Field ID (readonly)
                                                                                                                                                                                                                                                +                <fa-icon
                                                                                                                                                                                                                                                +                  icon="question-circle"
                                                                                                                                                                                                                                                +                  matTooltip="The internal ID of the field is used at a technical level in the database. The ID cannot be changed after the field has been created."
                                                                                                                                                                                                                                                +                  i18n-matTooltip
                                                                                                                                                                                                                                                +                ></fa-icon>
                                                                                                                                                                                                                                                +              </mat-label>
                                                                                                                                                                                                                                                +              <input [formControl]="fieldIdForm" matInput />
                                                                                                                                                                                                                                                +              <fa-icon
                                                                                                                                                                                                                                                +                *ngIf="fieldIdForm.disabled"
                                                                                                                                                                                                                                                +                icon="lock"
                                                                                                                                                                                                                                                +                matSuffix
                                                                                                                                                                                                                                                +              ></fa-icon>
                                                                                                                                                                                                                                                +              <mat-error *ngIf="fieldIdForm.hasError('uniqueId')">
                                                                                                                                                                                                                                                +                {{ fieldIdForm.getError("uniqueId") }}
                                                                                                                                                                                                                                                +              </mat-error>
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            <mat-form-field>
                                                                                                                                                                                                                                                +              <mat-label i18n>Type</mat-label>
                                                                                                                                                                                                                                                +              <app-basic-autocomplete
                                                                                                                                                                                                                                                +                formControlName="dataType"
                                                                                                                                                                                                                                                +                #formDataType
                                                                                                                                                                                                                                                +                [options]="dataTypes"
                                                                                                                                                                                                                                                +                [optionToString]="objectToLabel"
                                                                                                                                                                                                                                                +                [valueMapper]="objectToValue"
                                                                                                                                                                                                                                                +              ></app-basic-autocomplete>
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            @if (
                                                                                                                                                                                                                                                +              formDataType.value === "configurable-enum" ||
                                                                                                                                                                                                                                                +              formDataType.value === "entity"
                                                                                                                                                                                                                                                +            ) {
                                                                                                                                                                                                                                                +              <mat-checkbox formControlName="isArray" i18n>
                                                                                                                                                                                                                                                +                allow multiple values (multi-select)
                                                                                                                                                                                                                                                +              </mat-checkbox>
                                                                                                                                                                                                                                                +            }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            <!-- "additional" for enum datatype -->
                                                                                                                                                                                                                                                +            <mat-form-field *ngIf="formDataType.value === 'configurable-enum'">
                                                                                                                                                                                                                                                +              <mat-label i18n>
                                                                                                                                                                                                                                                +                Type Details (dropdown options set)
                                                                                                                                                                                                                                                +                <fa-icon
                                                                                                                                                                                                                                                +                  icon="question-circle"
                                                                                                                                                                                                                                                +                  matTooltip="Select an existing set of options to share between multiple fields or create a new, independent list of dropdown options."
                                                                                                                                                                                                                                                +                  i18n-matTooltip
                                                                                                                                                                                                                                                +                ></fa-icon>
                                                                                                                                                                                                                                                +              </mat-label>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +              <app-basic-autocomplete
                                                                                                                                                                                                                                                +                formControlName="additional"
                                                                                                                                                                                                                                                +                [options]="typeAdditionalOptions"
                                                                                                                                                                                                                                                +                [optionToString]="objectToLabel"
                                                                                                                                                                                                                                                +                [valueMapper]="objectToValue"
                                                                                                                                                                                                                                                +                [createOption]="createNewAdditionalOptionAsync"
                                                                                                                                                                                                                                                +              ></app-basic-autocomplete>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +              <button
                                                                                                                                                                                                                                                +                mat-icon-button
                                                                                                                                                                                                                                                +                matSuffix
                                                                                                                                                                                                                                                +                (click)="openEnumOptions($event)"
                                                                                                                                                                                                                                                +              >
                                                                                                                                                                                                                                                +                <fa-icon icon="wrench"></fa-icon>
                                                                                                                                                                                                                                                +              </button>
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            <!-- "additional" for entity ref datatypes -->
                                                                                                                                                                                                                                                +            <mat-form-field *ngIf="formDataType.value === 'entity'">
                                                                                                                                                                                                                                                +              <mat-label i18n>
                                                                                                                                                                                                                                                +                Type Details (target record type)
                                                                                                                                                                                                                                                +                <fa-icon
                                                                                                                                                                                                                                                +                  icon="question-circle"
                                                                                                                                                                                                                                                +                  matTooltip="Select from which type of records the user can select and link to with this field."
                                                                                                                                                                                                                                                +                  i18n-matTooltip
                                                                                                                                                                                                                                                +                ></fa-icon>
                                                                                                                                                                                                                                                +              </mat-label>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +              <app-basic-autocomplete
                                                                                                                                                                                                                                                +                formControlName="additional"
                                                                                                                                                                                                                                                +                [options]="typeAdditionalOptions"
                                                                                                                                                                                                                                                +                [optionToString]="objectToLabel"
                                                                                                                                                                                                                                                +                [valueMapper]="objectToValue"
                                                                                                                                                                                                                                                +                [createOption]="createNewAdditionalOptionAsync"
                                                                                                                                                                                                                                                +              ></app-basic-autocomplete>
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +          </div>
                                                                                                                                                                                                                                                +        </div>
                                                                                                                                                                                                                                                +      </mat-tab>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +      <!--
                                                                                                                                                                                                                                                +        ADVANCED SETTINGS
                                                                                                                                                                                                                                                +      -->
                                                                                                                                                                                                                                                +      <mat-tab label="Advanced Options & Validation" i18n-label>
                                                                                                                                                                                                                                                +        <div class="grid-layout-wide margin-top-regular">
                                                                                                                                                                                                                                                +          <div class="entity-form-cell">
                                                                                                                                                                                                                                                +            <app-default-value-options
                                                                                                                                                                                                                                                +              [value]="entitySchemaField.defaultValue"
                                                                                                                                                                                                                                                +              (valueChange)="
                                                                                                                                                                                                                                                +                schemaFieldsForm.get('defaultValue').setValue($event)
                                                                                                                                                                                                                                                +              "
                                                                                                                                                                                                                                                +              [entityType]="entityType"
                                                                                                                                                                                                                                                +            >
                                                                                                                                                                                                                                                +            </app-default-value-options>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            <app-anonymize-options
                                                                                                                                                                                                                                                +              [value]="entitySchemaField.anonymize"
                                                                                                                                                                                                                                                +              (valueChange)="schemaFieldsForm.get('anonymize').setValue($event)"
                                                                                                                                                                                                                                                +            >
                                                                                                                                                                                                                                                +              <span i18n>Anonymize</span>
                                                                                                                                                                                                                                                +              <fa-icon
                                                                                                                                                                                                                                                +                icon="question-circle"
                                                                                                                                                                                                                                                +                matTooltip="Optionally This will remove all personal information (PII) permanently related to this field."
                                                                                                                                                                                                                                                +                i18n-matTooltip
                                                                                                                                                                                                                                                +              ></fa-icon>
                                                                                                                                                                                                                                                +            </app-anonymize-options>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +            <!-- TODO: not supported yet
                                                                                                                                                                                                                                                +            <mat-form-field>
                                                                                                                                                                                                                                                +              <mat-label i18n>Searchable</mat-label>
                                                                                                                                                                                                                                                +              <input formControlName="searchable" matInput />
                                                                                                                                                                                                                                                +            </mat-form-field>
                                                                                                                                                                                                                                                +            -->
                                                                                                                                                                                                                                                +          </div>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +          <div class="entity-form-cell">
                                                                                                                                                                                                                                                +            <app-configure-entity-field-validator
                                                                                                                                                                                                                                                +              [entitySchemaField]="entitySchemaField"
                                                                                                                                                                                                                                                +              (entityValidatorChanges)="entityFieldValidatorChanges($event)"
                                                                                                                                                                                                                                                +            ></app-configure-entity-field-validator>
                                                                                                                                                                                                                                                +          </div>
                                                                                                                                                                                                                                                +        </div>
                                                                                                                                                                                                                                                +      </mat-tab>
                                                                                                                                                                                                                                                +    </mat-tab-group>
                                                                                                                                                                                                                                                +  </form>
                                                                                                                                                                                                                                                +</mat-dialog-content>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +<mat-dialog-actions>
                                                                                                                                                                                                                                                +  <button mat-button (click)="save()" i18n="Button label">Save</button>
                                                                                                                                                                                                                                                +  <button mat-button mat-dialog-close i18n="Button label">Cancel</button>
                                                                                                                                                                                                                                                +</mat-dialog-actions>
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                + ./admin-entity-field.component.scss +

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                @use "../../../../../styles/mixins/grid-layout";
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +.grid-layout {
                                                                                                                                                                                                                                                +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                +    $min-block-width: 250px,
                                                                                                                                                                                                                                                +    $max-screen-width: 414px
                                                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +.grid-layout-wide {
                                                                                                                                                                                                                                                +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                +    $min-block-width: 450px,
                                                                                                                                                                                                                                                +    $max-screen-width: 500px
                                                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                + ../../../common-components/entity-form/entity-form/entity-form.component.scss +

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                @use "mixins/grid-layout";
                                                                                                                                                                                                                                                +@use "variables/sizes";
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +.grid-layout {
                                                                                                                                                                                                                                                +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                +    $min-block-width: sizes.$form-group-min-width,
                                                                                                                                                                                                                                                +    $max-screen-width: 414px
                                                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +.entity-form-cell {
                                                                                                                                                                                                                                                +  display: flex;
                                                                                                                                                                                                                                                +  flex-direction: column;
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  /* set the width of each form field to 100% in every form component that is a descendent
                                                                                                                                                                                                                                                +     of the columns-wrapper class */
                                                                                                                                                                                                                                                +  mat-form-field {
                                                                                                                                                                                                                                                +    width: 100%;
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +  /* We align the photo (and only tht photo) to the center of the cell if there is one.
                                                                                                                                                                                                                                                +     This looks better on desktop and mobile compared to an alignment to the start of the cell
                                                                                                                                                                                                                                                +     which is the default for all other elements */
                                                                                                                                                                                                                                                +  > app-edit-photo {
                                                                                                                                                                                                                                                +    align-self: center;
                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityFormComponent.html b/documentation/components/AdminEntityFormComponent.html new file mode 100644 index 0000000000..e0ccced36f --- /dev/null +++ b/documentation/components/AdminEntityFormComponent.html @@ -0,0 +1,1849 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  + src/app/core/admin/admin-entity-details/admin-entity-form/admin-entity-form.component.ts +

                                                                                                                                                                                                                                                  + + + + +

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  + OnChanges +

                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  +constructor(entityFormService: EntityFormService, matDialog: MatDialog, adminEntityService: AdminEntityService) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                  entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                  matDialog + MatDialog + + No +
                                                                                                                                                                                                                                                  adminEntityService + AdminEntityService + + No +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + config +
                                                                                                                                                                                                                                                  + Type : FormConfig + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + entityType +
                                                                                                                                                                                                                                                  + Type : EntityConstructor + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + drop + + +
                                                                                                                                                                                                                                                  +drop(event: CdkDragDrop<ColumnConfig[] | ColumnConfig[]>) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                  event + CdkDragDrop<ColumnConfig[] | ColumnConfig[]> + + No +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + dropNewGroup + + +
                                                                                                                                                                                                                                                  +dropNewGroup(event: CdkDragDrop) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                  event + CdkDragDrop<any | any> + + No +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + hideField + + +
                                                                                                                                                                                                                                                  +hideField(field: ColumnConfig, group: FieldGroup) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                  field + ColumnConfig + + No +
                                                                                                                                                                                                                                                  group + FieldGroup + + No +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + Async + openConfigDetails + + +
                                                                                                                                                                                                                                                  + + openConfigDetails(field: ColumnConfig) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Opens the configuration settings for a field. +If the field has an editComponent defined in the schema, it opens the text configuration. +Otherwise, it opens the field configuration.

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                  field + ColumnConfig + + No + +

                                                                                                                                                                                                                                                  The field to open the configuration settings for.

                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + Async + openFieldConfig + + +
                                                                                                                                                                                                                                                  + + openFieldConfig(field: ColumnConfig) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Open the form to edit details of a single field's schema.

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                  field + ColumnConfig + + No + +

                                                                                                                                                                                                                                                  field to edit or { id: null } to create a new field

                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Returns : Promise<string> + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  the id of the field that was edited or created (which is newly defined in the dialog for new fields)

                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + Async + openTextConfig + + +
                                                                                                                                                                                                                                                  + + openTextConfig(textField: FormFieldConfig) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Open the form to edit details of a single text's schema.

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                  textField + FormFieldConfig + + No + +

                                                                                                                                                                                                                                                  text to edit or { id: null } to create a new text

                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Returns : Promise<FormFieldConfig> + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  the id of the text that was edited or created (which is newly defined in the dialog for new fields)

                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + removeGroup + + +
                                                                                                                                                                                                                                                  +removeGroup(i: number) +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                  i + number + + No +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + availableFields + + +
                                                                                                                                                                                                                                                  + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + Readonly + createNewFieldPlaceholder + + +
                                                                                                                                                                                                                                                  + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                  + Default value : { + id: null, + label: $localize`:Label drag and drop item:Create New Field`, + } +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + Readonly + createNewTextPlaceholder + + +
                                                                                                                                                                                                                                                  + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                  + Default value : { + id: null, + label: $localize`:Label drag and drop item:Create Text Block`, + } +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + dummyEntity + + +
                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  + + + dummyForm + + +
                                                                                                                                                                                                                                                  + Type : EntityForm<any> + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                  +import { Entity, EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                  +  EntityForm,
                                                                                                                                                                                                                                                  +  EntityFormService,
                                                                                                                                                                                                                                                  +} from "../../../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                  +import { FormControl } from "@angular/forms";
                                                                                                                                                                                                                                                  +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                  +import { AdminEntityFieldComponent } from "../admin-entity-field/admin-entity-field.component";
                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                  +  CdkDragDrop,
                                                                                                                                                                                                                                                  +  DragDropModule,
                                                                                                                                                                                                                                                  +  moveItemInArray,
                                                                                                                                                                                                                                                  +  transferArrayItem,
                                                                                                                                                                                                                                                  +} from "@angular/cdk/drag-drop";
                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                  +  ColumnConfig,
                                                                                                                                                                                                                                                  +  FormFieldConfig,
                                                                                                                                                                                                                                                  +  toFormFieldConfig,
                                                                                                                                                                                                                                                  +} from "../../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                  +import { AdminEntityService } from "../../admin-entity.service";
                                                                                                                                                                                                                                                  +import { lastValueFrom } from "rxjs";
                                                                                                                                                                                                                                                  +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                  +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                  +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                  +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                                  +import { EntityFieldLabelComponent } from "../../../common-components/entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                  +import { EntityFieldEditComponent } from "../../../common-components/entity-field-edit/entity-field-edit.component";
                                                                                                                                                                                                                                                  +import { AdminSectionHeaderComponent } from "../../building-blocks/admin-section-header/admin-section-header.component";
                                                                                                                                                                                                                                                  +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                  +import { FormConfig } from "../../../entity-details/form/form.component";
                                                                                                                                                                                                                                                  +import { AdminEditDescriptionOnlyFieldComponent } from "../admin-entity-field/admin-edit-description-only-field/admin-edit-description-only-field.component";
                                                                                                                                                                                                                                                  +import { FieldGroup } from "app/core/entity-details/form/field-group";
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +@UntilDestroy()
                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                  +  selector: "app-admin-entity-form",
                                                                                                                                                                                                                                                  +  templateUrl: "./admin-entity-form.component.html",
                                                                                                                                                                                                                                                  +  styleUrls: [
                                                                                                                                                                                                                                                  +    "./admin-entity-form.component.scss",
                                                                                                                                                                                                                                                  +    "../../building-blocks/admin-section-header/admin-section-header.component.scss",
                                                                                                                                                                                                                                                  +    "../../../common-components/entity-form/entity-form/entity-form.component.scss",
                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                  +    DragDropModule,
                                                                                                                                                                                                                                                  +    NgForOf,
                                                                                                                                                                                                                                                  +    FaIconComponent,
                                                                                                                                                                                                                                                  +    MatButtonModule,
                                                                                                                                                                                                                                                  +    MatTooltipModule,
                                                                                                                                                                                                                                                  +    MatCardModule,
                                                                                                                                                                                                                                                  +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                  +    EntityFieldEditComponent,
                                                                                                                                                                                                                                                  +    AdminSectionHeaderComponent,
                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                  +export class AdminEntityFormComponent implements OnChanges {
                                                                                                                                                                                                                                                  +  @Input() entityType: EntityConstructor;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  @Input() config: FormConfig;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  dummyEntity: Entity;
                                                                                                                                                                                                                                                  +  dummyForm: EntityForm<any>;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  availableFields: ColumnConfig[] = [];
                                                                                                                                                                                                                                                  +  readonly createNewFieldPlaceholder: FormFieldConfig = {
                                                                                                                                                                                                                                                  +    id: null,
                                                                                                                                                                                                                                                  +    label: $localize`:Label drag and drop item:Create New Field`,
                                                                                                                                                                                                                                                  +  };
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  readonly createNewTextPlaceholder: FormFieldConfig = {
                                                                                                                                                                                                                                                  +    id: null,
                                                                                                                                                                                                                                                  +    label: $localize`:Label drag and drop item:Create Text Block`,
                                                                                                                                                                                                                                                  +  };
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                  +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                  +    private matDialog: MatDialog,
                                                                                                                                                                                                                                                  +    adminEntityService: AdminEntityService,
                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                  +    adminEntityService.entitySchemaUpdated
                                                                                                                                                                                                                                                  +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                  +      .subscribe(() => {
                                                                                                                                                                                                                                                  +        this.availableFields = []; // force re-init of the label components that otherwise do not detect the change
                                                                                                                                                                                                                                                  +        setTimeout(() => this.initForm());
                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  async ngOnChanges(changes: SimpleChanges): Promise<void> {
                                                                                                                                                                                                                                                  +    if (changes.config) {
                                                                                                                                                                                                                                                  +      await this.initForm();
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  private async initForm() {
                                                                                                                                                                                                                                                  +    this.initAvailableFields();
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    this.dummyEntity = new this.entityType();
                                                                                                                                                                                                                                                  +    this.dummyForm = await this.entityFormService.createEntityForm(
                                                                                                                                                                                                                                                  +      [...this.getUsedFields(this.config), ...this.availableFields],
                                                                                                                                                                                                                                                  +      this.dummyEntity,
                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                  +    this.dummyForm.formGroup.disable();
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  private getUsedFields(config: FormConfig): ColumnConfig[] {
                                                                                                                                                                                                                                                  +    return config.fieldGroups.reduce((p, c) => p.concat(c.fields), []);
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                  +   * Load any fields from schema that are not already in the form, so that the user can drag them into the form.
                                                                                                                                                                                                                                                  +   * @param config
                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                  +  private initAvailableFields() {
                                                                                                                                                                                                                                                  +    const usedFields = this.getUsedFields(this.config);
                                                                                                                                                                                                                                                  +    const unusedFields = Array.from(this.entityType.schema.entries())
                                                                                                                                                                                                                                                  +      .filter(
                                                                                                                                                                                                                                                  +        ([key]) =>
                                                                                                                                                                                                                                                  +          !usedFields.some(
                                                                                                                                                                                                                                                  +            (x) => x === key || (x as FormFieldConfig).id === key,
                                                                                                                                                                                                                                                  +          ),
                                                                                                                                                                                                                                                  +      )
                                                                                                                                                                                                                                                  +      .filter(([key, value]) => value.label) // no technical, internal fields
                                                                                                                                                                                                                                                  +      .sort(([aId, a], [bId, b]) => a.label.localeCompare(b.label))
                                                                                                                                                                                                                                                  +      .map(([key]) => key);
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    this.availableFields = [
                                                                                                                                                                                                                                                  +      this.createNewFieldPlaceholder,
                                                                                                                                                                                                                                                  +      this.createNewTextPlaceholder,
                                                                                                                                                                                                                                                  +      ...unusedFields,
                                                                                                                                                                                                                                                  +    ];
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                  +   * Open the form to edit details of a single field's schema.
                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                  +   * @param field field to edit or { id: null } to create a new field
                                                                                                                                                                                                                                                  +   * @returns the id of the field that was edited or created (which is newly defined in the dialog for new fields)
                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                  +  async openFieldConfig(field: ColumnConfig): Promise<string> {
                                                                                                                                                                                                                                                  +    let fieldIdToEdit = toFormFieldConfig(field).id;
                                                                                                                                                                                                                                                  +    const dialogRef = this.matDialog.open(AdminEntityFieldComponent, {
                                                                                                                                                                                                                                                  +      width: "99%",
                                                                                                                                                                                                                                                  +      maxHeight: "90vh",
                                                                                                                                                                                                                                                  +      data: {
                                                                                                                                                                                                                                                  +        fieldId: fieldIdToEdit,
                                                                                                                                                                                                                                                  +        entityType: this.entityType,
                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                  +    return lastValueFrom(dialogRef.afterClosed());
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                  +   * Open the form to edit details of a single text's schema.
                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                  +   * @param textField text to edit or { id: null } to create a new text
                                                                                                                                                                                                                                                  +   * @returns the id of the text that was edited or created (which is newly defined in the dialog for new fields)
                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                  +  async openTextConfig(textField: FormFieldConfig): Promise<FormFieldConfig> {
                                                                                                                                                                                                                                                  +    const dialogRef = this.matDialog.open(
                                                                                                                                                                                                                                                  +      AdminEditDescriptionOnlyFieldComponent,
                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                  +        data: textField,
                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    const result = await lastValueFrom(dialogRef.afterClosed());
                                                                                                                                                                                                                                                  +    return result;
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  drop(event: CdkDragDrop<ColumnConfig[], ColumnConfig[]>) {
                                                                                                                                                                                                                                                  +    const prevFieldsArray = event.previousContainer.data;
                                                                                                                                                                                                                                                  +    const newFieldsArray = event.container.data;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    if (
                                                                                                                                                                                                                                                  +      prevFieldsArray[event.previousIndex] === this.createNewFieldPlaceholder
                                                                                                                                                                                                                                                  +    ) {
                                                                                                                                                                                                                                                  +      this.dropNewField(event);
                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    if (
                                                                                                                                                                                                                                                  +      prevFieldsArray[event.previousIndex] === this.createNewTextPlaceholder
                                                                                                                                                                                                                                                  +    ) {
                                                                                                                                                                                                                                                  +      this.dropNewText(event);
                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    if (event.previousContainer === event.container) {
                                                                                                                                                                                                                                                  +      moveItemInArray(newFieldsArray, event.previousIndex, event.currentIndex);
                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                  +      transferArrayItem(
                                                                                                                                                                                                                                                  +        prevFieldsArray,
                                                                                                                                                                                                                                                  +        newFieldsArray,
                                                                                                                                                                                                                                                  +        event.previousIndex,
                                                                                                                                                                                                                                                  +        event.currentIndex,
                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    if (newFieldsArray === this.availableFields) {
                                                                                                                                                                                                                                                  +      // ensure available fields have consistent order
                                                                                                                                                                                                                                                  +      this.initAvailableFields();
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                  +   * Opens the configuration settings for a field.
                                                                                                                                                                                                                                                  +   * If the field has an editComponent defined in the schema, it opens the text configuration.
                                                                                                                                                                                                                                                  +   * Otherwise, it opens the field configuration.
                                                                                                                                                                                                                                                  +   * @param field The field to open the configuration settings for.
                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                  +  async openConfigDetails(field: ColumnConfig) {
                                                                                                                                                                                                                                                  +    let fieldIdToEdit = toFormFieldConfig(field).id;
                                                                                                                                                                                                                                                  +    const configDetails = Object.assign(
                                                                                                                                                                                                                                                  +      {},
                                                                                                                                                                                                                                                  +      this.entityType.schema.get(fieldIdToEdit) ?? {},
                                                                                                                                                                                                                                                  +      field,
                                                                                                                                                                                                                                                  +    ) as FormFieldConfig;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    if (configDetails.editComponent == "EditDescriptionOnly") {
                                                                                                                                                                                                                                                  +      const updatedField = await this.openTextConfig(configDetails);
                                                                                                                                                                                                                                                  +      Object.assign(field, updatedField);
                                                                                                                                                                                                                                                  +      await this.initForm();
                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                  +      await this.openFieldConfig(field);
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                  +   * drop handler specifically for the "create new field" item
                                                                                                                                                                                                                                                  +   * @param event
                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                  +  private async dropNewField(
                                                                                                                                                                                                                                                  +    event: CdkDragDrop<ColumnConfig[], ColumnConfig[]>,
                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                  +    if (event.container.data === this.availableFields) {
                                                                                                                                                                                                                                                  +      // don't add new field to the available fields that are not in the form yet
                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    const newFieldId = await this.openFieldConfig({ id: null });
                                                                                                                                                                                                                                                  +    if (!newFieldId) {
                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    this.dummyForm.formGroup.addControl(newFieldId, new FormControl());
                                                                                                                                                                                                                                                  +    this.dummyForm.formGroup.disable();
                                                                                                                                                                                                                                                  +    event.container.data.splice(event.currentIndex, 0, newFieldId);
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    // the schema update has added the new field to the available fields already, remove it from there
                                                                                                                                                                                                                                                  +    this.availableFields.splice(this.availableFields.indexOf(newFieldId), 1);
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                  +   * drop handler specifically for the "create new Text field" item
                                                                                                                                                                                                                                                  +   * @param event
                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                  +  private async dropNewText(
                                                                                                                                                                                                                                                  +    event: CdkDragDrop<ColumnConfig[], ColumnConfig[]>,
                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                  +    if (event.container.data === this.availableFields) {
                                                                                                                                                                                                                                                  +      // don't add new Text field to the available fields that are not in the form yet
                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    const newTextField = await this.openTextConfig({ id: null });
                                                                                                                                                                                                                                                  +    if (!newTextField) {
                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    this.dummyForm.formGroup.addControl(newTextField.id, new FormControl());
                                                                                                                                                                                                                                                  +    this.dummyForm.formGroup.disable();
                                                                                                                                                                                                                                                  +    event.container.data.splice(event.currentIndex, 0, newTextField);
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    // the schema update has added the new Text field to the available fields already, remove it from there
                                                                                                                                                                                                                                                  +    this.availableFields.splice(this.availableFields.indexOf(newTextField), 1);
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  dropNewGroup(event: CdkDragDrop<any, any>) {
                                                                                                                                                                                                                                                  +    const newCol = { fields: [] };
                                                                                                                                                                                                                                                  +    this.config.fieldGroups.push(newCol);
                                                                                                                                                                                                                                                  +    event.container.data = newCol.fields;
                                                                                                                                                                                                                                                  +    this.drop(event);
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  removeGroup(i: number) {
                                                                                                                                                                                                                                                  +    const [removedFieldGroup] = this.config.fieldGroups.splice(i, 1);
                                                                                                                                                                                                                                                  +    this.initAvailableFields();
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  hideField(field: ColumnConfig, group: FieldGroup) {
                                                                                                                                                                                                                                                  +    const fieldIndex = group.fields.indexOf(field);
                                                                                                                                                                                                                                                  +    group.fields.splice(fieldIndex, 1);
                                                                                                                                                                                                                                                  +    this.initAvailableFields();
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  <div cdkDropListGroup class="overall-container flex-row">
                                                                                                                                                                                                                                                  +  <!-- FORM PREVIEW -->
                                                                                                                                                                                                                                                  +  <div class="flex-grow admin-grid-layout padding-right-regular">
                                                                                                                                                                                                                                                  +    <!-- FIELD GROUPS -->
                                                                                                                                                                                                                                                  +    <div
                                                                                                                                                                                                                                                  +      *ngFor="let group of config.fieldGroups; let i = index"
                                                                                                                                                                                                                                                  +      class="entity-form-cell admin-form-column section-container"
                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                  +      <!-- GROUP HEADER -->
                                                                                                                                                                                                                                                  +      <app-admin-section-header
                                                                                                                                                                                                                                                  +        [(title)]="group.header"
                                                                                                                                                                                                                                                  +        (remove)="removeGroup(i)"
                                                                                                                                                                                                                                                  +      ></app-admin-section-header>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +      <div
                                                                                                                                                                                                                                                  +        cdkDropList
                                                                                                                                                                                                                                                  +        [cdkDropListData]="group.fields"
                                                                                                                                                                                                                                                  +        (cdkDropListDropped)="drop($event)"
                                                                                                                                                                                                                                                  +        class="fields-group-list drop-list"
                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                  +        <!-- FIELD [start] -->
                                                                                                                                                                                                                                                  +        <div
                                                                                                                                                                                                                                                  +          *ngFor="let field of group.fields"
                                                                                                                                                                                                                                                  +          class="admin-form-field flex-row align-center"
                                                                                                                                                                                                                                                  +          cdkDrag
                                                                                                                                                                                                                                                  +          cdkDragBoundary=".overall-container"
                                                                                                                                                                                                                                                  +        >
                                                                                                                                                                                                                                                  +          <fa-icon icon="grip-vertical" size="xl" class="drag-handle"></fa-icon>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +          <div class="field-hover-buttons flex-row align-center gap-small">
                                                                                                                                                                                                                                                  +            <button
                                                                                                                                                                                                                                                  +              class="field-edit-button"
                                                                                                                                                                                                                                                  +              mat-stroked-button
                                                                                                                                                                                                                                                  +              color="accent"
                                                                                                                                                                                                                                                  +              (click)="openConfigDetails(field)"
                                                                                                                                                                                                                                                  +              i18n="Button label"
                                                                                                                                                                                                                                                  +            >
                                                                                                                                                                                                                                                  +              Edit Field
                                                                                                                                                                                                                                                  +            </button>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +            <button
                                                                                                                                                                                                                                                  +              mat-icon-button
                                                                                                                                                                                                                                                  +              color="black"
                                                                                                                                                                                                                                                  +              (click)="hideField(field, group)"
                                                                                                                                                                                                                                                  +              aria-label="Hide Field"
                                                                                                                                                                                                                                                  +              matTooltip="remove (i.e. hide) this field from the form"
                                                                                                                                                                                                                                                  +              i18n-matTooltip
                                                                                                                                                                                                                                                  +            >
                                                                                                                                                                                                                                                  +              <fa-icon icon="times"></fa-icon>
                                                                                                                                                                                                                                                  +            </button>
                                                                                                                                                                                                                                                  +          </div>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +          <div class="dummy-form-field">
                                                                                                                                                                                                                                                  +            <app-entity-field-edit
                                                                                                                                                                                                                                                  +              [field]="field"
                                                                                                                                                                                                                                                  +              [entity]="dummyEntity"
                                                                                                                                                                                                                                                  +              [form]="dummyForm"
                                                                                                                                                                                                                                                  +            ></app-entity-field-edit>
                                                                                                                                                                                                                                                  +          </div>
                                                                                                                                                                                                                                                  +        </div>
                                                                                                                                                                                                                                                  +        <!-- FIELD [end]-->
                                                                                                                                                                                                                                                  +      </div>
                                                                                                                                                                                                                                                  +    </div>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +    <!-- DROP AREA: NEW FIELD GROUP -->
                                                                                                                                                                                                                                                  +    <div class="entity-form-cell admin-form-column">
                                                                                                                                                                                                                                                  +      <div
                                                                                                                                                                                                                                                  +        cdkDropList
                                                                                                                                                                                                                                                  +        (cdkDropListDropped)="dropNewGroup($event)"
                                                                                                                                                                                                                                                  +        class="fields-group-list drop-list drop-area-hint"
                                                                                                                                                                                                                                                  +        i18n="Header of drag and drop box"
                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                  +        drop here to create new field group
                                                                                                                                                                                                                                                  +        <fa-icon
                                                                                                                                                                                                                                                  +          icon="question-circle"
                                                                                                                                                                                                                                                  +          matTooltip="You can group fields so that they will always appear next to each other while the layout is automatically adjusted to different screen sizes. Such field groups can also have a title displayed to users."
                                                                                                                                                                                                                                                  +          i18n-matTooltip
                                                                                                                                                                                                                                                  +        ></fa-icon>
                                                                                                                                                                                                                                                  +      </div>
                                                                                                                                                                                                                                                  +    </div>
                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  <!-- TOOLBAR -->
                                                                                                                                                                                                                                                  +  <mat-card class="toolbar">
                                                                                                                                                                                                                                                  +    <mat-card-content
                                                                                                                                                                                                                                                  +      cdkDropList
                                                                                                                                                                                                                                                  +      (cdkDropListDropped)="drop($event)"
                                                                                                                                                                                                                                                  +      [cdkDropListData]="availableFields"
                                                                                                                                                                                                                                                  +      class="drop-list"
                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                  +      <div class="drop-area-hint">
                                                                                                                                                                                                                                                  +        <em i18n="title for drag and drop section">hidden fields</em><br />
                                                                                                                                                                                                                                                  +        <span i18n="subtitle for drag and drop section">
                                                                                                                                                                                                                                                  +          drag & drop to / from here
                                                                                                                                                                                                                                                  +        </span>
                                                                                                                                                                                                                                                  +        <fa-icon
                                                                                                                                                                                                                                                  +          icon="question-circle"
                                                                                                                                                                                                                                                  +          matTooltip="You can remove fields from this form without deleting them completely. The fields here will not be visible or editable for users but you can display them in other views or keep them archived to not lose previously collected data. Drag a field back into the form preview to display it."
                                                                                                                                                                                                                                                  +          i18n-matTooltip
                                                                                                                                                                                                                                                  +        ></fa-icon>
                                                                                                                                                                                                                                                  +      </div>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +      <div
                                                                                                                                                                                                                                                  +        *ngFor="let field of availableFields"
                                                                                                                                                                                                                                                  +        class="admin-form-field flex-row align-center"
                                                                                                                                                                                                                                                  +        [class.admin-form-field-new]="
                                                                                                                                                                                                                                                  +          field === createNewFieldPlaceholder ||
                                                                                                                                                                                                                                                  +          field === createNewTextPlaceholder
                                                                                                                                                                                                                                                  +        "
                                                                                                                                                                                                                                                  +        cdkDrag
                                                                                                                                                                                                                                                  +        cdkDragBoundary="mat-drawer-container"
                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                  +        <fa-icon icon="grip-vertical" size="xl" class="drag-handle"></fa-icon>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +        <div>
                                                                                                                                                                                                                                                  +          <app-entity-field-label
                                                                                                                                                                                                                                                  +            [field]="field"
                                                                                                                                                                                                                                                  +            [entityType]="entityType"
                                                                                                                                                                                                                                                  +          ></app-entity-field-label>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +          <button
                                                                                                                                                                                                                                                  +            *ngIf="
                                                                                                                                                                                                                                                  +              field !== createNewFieldPlaceholder &&
                                                                                                                                                                                                                                                  +              field !== createNewTextPlaceholder
                                                                                                                                                                                                                                                  +            "
                                                                                                                                                                                                                                                  +            mat-stroked-button
                                                                                                                                                                                                                                                  +            color="accent"
                                                                                                                                                                                                                                                  +            class="field-hover-buttons field-edit-button-small"
                                                                                                                                                                                                                                                  +            (click)="openFieldConfig(field)"
                                                                                                                                                                                                                                                  +          >
                                                                                                                                                                                                                                                  +            Edit
                                                                                                                                                                                                                                                  +          </button>
                                                                                                                                                                                                                                                  +        </div>
                                                                                                                                                                                                                                                  +      </div>
                                                                                                                                                                                                                                                  +    </mat-card-content>
                                                                                                                                                                                                                                                  +  </mat-card>
                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  + ./admin-entity-form.component.scss +

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  @use "variables/colors";
                                                                                                                                                                                                                                                  +@use "variables/sizes";
                                                                                                                                                                                                                                                  +@use "mixins/grid-layout";
                                                                                                                                                                                                                                                  +@use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +$toolbar-width: 300px;
                                                                                                                                                                                                                                                  +.toolbar {
                                                                                                                                                                                                                                                  +  width: $toolbar-width;
                                                                                                                                                                                                                                                  +  padding: sizes.$small;
                                                                                                                                                                                                                                                  +  margin-right: -(sizes.$small);
                                                                                                                                                                                                                                                  +  margin-bottom: -(sizes.$small);
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  @include mat-elevation.elevation(4);
                                                                                                                                                                                                                                                  +  border-bottom-left-radius: 0;
                                                                                                                                                                                                                                                  +  border-top-right-radius: 0;
                                                                                                                                                                                                                                                  +  background-color: transparent;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.admin-grid-layout {
                                                                                                                                                                                                                                                  +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                  +    $min-block-width:
                                                                                                                                                                                                                                                  +      calc(#{sizes.$form-group-min-width} + 28px + 2 * 2 *#{sizes.$small}),
                                                                                                                                                                                                                                                  +    $max-screen-width: 414px
                                                                                                                                                                                                                                                  +  );
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.fields-group-list {
                                                                                                                                                                                                                                                  +  border: dashed 1px #ccc;
                                                                                                                                                                                                                                                  +  border-radius: 4px;
                                                                                                                                                                                                                                                  +  overflow: hidden;
                                                                                                                                                                                                                                                  +  display: block;
                                                                                                                                                                                                                                                  +  padding: 0 sizes.$small;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +.drop-list {
                                                                                                                                                                                                                                                  +  min-height: 60px;
                                                                                                                                                                                                                                                  +  height: 99%;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.admin-form-field {
                                                                                                                                                                                                                                                  +  padding: sizes.$small;
                                                                                                                                                                                                                                                  +  margin: sizes.$small auto;
                                                                                                                                                                                                                                                  +  border: dotted 1px colors.$accent;
                                                                                                                                                                                                                                                  +  border-radius: sizes.$x-small;
                                                                                                                                                                                                                                                  +  position: relative;
                                                                                                                                                                                                                                                  +  overflow: hidden;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /* draggable item must not be wider than toolbar, otherwise it cannot be dropped there due to cdkDragBoundary */
                                                                                                                                                                                                                                                  +  max-width: $toolbar-width;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +.admin-form-field:hover {
                                                                                                                                                                                                                                                  +  background-color: colors.$grey-transparent;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.admin-form-field-new,
                                                                                                                                                                                                                                                  +.admin-form-field-new:hover {
                                                                                                                                                                                                                                                  +  border-color: green;
                                                                                                                                                                                                                                                  +  background-color: rgba(0, 255, 0, 0.05);
                                                                                                                                                                                                                                                  +  font-style: italic;
                                                                                                                                                                                                                                                  +  cursor: move;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.drag-handle {
                                                                                                                                                                                                                                                  +  color: colors.$accent;
                                                                                                                                                                                                                                                  +  cursor: move;
                                                                                                                                                                                                                                                  +  min-width: 2em;
                                                                                                                                                                                                                                                  +  text-align: center;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.field-hover-buttons {
                                                                                                                                                                                                                                                  +  visibility: hidden;
                                                                                                                                                                                                                                                  +  z-index: 10;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  position: absolute;
                                                                                                                                                                                                                                                  +  /* center within parent: */
                                                                                                                                                                                                                                                  +  top: 0;
                                                                                                                                                                                                                                                  +  bottom: 0;
                                                                                                                                                                                                                                                  +  left: 0;
                                                                                                                                                                                                                                                  +  right: 0;
                                                                                                                                                                                                                                                  +  margin: auto;
                                                                                                                                                                                                                                                  +  width: fit-content;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  align-self: center;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +.admin-form-field:hover .field-hover-buttons {
                                                                                                                                                                                                                                                  +  visibility: visible;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +.field-edit-button-small {
                                                                                                                                                                                                                                                  +  left: unset;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.field-edit-button {
                                                                                                                                                                                                                                                  +  background: white !important;
                                                                                                                                                                                                                                                  +  padding: 1.5em;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.dummy-form-field {
                                                                                                                                                                                                                                                  +  width: 100%;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +.dummy-form-field ::ng-deep input,
                                                                                                                                                                                                                                                  +.dummy-form-field ::ng-deep button {
                                                                                                                                                                                                                                                  +  pointer-events: none;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +.dummy-form-field ::ng-deep mat-form-field {
                                                                                                                                                                                                                                                  +  width: 100%;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +.dummy-form-field ::ng-deep app-help-button {
                                                                                                                                                                                                                                                  +  opacity: 50%;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.drop-area-hint {
                                                                                                                                                                                                                                                  +  text-align: center;
                                                                                                                                                                                                                                                  +  padding: sizes.$small;
                                                                                                                                                                                                                                                  +  color: colors.$hint-text;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.admin-form-column {
                                                                                                                                                                                                                                                  +  border: dashed 1px #ccc;
                                                                                                                                                                                                                                                  +  padding: sizes.$small;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.cdk-drag-preview {
                                                                                                                                                                                                                                                  +  box-sizing: border-box;
                                                                                                                                                                                                                                                  +  border-radius: 4px;
                                                                                                                                                                                                                                                  +  box-shadow:
                                                                                                                                                                                                                                                  +    0 5px 5px -3px rgba(0, 0, 0, 0.2),
                                                                                                                                                                                                                                                  +    0 8px 10px 1px rgba(0, 0, 0, 0.14),
                                                                                                                                                                                                                                                  +    0 3px 14px 2px rgba(0, 0, 0, 0.12);
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.cdk-drag-placeholder {
                                                                                                                                                                                                                                                  +  opacity: 0.4;
                                                                                                                                                                                                                                                  +  border-color: green;
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.cdk-drag-animating {
                                                                                                                                                                                                                                                  +  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.drop-list.cdk-drop-list-dragging .admin-form-field:not(.cdk-drag-placeholder) {
                                                                                                                                                                                                                                                  +  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  + ../../building-blocks/admin-section-header/admin-section-header.component.scss +

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  .section-container:has(.group-remove-button:hover) {
                                                                                                                                                                                                                                                  +  border-color: rgb(255, 0, 0);
                                                                                                                                                                                                                                                  +  background-color: rgba(255, 0, 0, 0.1);
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  + ../../../common-components/entity-form/entity-form/entity-form.component.scss +

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  @use "mixins/grid-layout";
                                                                                                                                                                                                                                                  +@use "variables/sizes";
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.grid-layout {
                                                                                                                                                                                                                                                  +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                  +    $min-block-width: sizes.$form-group-min-width,
                                                                                                                                                                                                                                                  +    $max-screen-width: 414px
                                                                                                                                                                                                                                                  +  );
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +.entity-form-cell {
                                                                                                                                                                                                                                                  +  display: flex;
                                                                                                                                                                                                                                                  +  flex-direction: column;
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /* set the width of each form field to 100% in every form component that is a descendent
                                                                                                                                                                                                                                                  +     of the columns-wrapper class */
                                                                                                                                                                                                                                                  +  mat-form-field {
                                                                                                                                                                                                                                                  +    width: 100%;
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +  /* We align the photo (and only tht photo) to the center of the cell if there is one.
                                                                                                                                                                                                                                                  +     This looks better on desktop and mobile compared to an alignment to the start of the cell
                                                                                                                                                                                                                                                  +     which is the default for all other elements */
                                                                                                                                                                                                                                                  +  > app-edit-photo {
                                                                                                                                                                                                                                                  +    align-self: center;
                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityGeneralSettingsComponent.html b/documentation/components/AdminEntityGeneralSettingsComponent.html new file mode 100644 index 0000000000..440a9ad9bd --- /dev/null +++ b/documentation/components/AdminEntityGeneralSettingsComponent.html @@ -0,0 +1,1268 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    + src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.ts +

                                                                                                                                                                                                                                                    + + + + +

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Outputs
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    +constructor(fb: FormBuilder, adminEntityService: AdminEntityService) +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                    fb + FormBuilder + + No +
                                                                                                                                                                                                                                                    adminEntityService + AdminEntityService + + No +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + entityConstructor +
                                                                                                                                                                                                                                                    + Type : EntityConstructor + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + generalSettings +
                                                                                                                                                                                                                                                    + Type : EntityConfig + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + showPIIDetails +
                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Outputs

                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + generalSettingsChange +
                                                                                                                                                                                                                                                    + Type : EventEmitter<EntityConfig> + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + changeFieldAnonymization + + +
                                                                                                                                                                                                                                                    +changeFieldAnonymization(fieldSchema: EntitySchemaField, newAnonymizationValue) +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                    fieldSchema + EntitySchemaField + + No +
                                                                                                                                                                                                                                                    newAnonymizationValue + + No +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + fetchAnonymizationTableData + + +
                                                                                                                                                                                                                                                    +fetchAnonymizationTableData() +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + toggleAnonymizationTable + + +
                                                                                                                                                                                                                                                    +toggleAnonymizationTable(event: MatCheckboxChange) +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                    event + MatCheckboxChange + + No +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + basicSettingsForm + + +
                                                                                                                                                                                                                                                    + Type : FormGroup + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + fieldAnonymizationDataSource + + +
                                                                                                                                                                                                                                                    + Type : MatTableDataSource<literal type> + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + objectToLabel + + +
                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + objectToValue + + +
                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    + + + toStringAttributesOptions + + +
                                                                                                                                                                                                                                                    + Type : SimpleDropdownValue[] + +
                                                                                                                                                                                                                                                    + Default value : [] +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
                                                                                                                                                                                                                                                    +import { EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                    +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                    +  FormBuilder,
                                                                                                                                                                                                                                                    +  FormGroup,
                                                                                                                                                                                                                                                    +  FormsModule,
                                                                                                                                                                                                                                                    +  ReactiveFormsModule,
                                                                                                                                                                                                                                                    +  Validators,
                                                                                                                                                                                                                                                    +} from "@angular/forms";
                                                                                                                                                                                                                                                    +import { CommonModule, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                    +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                    +import { BasicAutocompleteComponent } from "../../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                    +import { EntityConfig } from "../../../entity/entity-config";
                                                                                                                                                                                                                                                    +import { MatTableDataSource, MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                    +  MatCheckboxChange,
                                                                                                                                                                                                                                                    +  MatCheckboxModule,
                                                                                                                                                                                                                                                    +} from "@angular/material/checkbox";
                                                                                                                                                                                                                                                    +import { MatOptionModule } from "@angular/material/core";
                                                                                                                                                                                                                                                    +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                    +import { EntitySchemaField } from "app/core/entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                    +import { AdminEntityService } from "../../admin-entity.service";
                                                                                                                                                                                                                                                    +import { StringDatatype } from "../../../basic-datatypes/string/string.datatype";
                                                                                                                                                                                                                                                    +import { HelpButtonComponent } from "../../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                    +import { MatSort } from "@angular/material/sort";
                                                                                                                                                                                                                                                    +import { EntityFieldLabelComponent } from "../../../common-components/entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                    +import { AnonymizeOptionsComponent } from "../../admin-entity-details/admin-entity-field/anonymize-options/anonymize-options.component";
                                                                                                                                                                                                                                                    +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                    +  selector: "app-admin-entity-general-settings",
                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                    +  templateUrl: "./admin-entity-general-settings.component.html",
                                                                                                                                                                                                                                                    +  styleUrls: [
                                                                                                                                                                                                                                                    +    "./admin-entity-general-settings.component.scss",
                                                                                                                                                                                                                                                    +    "../admin-entity-styles.scss",
                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                    +    MatButtonModule,
                                                                                                                                                                                                                                                    +    MatInputModule,
                                                                                                                                                                                                                                                    +    FormsModule,
                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                    +    MatTabsModule,
                                                                                                                                                                                                                                                    +    ReactiveFormsModule,
                                                                                                                                                                                                                                                    +    MatTooltipModule,
                                                                                                                                                                                                                                                    +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                    +    MatCheckboxModule,
                                                                                                                                                                                                                                                    +    MatTableModule,
                                                                                                                                                                                                                                                    +    MatOptionModule,
                                                                                                                                                                                                                                                    +    MatSelectModule,
                                                                                                                                                                                                                                                    +    CommonModule,
                                                                                                                                                                                                                                                    +    MatTooltipModule,
                                                                                                                                                                                                                                                    +    HelpButtonComponent,
                                                                                                                                                                                                                                                    +    MatSort,
                                                                                                                                                                                                                                                    +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                    +    AnonymizeOptionsComponent,
                                                                                                                                                                                                                                                    +    FaIconComponent,
                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                    +export class AdminEntityGeneralSettingsComponent implements OnInit {
                                                                                                                                                                                                                                                    +  @Input() entityConstructor: EntityConstructor;
                                                                                                                                                                                                                                                    +  @Output() generalSettingsChange: EventEmitter<EntityConfig> =
                                                                                                                                                                                                                                                    +    new EventEmitter<EntityConfig>();
                                                                                                                                                                                                                                                    +  @Input() generalSettings: EntityConfig;
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  @Input() showPIIDetails: boolean;
                                                                                                                                                                                                                                                    +  fieldAnonymizationDataSource: MatTableDataSource<{
                                                                                                                                                                                                                                                    +    key: string;
                                                                                                                                                                                                                                                    +    label: string;
                                                                                                                                                                                                                                                    +    field: EntitySchemaField;
                                                                                                                                                                                                                                                    +  }>;
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  basicSettingsForm: FormGroup;
                                                                                                                                                                                                                                                    +  toStringAttributesOptions: SimpleDropdownValue[] = [];
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                    +    private fb: FormBuilder,
                                                                                                                                                                                                                                                    +    private adminEntityService: AdminEntityService,
                                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  ngOnInit(): void {
                                                                                                                                                                                                                                                    +    this.init();
                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  private init() {
                                                                                                                                                                                                                                                    +    this.basicSettingsForm = this.fb.group({
                                                                                                                                                                                                                                                    +      label: [this.generalSettings.label, Validators.required],
                                                                                                                                                                                                                                                    +      labelPlural: [this.generalSettings.labelPlural],
                                                                                                                                                                                                                                                    +      icon: [this.generalSettings.icon],
                                                                                                                                                                                                                                                    +      toStringAttributes: [this.generalSettings.toStringAttributes],
                                                                                                                                                                                                                                                    +      hasPII: [this.generalSettings.hasPII],
                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                    +    this.showPIIDetails = this.basicSettingsForm.get("hasPII").value;
                                                                                                                                                                                                                                                    +    this.fetchAnonymizationTableData();
                                                                                                                                                                                                                                                    +    this.initToStringAttributesOptions();
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +    this.basicSettingsForm.valueChanges.subscribe((value) => {
                                                                                                                                                                                                                                                    +      this.generalSettingsChange.emit(this.basicSettingsForm.getRawValue()); // Optionally, emit the initial value
                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  fetchAnonymizationTableData() {
                                                                                                                                                                                                                                                    +    if (this.showPIIDetails) {
                                                                                                                                                                                                                                                    +      const fields = Array.from(this.entityConstructor.schema.entries())
                                                                                                                                                                                                                                                    +        .filter(([key, field]) => field.label)
                                                                                                                                                                                                                                                    +        .map(([key, field]) => ({
                                                                                                                                                                                                                                                    +          key: key,
                                                                                                                                                                                                                                                    +          label: field.label,
                                                                                                                                                                                                                                                    +          field: field,
                                                                                                                                                                                                                                                    +        }));
                                                                                                                                                                                                                                                    +      this.fieldAnonymizationDataSource = new MatTableDataSource(fields);
                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  toggleAnonymizationTable(event: MatCheckboxChange) {
                                                                                                                                                                                                                                                    +    this.showPIIDetails = event.checked;
                                                                                                                                                                                                                                                    +    this.basicSettingsForm.get("hasPII").setValue(this.showPIIDetails);
                                                                                                                                                                                                                                                    +    this.fetchAnonymizationTableData();
                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  changeFieldAnonymization(
                                                                                                                                                                                                                                                    +    fieldSchema: EntitySchemaField,
                                                                                                                                                                                                                                                    +    newAnonymizationValue,
                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                    +    fieldSchema.anonymize = newAnonymizationValue;
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +    this.adminEntityService.updateSchemaField(
                                                                                                                                                                                                                                                    +      this.entityConstructor,
                                                                                                                                                                                                                                                    +      this.fieldAnonymizationDataSource.data.find(
                                                                                                                                                                                                                                                    +        (v) => v.field === fieldSchema,
                                                                                                                                                                                                                                                    +      ).key,
                                                                                                                                                                                                                                                    +      fieldSchema,
                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +  private initToStringAttributesOptions() {
                                                                                                                                                                                                                                                    +    if (!this.generalSettings.toStringAttributes) {
                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +    const selectedOptions = this.generalSettings.toStringAttributes;
                                                                                                                                                                                                                                                    +    const unselectedOptions = Array.from(
                                                                                                                                                                                                                                                    +      this.entityConstructor.schema.entries(),
                                                                                                                                                                                                                                                    +    )
                                                                                                                                                                                                                                                    +      .filter(
                                                                                                                                                                                                                                                    +        ([key, field]) =>
                                                                                                                                                                                                                                                    +          field.dataType === StringDatatype.dataType &&
                                                                                                                                                                                                                                                    +          field.label &&
                                                                                                                                                                                                                                                    +          !selectedOptions.includes(key),
                                                                                                                                                                                                                                                    +      )
                                                                                                                                                                                                                                                    +      .map(([key, field]) => ({ key: key, label: field.label }));
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +    this.toStringAttributesOptions = [
                                                                                                                                                                                                                                                    +      ...selectedOptions.map((key) => ({
                                                                                                                                                                                                                                                    +        key: key,
                                                                                                                                                                                                                                                    +        label: this.entityConstructor.schema.get(key)?.label,
                                                                                                                                                                                                                                                    +      })),
                                                                                                                                                                                                                                                    +      ...unselectedOptions,
                                                                                                                                                                                                                                                    +    ];
                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                    +  objectToLabel = (v: SimpleDropdownValue) => v?.label;
                                                                                                                                                                                                                                                    +  objectToValue = (v: SimpleDropdownValue) => v?.key;
                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +interface SimpleDropdownValue {
                                                                                                                                                                                                                                                    +  key: string;
                                                                                                                                                                                                                                                    +  label: string;
                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    <div class="hint-banner" i18n>
                                                                                                                                                                                                                                                    +  The settings here apply to the entity type overall and take effect everywhere
                                                                                                                                                                                                                                                    +  the entity is displayed, including lists, forms and other views.
                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +<h2 i18n>General Settings of "{{ entityConstructor.label }}" Records</h2>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +<form [formGroup]="basicSettingsForm">
                                                                                                                                                                                                                                                    +  <mat-tab-group>
                                                                                                                                                                                                                                                    +    <mat-tab label="Basics" i18n-label>
                                                                                                                                                                                                                                                    +      <div class="grid-layout flex-grow margin-top-regular">
                                                                                                                                                                                                                                                    +        <div class="entity-form-cell">
                                                                                                                                                                                                                                                    +          <mat-form-field>
                                                                                                                                                                                                                                                    +            <mat-label i18n>Label</mat-label>
                                                                                                                                                                                                                                                    +            <input formControlName="label" matInput #formLabel />
                                                                                                                                                                                                                                                    +          </mat-form-field>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +          <mat-form-field floatLabel="always">
                                                                                                                                                                                                                                                    +            <mat-label>
                                                                                                                                                                                                                                                    +              <span i18n>Label (Plural)</span>
                                                                                                                                                                                                                                                    +              &nbsp;
                                                                                                                                                                                                                                                    +              <fa-icon
                                                                                                                                                                                                                                                    +                icon="question-circle"
                                                                                                                                                                                                                                                    +                matTooltip="Optionally you can define how multiple records of this entity should be called, e.g. in lists."
                                                                                                                                                                                                                                                    +                i18n-matTooltip
                                                                                                                                                                                                                                                    +              ></fa-icon>
                                                                                                                                                                                                                                                    +            </mat-label>
                                                                                                                                                                                                                                                    +            <input
                                                                                                                                                                                                                                                    +              formControlName="labelPlural"
                                                                                                                                                                                                                                                    +              matInput
                                                                                                                                                                                                                                                    +              [placeholder]="formLabel.value"
                                                                                                                                                                                                                                                    +            />
                                                                                                                                                                                                                                                    +          </mat-form-field>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +          <mat-form-field floatLabel="always">
                                                                                                                                                                                                                                                    +            <mat-label>
                                                                                                                                                                                                                                                    +              <span i18n>Icon</span>
                                                                                                                                                                                                                                                    +              &nbsp;
                                                                                                                                                                                                                                                    +              <fa-icon
                                                                                                                                                                                                                                                    +                icon="question-circle"
                                                                                                                                                                                                                                                    +                matTooltip="The icon to represent this entity type, e.g. when displaying records as a small preview block."
                                                                                                                                                                                                                                                    +                i18n-matTooltip
                                                                                                                                                                                                                                                    +              ></fa-icon>
                                                                                                                                                                                                                                                    +            </mat-label>
                                                                                                                                                                                                                                                    +            <input formControlName="icon" matInput />
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +            <mat-hint i18n>
                                                                                                                                                                                                                                                    +              Find available icon names at
                                                                                                                                                                                                                                                    +              <a
                                                                                                                                                                                                                                                    +                href="https://fontawesome.com/v6/search?o=r&m=free"
                                                                                                                                                                                                                                                    +                target="_blank"
                                                                                                                                                                                                                                                    +                >fontawesome.com</a
                                                                                                                                                                                                                                                    +              >
                                                                                                                                                                                                                                                    +            </mat-hint>
                                                                                                                                                                                                                                                    +          </mat-form-field>
                                                                                                                                                                                                                                                    +        </div>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +        <div class="entity-form-cell">
                                                                                                                                                                                                                                                    +          <mat-form-field>
                                                                                                                                                                                                                                                    +            <mat-label>
                                                                                                                                                                                                                                                    +              <span i18n>Generated Title of Record</span>
                                                                                                                                                                                                                                                    +              &nbsp;
                                                                                                                                                                                                                                                    +              <fa-icon
                                                                                                                                                                                                                                                    +                icon="question-circle"
                                                                                                                                                                                                                                                    +                matTooltip="Select the fields that should be used (in that order) to generate a simple name/title for a record. This generated title is used in previews, search and for form fields that allow to select a record of this type. (Only text fields can be used here)"
                                                                                                                                                                                                                                                    +                i18n-matTooltip
                                                                                                                                                                                                                                                    +              ></fa-icon>
                                                                                                                                                                                                                                                    +            </mat-label>
                                                                                                                                                                                                                                                    +            <app-basic-autocomplete
                                                                                                                                                                                                                                                    +              formControlName="toStringAttributes"
                                                                                                                                                                                                                                                    +              #formDataType
                                                                                                                                                                                                                                                    +              [options]="toStringAttributesOptions"
                                                                                                                                                                                                                                                    +              [optionToString]="objectToLabel"
                                                                                                                                                                                                                                                    +              [valueMapper]="objectToValue"
                                                                                                                                                                                                                                                    +              [multi]="true"
                                                                                                                                                                                                                                                    +              [reorder]="true"
                                                                                                                                                                                                                                                    +            ></app-basic-autocomplete>
                                                                                                                                                                                                                                                    +          </mat-form-field>
                                                                                                                                                                                                                                                    +        </div>
                                                                                                                                                                                                                                                    +      </div>
                                                                                                                                                                                                                                                    +    </mat-tab>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +    <!--
                                                                                                                                                                                                                                                    +        ADVANCED SETTINGS
                                                                                                                                                                                                                                                    +      -->
                                                                                                                                                                                                                                                    +    <mat-tab
                                                                                                                                                                                                                                                    +      label="Configure PII / Anonymization"
                                                                                                                                                                                                                                                    +      i18n-label
                                                                                                                                                                                                                                                    +      [disabled]="false"
                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                    +      <div class="margin-top-regular overflow-table">
                                                                                                                                                                                                                                                    +        <div class="flex-row align-center">
                                                                                                                                                                                                                                                    +          <mat-checkbox
                                                                                                                                                                                                                                                    +            [checked]="showPIIDetails"
                                                                                                                                                                                                                                                    +            (change)="toggleAnonymizationTable($event)"
                                                                                                                                                                                                                                                    +            i18n
                                                                                                                                                                                                                                                    +            >Has personal information (PII)</mat-checkbox
                                                                                                                                                                                                                                                    +          >
                                                                                                                                                                                                                                                    +          <app-help-button
                                                                                                                                                                                                                                                    +            text="If the fields of this record type contain personal, sensitive information you can mark this here. Checking this box enables the 'anonymization' feature. This allows users to anonymize records of this type instead of just archiving or deleting them."
                                                                                                                                                                                                                                                    +            i18n-text
                                                                                                                                                                                                                                                    +          ></app-help-button>
                                                                                                                                                                                                                                                    +        </div>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +        <div *ngIf="showPIIDetails">
                                                                                                                                                                                                                                                    +          <p i18n>
                                                                                                                                                                                                                                                    +            Configure how records of this type can be anonymized. Users can
                                                                                                                                                                                                                                                    +            "anonymize" a record as an alternative to just archiving it (keeping
                                                                                                                                                                                                                                                    +            all personal details) or deleting it (losing any trace of the
                                                                                                                                                                                                                                                    +            record, even in reports). Select below which fields can be
                                                                                                                                                                                                                                                    +            "retained" to keep some limited data for statistical reporting and
                                                                                                                                                                                                                                                    +            which fields have to be removed because they contain personal
                                                                                                                                                                                                                                                    +            details.
                                                                                                                                                                                                                                                    +          </p>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +          <mat-table [dataSource]="fieldAnonymizationDataSource">
                                                                                                                                                                                                                                                    +            <ng-container matColumnDef="label">
                                                                                                                                                                                                                                                    +              <mat-cell *matCellDef="let anonymizeData">
                                                                                                                                                                                                                                                    +                {{ anonymizeData.label }}
                                                                                                                                                                                                                                                    +              </mat-cell>
                                                                                                                                                                                                                                                    +            </ng-container>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +            <ng-container matColumnDef="field">
                                                                                                                                                                                                                                                    +              <mat-cell *matCellDef="let anonymizeData">
                                                                                                                                                                                                                                                    +                <app-anonymize-options
                                                                                                                                                                                                                                                    +                  [value]="anonymizeData.field.anonymize"
                                                                                                                                                                                                                                                    +                  (valueChange)="
                                                                                                                                                                                                                                                    +                    changeFieldAnonymization(anonymizeData.field, $event)
                                                                                                                                                                                                                                                    +                  "
                                                                                                                                                                                                                                                    +                ></app-anonymize-options>
                                                                                                                                                                                                                                                    +              </mat-cell>
                                                                                                                                                                                                                                                    +            </ng-container>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +            <mat-row
                                                                                                                                                                                                                                                    +              *matRowDef="let row; columns: ['label', 'field']"
                                                                                                                                                                                                                                                    +            ></mat-row>
                                                                                                                                                                                                                                                    +          </mat-table>
                                                                                                                                                                                                                                                    +        </div>
                                                                                                                                                                                                                                                    +      </div>
                                                                                                                                                                                                                                                    +    </mat-tab>
                                                                                                                                                                                                                                                    +  </mat-tab-group>
                                                                                                                                                                                                                                                    +</form>
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    + ./admin-entity-general-settings.component.scss +

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    @use "mixins/grid-layout";
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +.grid-layout {
                                                                                                                                                                                                                                                    +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                    +    $min-block-width: 250px,
                                                                                                                                                                                                                                                    +    $max-screen-width: 414px
                                                                                                                                                                                                                                                    +  );
                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                    +.entity-form-cell {
                                                                                                                                                                                                                                                    +  display: flex;
                                                                                                                                                                                                                                                    +  flex-direction: column;
                                                                                                                                                                                                                                                    +  /* set the width of each form field to 100% in every form component that is a descendent of the columns-wrapper class */
                                                                                                                                                                                                                                                    +  mat-form-field {
                                                                                                                                                                                                                                                    +    width: 100%;
                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                    +.overflow-table {
                                                                                                                                                                                                                                                    +  max-height: calc(100vh - 250px);
                                                                                                                                                                                                                                                    +  overflow: auto;
                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    + ../admin-entity-styles.scss +

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    @use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +.hint-banner {
                                                                                                                                                                                                                                                    +  background: #e8e8e8;
                                                                                                                                                                                                                                                    +  padding: 1em;
                                                                                                                                                                                                                                                    +  margin-bottom: 1em;
                                                                                                                                                                                                                                                    +  @include mat-elevation.elevation(1);
                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityListComponent.html b/documentation/components/AdminEntityListComponent.html new file mode 100644 index 0000000000..711d7a5509 --- /dev/null +++ b/documentation/components/AdminEntityListComponent.html @@ -0,0 +1,1359 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      + src/app/core/admin/admin-entity-list/admin-entity-list.component.ts +

                                                                                                                                                                                                                                                      + + + + +

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      + OnChanges + AfterViewInit +

                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + config +
                                                                                                                                                                                                                                                      + Type : EntityListConfig + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + entityConstructor +
                                                                                                                                                                                                                                                      + Type : EntityConstructor + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + drop + + +
                                                                                                                                                                                                                                                      +drop(event: CdkDragDrop, columnsArray: E[]) +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Type parameters : +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • E
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                      event + CdkDragDrop<E[] | any> + + No +
                                                                                                                                                                                                                                                      columnsArray + E[] + + No +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + newColumnGroupFactory + + +
                                                                                                                                                                                                                                                      +newColumnGroupFactory() +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Returns : GroupConfig + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + onDropListDropped + + +
                                                                                                                                                                                                                                                      +onDropListDropped() +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + onDropListEntered + + +
                                                                                                                                                                                                                                                      +onDropListEntered(undefined: CdkDragEnter) +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                      + CdkDragEnter + + No +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + removeItem + + +
                                                                                                                                                                                                                                                      +removeItem(array: E[], item: E) +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Type parameters : +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                      • E
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                      array + E[] + + No +
                                                                                                                                                                                                                                                      item + E + + No +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + updateFilters + + +
                                                                                                                                                                                                                                                      +updateFilters(filters: string[]) +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                      filters + string[] + + No +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + allFields + + +
                                                                                                                                                                                                                                                      + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + filters + + +
                                                                                                                                                                                                                                                      + Type : string[] + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      + + + + placeholder + + +
                                                                                                                                                                                                                                                      + Type : CdkDropList + +
                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                      + + @ViewChild(CdkDropList)
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      import {
                                                                                                                                                                                                                                                      +  AfterViewInit,
                                                                                                                                                                                                                                                      +  Component,
                                                                                                                                                                                                                                                      +  Input,
                                                                                                                                                                                                                                                      +  OnChanges,
                                                                                                                                                                                                                                                      +  SimpleChanges,
                                                                                                                                                                                                                                                      +  ViewChild,
                                                                                                                                                                                                                                                      +} from "@angular/core";
                                                                                                                                                                                                                                                      +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                      +import { FilterComponent } from "../../filter/filter/filter.component";
                                                                                                                                                                                                                                                      +import { MatTab, MatTabGroup } from "@angular/material/tabs";
                                                                                                                                                                                                                                                      +import { EntitiesTableComponent } from "../../common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                      +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                      +  EntityListConfig,
                                                                                                                                                                                                                                                      +  GroupConfig,
                                                                                                                                                                                                                                                      +} from "../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                      +import { EntityFieldsMenuComponent } from "../../common-components/entity-fields-menu/entity-fields-menu.component";
                                                                                                                                                                                                                                                      +import { ColumnConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                      +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                      +import { EntityFieldLabelComponent } from "../../common-components/entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                      +  CdkDrag,
                                                                                                                                                                                                                                                      +  CdkDragDrop,
                                                                                                                                                                                                                                                      +  CdkDragEnter,
                                                                                                                                                                                                                                                      +  CdkDropList,
                                                                                                                                                                                                                                                      +  CdkDropListGroup,
                                                                                                                                                                                                                                                      +  DragRef,
                                                                                                                                                                                                                                                      +  moveItemInArray,
                                                                                                                                                                                                                                                      +} from "@angular/cdk/drag-drop";
                                                                                                                                                                                                                                                      +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                      +import { MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                                      +import { MatFormField, MatLabel } from "@angular/material/form-field";
                                                                                                                                                                                                                                                      +import { MatSelect } from "@angular/material/select";
                                                                                                                                                                                                                                                      +import { AdminTabsComponent } from "../building-blocks/admin-tabs/admin-tabs.component";
                                                                                                                                                                                                                                                      +import { AdminTabTemplateDirective } from "../building-blocks/admin-tabs/admin-tab-template.directive";
                                                                                                                                                                                                                                                      +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                      +  selector: "app-admin-entity-list",
                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                      +    CommonModule,
                                                                                                                                                                                                                                                      +    FilterComponent,
                                                                                                                                                                                                                                                      +    MatTabGroup,
                                                                                                                                                                                                                                                      +    EntitiesTableComponent,
                                                                                                                                                                                                                                                      +    MatTab,
                                                                                                                                                                                                                                                      +    EntityFieldsMenuComponent,
                                                                                                                                                                                                                                                      +    MatTableModule,
                                                                                                                                                                                                                                                      +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                      +    CdkDrag,
                                                                                                                                                                                                                                                      +    FaIconComponent,
                                                                                                                                                                                                                                                      +    MatIconButton,
                                                                                                                                                                                                                                                      +    CdkDropList,
                                                                                                                                                                                                                                                      +    MatFormField,
                                                                                                                                                                                                                                                      +    MatLabel,
                                                                                                                                                                                                                                                      +    MatSelect,
                                                                                                                                                                                                                                                      +    AdminTabsComponent,
                                                                                                                                                                                                                                                      +    AdminTabTemplateDirective,
                                                                                                                                                                                                                                                      +    ViewTitleComponent,
                                                                                                                                                                                                                                                      +    CdkDropListGroup,
                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                      +  templateUrl: "./admin-entity-list.component.html",
                                                                                                                                                                                                                                                      +  styleUrls: [
                                                                                                                                                                                                                                                      +    "./admin-entity-list.component.scss",
                                                                                                                                                                                                                                                      +    "../admin-entity/admin-entity-styles.scss",
                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                      +export class AdminEntityListComponent implements OnChanges, AfterViewInit {
                                                                                                                                                                                                                                                      +  @ViewChild(CdkDropList) placeholder: CdkDropList;
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  private target: CdkDropList = null;
                                                                                                                                                                                                                                                      +  private targetIndex: number;
                                                                                                                                                                                                                                                      +  private source: CdkDropList = null;
                                                                                                                                                                                                                                                      +  private sourceIndex: number;
                                                                                                                                                                                                                                                      +  private dragRef: DragRef = null;
                                                                                                                                                                                                                                                      +  @Input() entityConstructor: EntityConstructor;
                                                                                                                                                                                                                                                      +  @Input() config: EntityListConfig;
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  allFields: ColumnConfig[] = [];
                                                                                                                                                                                                                                                      +  filters: string[];
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                      +    if (changes.config) {
                                                                                                                                                                                                                                                      +      this.config = this.config ?? {
                                                                                                                                                                                                                                                      +        entityType: this.entityConstructor.ENTITY_TYPE,
                                                                                                                                                                                                                                                      +      };
                                                                                                                                                                                                                                                      +      this.config.filters = this.config.filters ?? [];
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +      this.initColumnGroupsIfNecessary();
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +      this.initAvailableFields();
                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +  ngAfterViewInit() {
                                                                                                                                                                                                                                                      +    const placeholderElement = this.placeholder.element.nativeElement;
                                                                                                                                                                                                                                                      +    placeholderElement.style.display = "none";
                                                                                                                                                                                                                                                      +    placeholderElement.parentNode.removeChild(placeholderElement);
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                      +   * Config allows to not have columnGroups and by default then display all `columns`,
                                                                                                                                                                                                                                                      +   * create an initial columnGroup in this case to allow full editing.
                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                      +  private initColumnGroupsIfNecessary() {
                                                                                                                                                                                                                                                      +    if (!this.config.columnGroups) {
                                                                                                                                                                                                                                                      +      this.config.columnGroups = {
                                                                                                                                                                                                                                                      +        groups: [
                                                                                                                                                                                                                                                      +          {
                                                                                                                                                                                                                                                      +            name: "",
                                                                                                                                                                                                                                                      +            columns: (this.config.columns ?? []).map((c) =>
                                                                                                                                                                                                                                                      +              typeof c === "string" ? c : c.id,
                                                                                                                                                                                                                                                      +            ),
                                                                                                                                                                                                                                                      +          },
                                                                                                                                                                                                                                                      +        ],
                                                                                                                                                                                                                                                      +      };
                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  private initAvailableFields() {
                                                                                                                                                                                                                                                      +    this.allFields = [
                                                                                                                                                                                                                                                      +      ...(this.config.columns ?? []),
                                                                                                                                                                                                                                                      +      ...this.entityConstructor.schema.keys(),
                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                      +    this.filters = (this.config.filters ?? []).map((f) => f.id);
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  onDropListDropped() {
                                                                                                                                                                                                                                                      +    if (!this.target) {
                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                      +    const placeholderElement: HTMLElement =
                                                                                                                                                                                                                                                      +      this.placeholder.element.nativeElement;
                                                                                                                                                                                                                                                      +    const placeholderParentElement: HTMLElement =
                                                                                                                                                                                                                                                      +      placeholderElement.parentElement;
                                                                                                                                                                                                                                                      +    placeholderElement.style.display = "none";
                                                                                                                                                                                                                                                      +    placeholderParentElement.removeChild(placeholderElement);
                                                                                                                                                                                                                                                      +    placeholderParentElement.appendChild(placeholderElement);
                                                                                                                                                                                                                                                      +    placeholderParentElement.insertBefore(
                                                                                                                                                                                                                                                      +      this.source.element.nativeElement,
                                                                                                                                                                                                                                                      +      placeholderParentElement.children[this.sourceIndex],
                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +    if (this.placeholder._dropListRef.isDragging()) {
                                                                                                                                                                                                                                                      +      this.placeholder._dropListRef.exit(this.dragRef);
                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                      +    this.target = null;
                                                                                                                                                                                                                                                      +    this.source = null;
                                                                                                                                                                                                                                                      +    this.dragRef = null;
                                                                                                                                                                                                                                                      +    if (this.sourceIndex !== this.targetIndex) {
                                                                                                                                                                                                                                                      +      moveItemInArray(this.config.filters, this.sourceIndex, this.targetIndex);
                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  onDropListEntered({ item, container }: CdkDragEnter) {
                                                                                                                                                                                                                                                      +    if (container == this.placeholder) {
                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                      +    const placeholderElement: HTMLElement =
                                                                                                                                                                                                                                                      +      this.placeholder.element.nativeElement;
                                                                                                                                                                                                                                                      +    const sourceElement: HTMLElement = item.dropContainer.element.nativeElement;
                                                                                                                                                                                                                                                      +    const dropElement: HTMLElement = container.element.nativeElement;
                                                                                                                                                                                                                                                      +    const dragIndex: number = Array.prototype.indexOf.call(
                                                                                                                                                                                                                                                      +      dropElement.parentElement.children,
                                                                                                                                                                                                                                                      +      this.source ? placeholderElement : sourceElement,
                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                      +    const dropIndex: number = Array.prototype.indexOf.call(
                                                                                                                                                                                                                                                      +      dropElement.parentElement.children,
                                                                                                                                                                                                                                                      +      dropElement,
                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +    if (!this.source) {
                                                                                                                                                                                                                                                      +      this.sourceIndex = dragIndex;
                                                                                                                                                                                                                                                      +      this.source = item.dropContainer;
                                                                                                                                                                                                                                                      +      sourceElement.parentElement.removeChild(sourceElement);
                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                      +    this.targetIndex = dropIndex;
                                                                                                                                                                                                                                                      +    this.target = container;
                                                                                                                                                                                                                                                      +    this.dragRef = item._dragRef;
                                                                                                                                                                                                                                                      +    placeholderElement.style.display = "";
                                                                                                                                                                                                                                                      +    dropElement.parentElement.insertBefore(
                                                                                                                                                                                                                                                      +      placeholderElement,
                                                                                                                                                                                                                                                      +      dropIndex > dragIndex ? dropElement.nextSibling : dropElement,
                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                      +    this.placeholder._dropListRef.enter(
                                                                                                                                                                                                                                                      +      item._dragRef,
                                                                                                                                                                                                                                                      +      item.element.nativeElement.offsetLeft,
                                                                                                                                                                                                                                                      +      item.element.nativeElement.offsetTop,
                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  updateFilters(filters: string[]) {
                                                                                                                                                                                                                                                      +    this.filters = filters;
                                                                                                                                                                                                                                                      +    this.config.filters = filters.map(
                                                                                                                                                                                                                                                      +      (f) =>
                                                                                                                                                                                                                                                      +        this.config.filters.find(
                                                                                                                                                                                                                                                      +          (existingFilter) => existingFilter.id === f,
                                                                                                                                                                                                                                                      +        ) ?? { id: f },
                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  newColumnGroupFactory(): GroupConfig {
                                                                                                                                                                                                                                                      +    return { name: "", columns: [] };
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  removeItem<E>(array: E[], item: E) {
                                                                                                                                                                                                                                                      +    array.splice(array.indexOf(item), 1);
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  drop<E>(event: CdkDragDrop<E[], any>, columnsArray: E[]) {
                                                                                                                                                                                                                                                      +    moveItemInArray(columnsArray, event.previousIndex, event.currentIndex);
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      <div class="hint-banner" i18n>
                                                                                                                                                                                                                                                      +  You can edit how users will see the list of all records of this type. Drag and
                                                                                                                                                                                                                                                      +  drop filters and change table columns in this preview. The editor below
                                                                                                                                                                                                                                                      +  closely resembles how the list will look for users later.
                                                                                                                                                                                                                                                      +  <br />
                                                                                                                                                                                                                                                      +  To create new fields, use the "Details View" section.
                                                                                                                                                                                                                                                      +</div>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +<app-view-title [disableBackButton]="true" [displayInPlace]="true">
                                                                                                                                                                                                                                                      +  {{ entityConstructor.labelPlural }}
                                                                                                                                                                                                                                                      +</app-view-title>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +<div>
                                                                                                                                                                                                                                                      +  <div
                                                                                                                                                                                                                                                      +    cdkDropListGroup
                                                                                                                                                                                                                                                      +    class="drop-list flex-row gap-regular flex-wrap gap-large"
                                                                                                                                                                                                                                                      +  >
                                                                                                                                                                                                                                                      +    <div
                                                                                                                                                                                                                                                      +      cdkDropList
                                                                                                                                                                                                                                                      +      (cdkDropListEntered)="onDropListEntered($event)"
                                                                                                                                                                                                                                                      +      (cdkDropListDropped)="onDropListDropped()"
                                                                                                                                                                                                                                                      +    ></div>
                                                                                                                                                                                                                                                      +    <div
                                                                                                                                                                                                                                                      +      cdkDropList
                                                                                                                                                                                                                                                      +      (cdkDropListEntered)="onDropListEntered($event)"
                                                                                                                                                                                                                                                      +      (cdkDropListDropped)="onDropListDropped()"
                                                                                                                                                                                                                                                      +      *ngFor="let filter of config?.filters"
                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                      +      <div cdkDrag class="filter-field drop-item flex-row gap-small">
                                                                                                                                                                                                                                                      +        <fa-icon icon="grip-vertical" size="xl" class="drag-handle"></fa-icon>
                                                                                                                                                                                                                                                      +        <mat-form-field appearance="fill">
                                                                                                                                                                                                                                                      +          <mat-label
                                                                                                                                                                                                                                                      +            ><app-entity-field-label
                                                                                                                                                                                                                                                      +              [field]="filter"
                                                                                                                                                                                                                                                      +              [entityType]="entityConstructor"
                                                                                                                                                                                                                                                      +            ></app-entity-field-label>
                                                                                                                                                                                                                                                      +          </mat-label>
                                                                                                                                                                                                                                                      +          <mat-select disabled></mat-select>
                                                                                                                                                                                                                                                      +        </mat-form-field>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +        <fa-icon
                                                                                                                                                                                                                                                      +          icon="times"
                                                                                                                                                                                                                                                      +          class="remove-icon"
                                                                                                                                                                                                                                                      +          (click)="removeItem(filters, filter.id); updateFilters(filters)"
                                                                                                                                                                                                                                                      +        ></fa-icon>
                                                                                                                                                                                                                                                      +      </div>
                                                                                                                                                                                                                                                      +    </div>
                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  <div class="table-content-preview" i18n>
                                                                                                                                                                                                                                                      +    Add Filter:
                                                                                                                                                                                                                                                      +    <app-entity-fields-menu
                                                                                                                                                                                                                                                      +      [entityType]="entityConstructor"
                                                                                                                                                                                                                                                      +      [activeFields]="filters"
                                                                                                                                                                                                                                                      +      (activeFieldsChange)="updateFilters($event)"
                                                                                                                                                                                                                                                      +      [availableFields]="allFields"
                                                                                                                                                                                                                                                      +      icon="square-plus"
                                                                                                                                                                                                                                                      +    ></app-entity-fields-menu>
                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                      +</div>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +<div class="mat-elevation-z1">
                                                                                                                                                                                                                                                      +  <app-admin-tabs
                                                                                                                                                                                                                                                      +    [tabs]="config?.columnGroups?.groups"
                                                                                                                                                                                                                                                      +    [newTabFactory]="newColumnGroupFactory"
                                                                                                                                                                                                                                                      +  >
                                                                                                                                                                                                                                                      +    <ng-template [appAdminTabTemplate]="config?.columnGroups?.groups" let-item>
                                                                                                                                                                                                                                                      +      <div
                                                                                                                                                                                                                                                      +        class="table-header drop-list flex-row"
                                                                                                                                                                                                                                                      +        cdkDropList
                                                                                                                                                                                                                                                      +        cdkDropListOrientation="horizontal"
                                                                                                                                                                                                                                                      +        cdkDropListLockAxis="x"
                                                                                                                                                                                                                                                      +        (cdkDropListDropped)="drop($event, item.columns)"
                                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                                      +        @for (col of item["columns"]; track col) {
                                                                                                                                                                                                                                                      +          <div cdkDrag class="column-header drop-item flex-row gap-small">
                                                                                                                                                                                                                                                      +            <fa-icon icon="grip-vertical" class="drag-handle"></fa-icon>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +            <!-- TODO: for custom column overrides, this cannot display the label yet -->
                                                                                                                                                                                                                                                      +            <app-entity-field-label
                                                                                                                                                                                                                                                      +              [field]="col"
                                                                                                                                                                                                                                                      +              [entityType]="entityConstructor"
                                                                                                                                                                                                                                                      +            ></app-entity-field-label>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +            <fa-icon
                                                                                                                                                                                                                                                      +              icon="times"
                                                                                                                                                                                                                                                      +              class="remove-icon"
                                                                                                                                                                                                                                                      +              (click)="removeItem(item.columns, col)"
                                                                                                                                                                                                                                                      +            ></fa-icon>
                                                                                                                                                                                                                                                      +          </div>
                                                                                                                                                                                                                                                      +        }
                                                                                                                                                                                                                                                      +      </div>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +      <div class="table-content-preview" i18n>
                                                                                                                                                                                                                                                      +        Drag & drop table column headers. Add columns:
                                                                                                                                                                                                                                                      +        <app-entity-fields-menu
                                                                                                                                                                                                                                                      +          [entityType]="entityConstructor"
                                                                                                                                                                                                                                                      +          [(activeFields)]="item.columns"
                                                                                                                                                                                                                                                      +          [availableFields]="allFields"
                                                                                                                                                                                                                                                      +          icon="square-plus"
                                                                                                                                                                                                                                                      +        ></app-entity-fields-menu>
                                                                                                                                                                                                                                                      +      </div>
                                                                                                                                                                                                                                                      +    </ng-template>
                                                                                                                                                                                                                                                      +  </app-admin-tabs>
                                                                                                                                                                                                                                                      +</div>
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      + ./admin-entity-list.component.scss +

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      @use "variables/colors";
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.table-header {
                                                                                                                                                                                                                                                      +  height: 56px;
                                                                                                                                                                                                                                                      +  border-bottom: 1px solid #0000001f;
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +.table-content-preview {
                                                                                                                                                                                                                                                      +  font-style: italic;
                                                                                                                                                                                                                                                      +  padding: 16px;
                                                                                                                                                                                                                                                      +  color: #5f5f5f;
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.column-header {
                                                                                                                                                                                                                                                      +  padding: 8px 16px;
                                                                                                                                                                                                                                                      +  margin: auto;
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.filter-field {
                                                                                                                                                                                                                                                      +  padding: 0 16px;
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +  ::ng-deep .mat-mdc-form-field-subscript-wrapper {
                                                                                                                                                                                                                                                      +    height: 0;
                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.cdk-drag-preview {
                                                                                                                                                                                                                                                      +  box-sizing: border-box;
                                                                                                                                                                                                                                                      +  border-radius: 4px;
                                                                                                                                                                                                                                                      +  box-shadow:
                                                                                                                                                                                                                                                      +    0 5px 5px -3px rgba(0, 0, 0, 0.2),
                                                                                                                                                                                                                                                      +    0 8px 10px 1px rgba(0, 0, 0, 0.14),
                                                                                                                                                                                                                                                      +    0 3px 14px 2px rgba(0, 0, 0, 0.12);
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.cdk-drag-placeholder {
                                                                                                                                                                                                                                                      +  opacity: 0;
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.cdk-drag-animating {
                                                                                                                                                                                                                                                      +  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.drop-list.cdk-drop-list-dragging .drop-item:not(.cdk-drag-placeholder) {
                                                                                                                                                                                                                                                      +  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.drag-handle {
                                                                                                                                                                                                                                                      +  cursor: move;
                                                                                                                                                                                                                                                      +  margin: auto;
                                                                                                                                                                                                                                                      +  color: colors.$accent;
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +app-entity-fields-menu {
                                                                                                                                                                                                                                                      +  color: colors.$accent;
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.remove-icon {
                                                                                                                                                                                                                                                      +  cursor: pointer;
                                                                                                                                                                                                                                                      +  margin: auto;
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +.drop-item:has(.remove-icon:hover) {
                                                                                                                                                                                                                                                      +  color: rgb(255, 0, 0);
                                                                                                                                                                                                                                                      +  background-color: rgba(255, 0, 0, 0.1);
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      + ../admin-entity/admin-entity-styles.scss +

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      @use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +.hint-banner {
                                                                                                                                                                                                                                                      +  background: #e8e8e8;
                                                                                                                                                                                                                                                      +  padding: 1em;
                                                                                                                                                                                                                                                      +  margin-bottom: 1em;
                                                                                                                                                                                                                                                      +  @include mat-elevation.elevation(1);
                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityPanelComponentComponent.html b/documentation/components/AdminEntityPanelComponentComponent.html new file mode 100644 index 0000000000..90792639cc --- /dev/null +++ b/documentation/components/AdminEntityPanelComponentComponent.html @@ -0,0 +1,419 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        + src/app/core/admin/admin-entity-details/admin-entity-panel-component/admin-entity-panel-component.component.ts +

                                                                                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                        + + config +
                                                                                                                                                                                                                                                        + Type : PanelComponent + +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                        + + entityType +
                                                                                                                                                                                                                                                        + Type : EntityConstructor + +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                        +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                        +import { PanelComponent } from "../../../entity-details/EntityDetailsConfig";
                                                                                                                                                                                                                                                        +import { EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                        +  selector: "app-admin-entity-panel-component",
                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                        +  imports: [CommonModule],
                                                                                                                                                                                                                                                        +  templateUrl: "./admin-entity-panel-component.component.html",
                                                                                                                                                                                                                                                        +  styleUrl: "./admin-entity-panel-component.component.scss",
                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                        +export class AdminEntityPanelComponentComponent {
                                                                                                                                                                                                                                                        +  @Input() config: PanelComponent;
                                                                                                                                                                                                                                                        +  @Input() entityType: EntityConstructor;
                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        <div class="padding-regular">
                                                                                                                                                                                                                                                        +  <p>[ {{ config.component }} ]</p>
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +  <p style="font-size: 0.9em; color: darkgray" i18n>
                                                                                                                                                                                                                                                        +    Editing advanced sub-sections is not supported yet in this preview.
                                                                                                                                                                                                                                                        +  </p>
                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminEntityTypesComponent.html b/documentation/components/AdminEntityTypesComponent.html new file mode 100644 index 0000000000..b818a526a1 --- /dev/null +++ b/documentation/components/AdminEntityTypesComponent.html @@ -0,0 +1,858 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          + src/app/core/admin/admin-entity-types/admin-entity-types.component.ts +

                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Manage the configuration of all entity types. +Currently, this only serves as a utility for internal use, speeding up setup processes.

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          TODO: This component is only a raw prototype! Needs further concept and implementation.

                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          + OnInit +

                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          +constructor(entities: EntityRegistry, entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                          entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                          entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          + + + Async + create + + +
                                                                                                                                                                                                                                                          + + create() +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          + + + Protected + loadEntityTypes + + +
                                                                                                                                                                                                                                                          + + loadEntityTypes(onlyUserFacing) +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          NameOptionalDefault value
                                                                                                                                                                                                                                                          onlyUserFacing + No + + true +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                          + Type : string[] + +
                                                                                                                                                                                                                                                          + Default value : ["label", "icon"] +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          + + + entityTypes + + +
                                                                                                                                                                                                                                                          + Type : EntityConstructor[] + +
                                                                                                                                                                                                                                                          + Default value : [] +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                          +  MatCell,
                                                                                                                                                                                                                                                          +  MatCellDef,
                                                                                                                                                                                                                                                          +  MatColumnDef,
                                                                                                                                                                                                                                                          +  MatHeaderCell,
                                                                                                                                                                                                                                                          +  MatHeaderCellDef,
                                                                                                                                                                                                                                                          +  MatHeaderRow,
                                                                                                                                                                                                                                                          +  MatHeaderRowDef,
                                                                                                                                                                                                                                                          +  MatRow,
                                                                                                                                                                                                                                                          +  MatRowDef,
                                                                                                                                                                                                                                                          +  MatTable,
                                                                                                                                                                                                                                                          +} from "@angular/material/table";
                                                                                                                                                                                                                                                          +import { MatButton } from "@angular/material/button";
                                                                                                                                                                                                                                                          +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                          +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                          +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                          +import { RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                          +import { generateIdFromLabel } from "../../../utils/generate-id-from-label/generate-id-from-label";
                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                          +import { EntityConfig } from "../../entity/entity-config";
                                                                                                                                                                                                                                                          +import { EntityDetailsConfig } from "../../entity-details/EntityDetailsConfig";
                                                                                                                                                                                                                                                          +import { EntityListConfig } from "../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                          +import { Config } from "../../config/config";
                                                                                                                                                                                                                                                          +import { EntityConfigService } from "../../entity/entity-config.service";
                                                                                                                                                                                                                                                          +import { DynamicComponentConfig } from "../../config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                          + * Manage the configuration of all entity types.
                                                                                                                                                                                                                                                          + * Currently, this only serves as a utility for internal use, speeding up setup processes.
                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                          + * TODO: This component is only a raw prototype! Needs further concept and implementation.
                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                          +  selector: "app-admin-entity-types",
                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                          +    MatHeaderRow,
                                                                                                                                                                                                                                                          +    MatHeaderRowDef,
                                                                                                                                                                                                                                                          +    MatRow,
                                                                                                                                                                                                                                                          +    MatRowDef,
                                                                                                                                                                                                                                                          +    MatCell,
                                                                                                                                                                                                                                                          +    MatHeaderCell,
                                                                                                                                                                                                                                                          +    MatColumnDef,
                                                                                                                                                                                                                                                          +    MatTable,
                                                                                                                                                                                                                                                          +    MatButton,
                                                                                                                                                                                                                                                          +    MatCellDef,
                                                                                                                                                                                                                                                          +    MatHeaderCellDef,
                                                                                                                                                                                                                                                          +    FaIconComponent,
                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                          +    RouterLink,
                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                          +  templateUrl: "./admin-entity-types.component.html",
                                                                                                                                                                                                                                                          +  styleUrl: "./admin-entity-types.component.scss",
                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                          +export class AdminEntityTypesComponent implements OnInit {
                                                                                                                                                                                                                                                          +  entityTypes: EntityConstructor[] = [];
                                                                                                                                                                                                                                                          +  columnsToDisplay: string[] = ["label", "icon"];
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                          +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                          +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                          +  ) {}
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  ngOnInit() {
                                                                                                                                                                                                                                                          +    this.loadEntityTypes();
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  protected loadEntityTypes(onlyUserFacing = true) {
                                                                                                                                                                                                                                                          +    this.entityTypes = this.entities
                                                                                                                                                                                                                                                          +      .getEntityTypes(onlyUserFacing)
                                                                                                                                                                                                                                                          +      .map((e) => e.value);
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  async create() {
                                                                                                                                                                                                                                                          +    const name = prompt("Please enter entity type name:");
                                                                                                                                                                                                                                                          +    if (!name) {
                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                          +    const id = generateIdFromLabel(name);
                                                                                                                                                                                                                                                          +    if (this.entityTypeExists(id)) {
                                                                                                                                                                                                                                                          +      alert("Entity type already exists.");
                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +    // save default entity schema
                                                                                                                                                                                                                                                          +    await this.saveDefaultEntityConfig(
                                                                                                                                                                                                                                                          +      id,
                                                                                                                                                                                                                                                          +      this.getDefaultEntityConfig(id, name),
                                                                                                                                                                                                                                                          +      this.getDefaultDetailsViewConfig(id),
                                                                                                                                                                                                                                                          +      this.getDefaultListViewConfig(id),
                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  private entityTypeExists(id: string) {
                                                                                                                                                                                                                                                          +    return Array.from(this.entities.keys()).some(
                                                                                                                                                                                                                                                          +      (key) => key.toLowerCase() === id.toLowerCase(),
                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  private async saveDefaultEntityConfig(
                                                                                                                                                                                                                                                          +    id: string,
                                                                                                                                                                                                                                                          +    entityConfig: EntityConfig,
                                                                                                                                                                                                                                                          +    detailsViewConfig: DynamicComponentConfig,
                                                                                                                                                                                                                                                          +    listViewConfig: DynamicComponentConfig,
                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                          +    const originalConfig = await this.entityMapper.load(
                                                                                                                                                                                                                                                          +      Config,
                                                                                                                                                                                                                                                          +      Config.CONFIG_KEY,
                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                          +    const newConfig = originalConfig.copy();
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +    newConfig.data[EntityConfigService.PREFIX_ENTITY_CONFIG + id] =
                                                                                                                                                                                                                                                          +      entityConfig;
                                                                                                                                                                                                                                                          +    newConfig.data[EntityConfigService.getDetailsViewId(entityConfig)] =
                                                                                                                                                                                                                                                          +      detailsViewConfig;
                                                                                                                                                                                                                                                          +    newConfig.data[EntityConfigService.getListViewId(entityConfig)] =
                                                                                                                                                                                                                                                          +      listViewConfig;
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +    await this.entityMapper.save(newConfig);
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  private getDefaultEntityConfig(
                                                                                                                                                                                                                                                          +    entityTypeId: string,
                                                                                                                                                                                                                                                          +    name: string,
                                                                                                                                                                                                                                                          +  ): EntityConfig {
                                                                                                                                                                                                                                                          +    return {
                                                                                                                                                                                                                                                          +      label: name,
                                                                                                                                                                                                                                                          +      route: entityTypeId,
                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  private getDefaultDetailsViewConfig(
                                                                                                                                                                                                                                                          +    entityType: string,
                                                                                                                                                                                                                                                          +  ): DynamicComponentConfig<EntityDetailsConfig> {
                                                                                                                                                                                                                                                          +    return {
                                                                                                                                                                                                                                                          +      component: "EntityDetails",
                                                                                                                                                                                                                                                          +      config: {
                                                                                                                                                                                                                                                          +        entityType: entityType,
                                                                                                                                                                                                                                                          +        panels: [
                                                                                                                                                                                                                                                          +          {
                                                                                                                                                                                                                                                          +            title: "Basic Information",
                                                                                                                                                                                                                                                          +            components: [
                                                                                                                                                                                                                                                          +              {
                                                                                                                                                                                                                                                          +                title: "",
                                                                                                                                                                                                                                                          +                component: "Form",
                                                                                                                                                                                                                                                          +                config: {
                                                                                                                                                                                                                                                          +                  fieldGroups: [{ fields: [] }],
                                                                                                                                                                                                                                                          +                },
                                                                                                                                                                                                                                                          +              },
                                                                                                                                                                                                                                                          +            ],
                                                                                                                                                                                                                                                          +          },
                                                                                                                                                                                                                                                          +        ],
                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  private getDefaultListViewConfig(
                                                                                                                                                                                                                                                          +    entityType: string,
                                                                                                                                                                                                                                                          +  ): DynamicComponentConfig<EntityListConfig> {
                                                                                                                                                                                                                                                          +    return {
                                                                                                                                                                                                                                                          +      component: "EntityList",
                                                                                                                                                                                                                                                          +      config: {
                                                                                                                                                                                                                                                          +        entityType: entityType,
                                                                                                                                                                                                                                                          +        columnGroups: {
                                                                                                                                                                                                                                                          +          default: "Overview",
                                                                                                                                                                                                                                                          +          mobile: "Overview",
                                                                                                                                                                                                                                                          +          groups: [
                                                                                                                                                                                                                                                          +            {
                                                                                                                                                                                                                                                          +              name: "Overview",
                                                                                                                                                                                                                                                          +              columns: [],
                                                                                                                                                                                                                                                          +            },
                                                                                                                                                                                                                                                          +          ],
                                                                                                                                                                                                                                                          +        },
                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          <p style="color: red">
                                                                                                                                                                                                                                                          +  This is an internal server admin preview and not stable functionality yet.
                                                                                                                                                                                                                                                          +</p>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +<div class="flex-row gap-regular">
                                                                                                                                                                                                                                                          +  <button mat-raised-button color="accent" (click)="create()">
                                                                                                                                                                                                                                                          +    Add New Entity Type
                                                                                                                                                                                                                                                          +  </button>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  <button mat-stroked-button color="accent" (click)="loadEntityTypes(false)">
                                                                                                                                                                                                                                                          +    Also load internal types
                                                                                                                                                                                                                                                          +  </button>
                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +<table mat-table [dataSource]="entityTypes">
                                                                                                                                                                                                                                                          +  <ng-container matColumnDef="label">
                                                                                                                                                                                                                                                          +    <th mat-header-cell *matHeaderCellDef class="table-header">Entity Type</th>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +    <td mat-cell *matCellDef="let row">
                                                                                                                                                                                                                                                          +      {{ row.label }}
                                                                                                                                                                                                                                                          +    </td>
                                                                                                                                                                                                                                                          +  </ng-container>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  <ng-container matColumnDef="icon">
                                                                                                                                                                                                                                                          +    <th mat-header-cell *matHeaderCellDef class="table-header">Icon</th>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +    <td mat-cell *matCellDef="let row">
                                                                                                                                                                                                                                                          +      <fa-icon *ngIf="row.icon" [icon]="row.icon"></fa-icon>
                                                                                                                                                                                                                                                          +    </td>
                                                                                                                                                                                                                                                          +  </ng-container>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +  <tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
                                                                                                                                                                                                                                                          +  <tr
                                                                                                                                                                                                                                                          +    mat-row
                                                                                                                                                                                                                                                          +    *matRowDef="let row; columns: columnsToDisplay"
                                                                                                                                                                                                                                                          +    [routerLink]="['/admin', 'entity', row.ENTITY_TYPE]"
                                                                                                                                                                                                                                                          +    style="cursor: pointer"
                                                                                                                                                                                                                                                          +  ></tr>
                                                                                                                                                                                                                                                          +</table>
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminOverviewComponent.html b/documentation/components/AdminOverviewComponent.html new file mode 100644 index 0000000000..29e81c0206 --- /dev/null +++ b/documentation/components/AdminOverviewComponent.html @@ -0,0 +1,1204 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            + src/app/core/admin/admin-overview/admin-overview.component.ts +

                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Admin GUI giving administrative users different options/actions.

                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            +constructor(alertService: AlertService, backupService: BackupService, downloadService: DownloadService, db: Database, confirmationDialog: ConfirmationDialogService, snackBar: MatSnackBar, configService: ConfigService, adminOverviewService: AdminOverviewService) +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                            alertService + AlertService + + No +
                                                                                                                                                                                                                                                            backupService + BackupService + + No +
                                                                                                                                                                                                                                                            downloadService + DownloadService + + No +
                                                                                                                                                                                                                                                            db + Database + + No +
                                                                                                                                                                                                                                                            confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                            snackBar + MatSnackBar + + No +
                                                                                                                                                                                                                                                            configService + ConfigService + + No +
                                                                                                                                                                                                                                                            adminOverviewService + AdminOverviewService + + No +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + Async + clearDatabase + + +
                                                                                                                                                                                                                                                            + + clearDatabase() +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Reset the database removing all entities except user accounts.

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + debugDatabase + + +
                                                                                                                                                                                                                                                            +debugDatabase() +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Send a reference of the PouchDB to the browser's developer console for real-time debugging.

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + Async + downloadConfigClick + + +
                                                                                                                                                                                                                                                            + + downloadConfigClick() +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + Async + loadBackup + + +
                                                                                                                                                                                                                                                            + + loadBackup(inputEvent: Event) +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Reset the database to the state from the loaded backup file.

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                                                                                            inputEvent + Event + + No + +

                                                                                                                                                                                                                                                            for the input where a file has been selected

                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + Async + saveBackup + + +
                                                                                                                                                                                                                                                            + + saveBackup() +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Download a full backup of the database as (json) file.

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + Async + saveCsvExport + + +
                                                                                                                                                                                                                                                            + + saveCsvExport() +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            Download a full export of the database as csv file.

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + Async + uploadConfigFile + + +
                                                                                                                                                                                                                                                            + + uploadConfigFile(inputEvent: Event) +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                            inputEvent + Event + + No +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            + + + alerts + + +
                                                                                                                                                                                                                                                            + Type : ExtendedAlertConfig[] + +
                                                                                                                                                                                                                                                            + Default value : [] +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            all alerts

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                            +import { AlertService } from "../../alerts/alert.service";
                                                                                                                                                                                                                                                            +import { BackupService } from "../backup/backup.service";
                                                                                                                                                                                                                                                            +import { ConfirmationDialogService } from "../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                            +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                            +import { ConfigService } from "../../config/config.service";
                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                            +import { readFile } from "../../../utils/utils";
                                                                                                                                                                                                                                                            +import { Database } from "../../database/database";
                                                                                                                                                                                                                                                            +import { ExtendedAlertConfig } from "../../alerts/alert-config";
                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                            +import { RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                            +import { DatePipe, NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                            +import { DownloadService } from "../../export/download-service/download.service";
                                                                                                                                                                                                                                                            +import { MatListModule } from "@angular/material/list";
                                                                                                                                                                                                                                                            +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                            +import { AdminOverviewService } from "./admin-overview.service";
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                            + * Admin GUI giving administrative users different options/actions.
                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                            +@RouteTarget("Admin")
                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                            +  selector: "app-admin-overview",
                                                                                                                                                                                                                                                            +  templateUrl: "./admin-overview.component.html",
                                                                                                                                                                                                                                                            +  styleUrls: ["./admin-overview.component.scss"],
                                                                                                                                                                                                                                                            +  imports: [MatButtonModule, RouterLink, NgForOf, DatePipe, MatListModule],
                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                            +export class AdminOverviewComponent implements OnInit {
                                                                                                                                                                                                                                                            +  /** all alerts */
                                                                                                                                                                                                                                                            +  alerts: ExtendedAlertConfig[] = [];
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                            +    private alertService: AlertService,
                                                                                                                                                                                                                                                            +    private backupService: BackupService,
                                                                                                                                                                                                                                                            +    private downloadService: DownloadService,
                                                                                                                                                                                                                                                            +    private db: Database,
                                                                                                                                                                                                                                                            +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                            +    private snackBar: MatSnackBar,
                                                                                                                                                                                                                                                            +    private configService: ConfigService,
                                                                                                                                                                                                                                                            +    protected adminOverviewService: AdminOverviewService,
                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  ngOnInit() {
                                                                                                                                                                                                                                                            +    this.alerts = this.alertService.alerts;
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                            +   * Send a reference of the PouchDB to the browser's developer console for real-time debugging.
                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                            +  debugDatabase() {
                                                                                                                                                                                                                                                            +    console.log(this.db);
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                            +   * Download a full backup of the database as (json) file.
                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                            +  async saveBackup() {
                                                                                                                                                                                                                                                            +    const backup = await this.backupService.getDatabaseExport();
                                                                                                                                                                                                                                                            +    await this.downloadService.triggerDownload(backup, "json", "backup");
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                            +   * Download a full export of the database as csv file.
                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                            +  async saveCsvExport() {
                                                                                                                                                                                                                                                            +    const backup = await this.backupService.getDatabaseExport();
                                                                                                                                                                                                                                                            +    await this.downloadService.triggerDownload(backup, "csv", "export");
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  async downloadConfigClick() {
                                                                                                                                                                                                                                                            +    const configString = this.configService.exportConfig();
                                                                                                                                                                                                                                                            +    await this.downloadService.triggerDownload(configString, "json", "config");
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  async uploadConfigFile(inputEvent: Event) {
                                                                                                                                                                                                                                                            +    const loadedFile = await readFile(this.getFileFromInputEvent(inputEvent));
                                                                                                                                                                                                                                                            +    await this.configService.saveConfig(JSON.parse(loadedFile));
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                            +   * Reset the database to the state from the loaded backup file.
                                                                                                                                                                                                                                                            +   * @param inputEvent for the input where a file has been selected
                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                            +  async loadBackup(inputEvent: Event) {
                                                                                                                                                                                                                                                            +    const restorePoint = await this.backupService.getDatabaseExport();
                                                                                                                                                                                                                                                            +    const dataToBeRestored = JSON.parse(
                                                                                                                                                                                                                                                            +      await readFile(this.getFileFromInputEvent(inputEvent)),
                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    const confirmed = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                            +      `Overwrite complete database?`,
                                                                                                                                                                                                                                                            +      `Are you sure you want to restore this backup? This will
                                                                                                                                                                                                                                                            +      delete all ${restorePoint.length} existing records,
                                                                                                                                                                                                                                                            +      restoring ${dataToBeRestored.length} records from the loaded file.`,
                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    if (!confirmed) {
                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    await this.backupService.clearDatabase();
                                                                                                                                                                                                                                                            +    await this.backupService.restoreData(dataToBeRestored, true);
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    const snackBarRef = this.snackBar.open(`Backup restored`, "Undo", {
                                                                                                                                                                                                                                                            +      duration: 8000,
                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                            +    snackBarRef
                                                                                                                                                                                                                                                            +      .onAction()
                                                                                                                                                                                                                                                            +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                            +      .subscribe(async () => {
                                                                                                                                                                                                                                                            +        await this.backupService.clearDatabase();
                                                                                                                                                                                                                                                            +        await this.backupService.restoreData(restorePoint, true);
                                                                                                                                                                                                                                                            +      });
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  private getFileFromInputEvent(inputEvent: Event): Blob {
                                                                                                                                                                                                                                                            +    const target = inputEvent.target as HTMLInputElement;
                                                                                                                                                                                                                                                            +    return target.files[0];
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                            +   * Reset the database removing all entities except user accounts.
                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                            +  async clearDatabase() {
                                                                                                                                                                                                                                                            +    const restorePoint = await this.backupService.getDatabaseExport();
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    const confirmed = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                            +      `Empty complete database?`,
                                                                                                                                                                                                                                                            +      `Are you sure you want to clear the database? This will delete all existing records in the database!`,
                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    if (!confirmed) {
                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    await this.backupService.clearDatabase();
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +    const snackBarRef = this.snackBar.open(`Import completed`, "Undo", {
                                                                                                                                                                                                                                                            +      duration: 8000,
                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                            +    snackBarRef
                                                                                                                                                                                                                                                            +      .onAction()
                                                                                                                                                                                                                                                            +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                            +      .subscribe(async () => {
                                                                                                                                                                                                                                                            +        await this.backupService.restoreData(restorePoint, true);
                                                                                                                                                                                                                                                            +      });
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            <h1>Administration & Configuration</h1>
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<p style="font-weight: bold; font-style: italic">
                                                                                                                                                                                                                                                            +  Warning: This section is intended for system administrators only. Make sure
                                                                                                                                                                                                                                                            +  you know what you are doing.
                                                                                                                                                                                                                                                            +</p>
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<hr />
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<h2>Shortcuts</h2>
                                                                                                                                                                                                                                                            +<mat-nav-list>
                                                                                                                                                                                                                                                            +  @for (item of adminOverviewService.menuItems; track item) {
                                                                                                                                                                                                                                                            +    <mat-list-item [routerLink]="[item.link]">{{ item.label }}</mat-list-item>
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +</mat-nav-list>
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<hr />
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<h2>Backup</h2>
                                                                                                                                                                                                                                                            +<p>
                                                                                                                                                                                                                                                            +  <button (click)="saveBackup()" mat-stroked-button>
                                                                                                                                                                                                                                                            +    Download Backup (.json)
                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                            +  &nbsp;
                                                                                                                                                                                                                                                            +  <button (click)="backupImport.click()" mat-stroked-button>
                                                                                                                                                                                                                                                            +    Restore Backup (.json)
                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                            +  <input #backupImport type="file" hidden (change)="loadBackup($event)" />
                                                                                                                                                                                                                                                            +</p>
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<br />
                                                                                                                                                                                                                                                            +<hr />
                                                                                                                                                                                                                                                            +<h2>Export</h2>
                                                                                                                                                                                                                                                            +<p>
                                                                                                                                                                                                                                                            +  <button (click)="saveCsvExport()" mat-stroked-button>
                                                                                                                                                                                                                                                            +    Download whole database (.csv)
                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                            +</p>
                                                                                                                                                                                                                                                            +<br />
                                                                                                                                                                                                                                                            +<hr />
                                                                                                                                                                                                                                                            +<h2>Application Configuration</h2>
                                                                                                                                                                                                                                                            +<p>
                                                                                                                                                                                                                                                            +  <button (click)="downloadConfigClick()" mat-stroked-button>
                                                                                                                                                                                                                                                            +    Download configuration
                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                            +  &nbsp;
                                                                                                                                                                                                                                                            +  <button (click)="configImport.click()" mat-stroked-button>
                                                                                                                                                                                                                                                            +    Upload new configuration
                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                            +  <input #configImport type="file" hidden (change)="uploadConfigFile($event)" />
                                                                                                                                                                                                                                                            +  &nbsp;
                                                                                                                                                                                                                                                            +  <button routerLink="config-import" mat-stroked-button>
                                                                                                                                                                                                                                                            +    Generate configuration from spreadsheet
                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                            +</p>
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<br />
                                                                                                                                                                                                                                                            +<hr />
                                                                                                                                                                                                                                                            +<h2>Debug the PouchDB</h2>
                                                                                                                                                                                                                                                            +<p>
                                                                                                                                                                                                                                                            +  <button (click)="debugDatabase()" mat-stroked-button>
                                                                                                                                                                                                                                                            +    Send to console.log()
                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                            +</p>
                                                                                                                                                                                                                                                            +<p>
                                                                                                                                                                                                                                                            +  <button (click)="clearDatabase()" mat-stroked-button>Empty Database</button>
                                                                                                                                                                                                                                                            +</p>
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +<br />
                                                                                                                                                                                                                                                            +<hr />
                                                                                                                                                                                                                                                            +<h2 id="alert-log-heading">Alert Log</h2>
                                                                                                                                                                                                                                                            +<table aria-describedby="alert-log-heading" class="admin-table">
                                                                                                                                                                                                                                                            +  <thead>
                                                                                                                                                                                                                                                            +    <th class="shrink-width">Timestamp</th>
                                                                                                                                                                                                                                                            +    <th class="shrink-width">Type</th>
                                                                                                                                                                                                                                                            +    <th>Message</th>
                                                                                                                                                                                                                                                            +  </thead>
                                                                                                                                                                                                                                                            +  <tbody>
                                                                                                                                                                                                                                                            +    <tr *ngFor="let alert of alerts.reverse()">
                                                                                                                                                                                                                                                            +      <td>{{ alert.timestamp | date: "medium" }}</td>
                                                                                                                                                                                                                                                            +      <td>{{ alert.type }}</td>
                                                                                                                                                                                                                                                            +      <td>{{ alert.message }}</td>
                                                                                                                                                                                                                                                            +    </tr>
                                                                                                                                                                                                                                                            +  </tbody>
                                                                                                                                                                                                                                                            +</table>
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            + ./admin-overview.component.scss +

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            @use "../../../../styles/variables/colors";
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +.admin-table {
                                                                                                                                                                                                                                                            +  border-collapse: collapse;
                                                                                                                                                                                                                                                            +  width: 100%;
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  > thead > th {
                                                                                                                                                                                                                                                            +    padding: 10px 12px;
                                                                                                                                                                                                                                                            +    text-align: left;
                                                                                                                                                                                                                                                            +    vertical-align: bottom;
                                                                                                                                                                                                                                                            +    font-weight: 400;
                                                                                                                                                                                                                                                            +    color: colors.$muted-background;
                                                                                                                                                                                                                                                            +    text-transform: uppercase;
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  > tbody > tr > td {
                                                                                                                                                                                                                                                            +    padding: 10px 12px;
                                                                                                                                                                                                                                                            +    vertical-align: top;
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +  > tbody > tr {
                                                                                                                                                                                                                                                            +    border-top: 1px solid colors.$disabled;
                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +.shrink-width {
                                                                                                                                                                                                                                                            +  width: 15%;
                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminSectionHeaderComponent.html b/documentation/components/AdminSectionHeaderComponent.html new file mode 100644 index 0000000000..cc505f8349 --- /dev/null +++ b/documentation/components/AdminSectionHeaderComponent.html @@ -0,0 +1,714 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              + src/app/core/admin/building-blocks/admin-section-header/admin-section-header.component.ts +

                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Simple building block for UI Builder for a section title including button to remove the section.

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Supports two-way binding for the title.

                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              add css class "section-container" and import this component's scss in the parent's styleUrl +to get visual highlighting on hovering over the remove button, +or copy the style from there. +LIMITATION: multiple hierarchies each using this have to define seperate container classes, otherwise styles will leak

                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Outputs
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              +constructor(confirmationDialog: ConfirmationDialogService) +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                              confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              + + disableConfirmation +
                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              disable the confirmation dialog displayed before a remove output is emitted

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              + + label +
                                                                                                                                                                                                                                                              + Type : any + +
                                                                                                                                                                                                                                                              + Default value : $localize`:Admin UI - Config Section Header form field label:Title` +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              overwrite the label (default: "title") displayed for the form field

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              + + title +
                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              Outputs

                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              + + remove +
                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              + + titleChange +
                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              supports two-way data binding for the editable title: <app-admin-section-header [(title)]="section.title"

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              + + + Async + removeSection + + +
                                                                                                                                                                                                                                                              + + removeSection() +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                                              +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                              +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                              +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                              +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                              +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                              +import { ConfirmationDialogService } from "../../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                              + * Simple building block for UI Builder for a section title including button to remove the section.
                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                              + * Supports two-way binding for the title.
                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                              + * add css class "section-container" and import this component's scss in the parent's styleUrl
                                                                                                                                                                                                                                                              + * to get visual highlighting on hovering over the remove button,
                                                                                                                                                                                                                                                              + * or copy the style from there.
                                                                                                                                                                                                                                                              + * LIMITATION: multiple hierarchies each using this have to define seperate container classes, otherwise styles will leak
                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                              +  selector: "app-admin-section-header",
                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                              +    CommonModule,
                                                                                                                                                                                                                                                              +    FaIconComponent,
                                                                                                                                                                                                                                                              +    FormsModule,
                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                              +    MatFormFieldModule,
                                                                                                                                                                                                                                                              +    MatInputModule,
                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                              +  templateUrl: "./admin-section-header.component.html",
                                                                                                                                                                                                                                                              +  styleUrl: "./admin-section-header.component.scss",
                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                              +export class AdminSectionHeaderComponent {
                                                                                                                                                                                                                                                              +  @Input() title: string;
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +  /** supports two-way data binding for the editable title: `<app-admin-section-header [(title)]="section.title"` */
                                                                                                                                                                                                                                                              +  @Output() titleChange = new EventEmitter<string>();
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +  @Output() remove = new EventEmitter();
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +  /** disable the confirmation dialog displayed before a remove output is emitted */
                                                                                                                                                                                                                                                              +  @Input() disableConfirmation = false;
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +  /** overwrite the label (default: "title") displayed for the form field */
                                                                                                                                                                                                                                                              +  @Input()
                                                                                                                                                                                                                                                              +  label = $localize`:Admin UI - Config Section Header form field label:Title`;
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +  constructor(private confirmationDialog: ConfirmationDialogService) {}
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +  async removeSection() {
                                                                                                                                                                                                                                                              +    if (this.disableConfirmation) {
                                                                                                                                                                                                                                                              +      this.remove.emit();
                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +    const confirmation = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                              +      $localize`:Admin UI - Delete Section Confirmation Title:Delete Section?`,
                                                                                                                                                                                                                                                              +      $localize`:Admin UI - Delete Section Confirmation Text:Do you really want to delete this section with all its content?`,
                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                              +    if (confirmation) {
                                                                                                                                                                                                                                                              +      this.remove.emit();
                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              <div class="flex-row align-baseline">
                                                                                                                                                                                                                                                              +  <mat-form-field floatLabel="always" class="flex-grow">
                                                                                                                                                                                                                                                              +    <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                              +    <input
                                                                                                                                                                                                                                                              +      matInput
                                                                                                                                                                                                                                                              +      [ngModel]="title"
                                                                                                                                                                                                                                                              +      (ngModelChange)="titleChange.emit($event)"
                                                                                                                                                                                                                                                              +      placeholder="(no title)"
                                                                                                                                                                                                                                                              +      i18n-placeholder="Placeholder for entering a title"
                                                                                                                                                                                                                                                              +    />
                                                                                                                                                                                                                                                              +  </mat-form-field>
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +  <button (click)="removeSection()" mat-icon-button class="group-remove-button">
                                                                                                                                                                                                                                                              +    <fa-icon icon="times"></fa-icon>
                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AdminTabsComponent.html b/documentation/components/AdminTabsComponent.html new file mode 100644 index 0000000000..9fe9f1c469 --- /dev/null +++ b/documentation/components/AdminTabsComponent.html @@ -0,0 +1,965 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                + src/app/core/admin/building-blocks/admin-tabs/admin-tabs.component.ts +

                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Building block for drag&drop form builder to let an admin user manage multiple tabs.

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Provide a template for the tab content when using this component: +<app-admin-tabs +[tabs]="myTabsArray" +[newTabFactory]="newTabFactory"

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                <ng-template [appAdminTabTemplate]="myTabsArray" let-item> +{{ item.title }} + +

                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                + OnChanges +

                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + newTabFactory +
                                                                                                                                                                                                                                                                + Type : function + +
                                                                                                                                                                                                                                                                + Default value : () => + ({ [this.tabTitleProperty]: "" }) as E +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + tabs +
                                                                                                                                                                                                                                                                + Type : E[] + +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + + createTab + + +
                                                                                                                                                                                                                                                                +createTab() +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + + drop + + +
                                                                                                                                                                                                                                                                +drop(event: CdkDragDrop) +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                event + CdkDragDrop<string[]> + + No +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + + getAllTabs + + +
                                                                                                                                                                                                                                                                +getAllTabs(index: number) +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                A list of tab element ids required for linking drag&drop targets +due to the complex template of tab headers.

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                index + number + + No +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + Returns : {} + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + + + tabGroup + + +
                                                                                                                                                                                                                                                                + Type : MatTabGroup + +
                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                + + @ViewChild(MatTabGroup)
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + + + tabTemplate + + +
                                                                                                                                                                                                                                                                + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                + + @ContentChild(undefined, {read: TemplateRef})
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                + + + tabTitleProperty + + +
                                                                                                                                                                                                                                                                + Type : "title" | "name" + +
                                                                                                                                                                                                                                                                + Default value : "title" +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                                +  Component,
                                                                                                                                                                                                                                                                +  ContentChild,
                                                                                                                                                                                                                                                                +  Input,
                                                                                                                                                                                                                                                                +  OnChanges,
                                                                                                                                                                                                                                                                +  SimpleChanges,
                                                                                                                                                                                                                                                                +  TemplateRef,
                                                                                                                                                                                                                                                                +  ViewChild,
                                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                                +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                +import { AdminEntityFormComponent } from "../../admin-entity-details/admin-entity-form/admin-entity-form.component";
                                                                                                                                                                                                                                                                +import { AdminEntityPanelComponentComponent } from "../../admin-entity-details/admin-entity-panel-component/admin-entity-panel-component.component";
                                                                                                                                                                                                                                                                +import { AdminSectionHeaderComponent } from "../admin-section-header/admin-section-header.component";
                                                                                                                                                                                                                                                                +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                +import { MatButton } from "@angular/material/button";
                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                +  MatTab,
                                                                                                                                                                                                                                                                +  MatTabContent,
                                                                                                                                                                                                                                                                +  MatTabGroup,
                                                                                                                                                                                                                                                                +  MatTabLabel,
                                                                                                                                                                                                                                                                +} from "@angular/material/tabs";
                                                                                                                                                                                                                                                                +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                +import { AdminTabTemplateDirective } from "./admin-tab-template.directive";
                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                +  CdkDragDrop,
                                                                                                                                                                                                                                                                +  DragDropModule,
                                                                                                                                                                                                                                                                +  moveItemInArray,
                                                                                                                                                                                                                                                                +} from "@angular/cdk/drag-drop";
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                + * Building block for drag&drop form builder to let an admin user manage multiple tabs.
                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                + * Provide a template for the tab content when using this component:
                                                                                                                                                                                                                                                                + <app-admin-tabs
                                                                                                                                                                                                                                                                + [tabs]="myTabsArray"
                                                                                                                                                                                                                                                                + [newTabFactory]="newTabFactory"
                                                                                                                                                                                                                                                                + >
                                                                                                                                                                                                                                                                + <!-- provide the array of tabs to the `appAdminTabTemplate` to infer typing -->
                                                                                                                                                                                                                                                                + <ng-template [appAdminTabTemplate]="myTabsArray" let-item>
                                                                                                                                                                                                                                                                + {{ item.title }} <!-- use the tab entry in your template -->
                                                                                                                                                                                                                                                                + </ng-template>
                                                                                                                                                                                                                                                                + </app-admin-tabs>
                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                +  selector: "app-admin-tabs",
                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                +    CommonModule,
                                                                                                                                                                                                                                                                +    AdminEntityFormComponent,
                                                                                                                                                                                                                                                                +    AdminEntityPanelComponentComponent,
                                                                                                                                                                                                                                                                +    AdminSectionHeaderComponent,
                                                                                                                                                                                                                                                                +    FaIconComponent,
                                                                                                                                                                                                                                                                +    MatButton,
                                                                                                                                                                                                                                                                +    MatTab,
                                                                                                                                                                                                                                                                +    MatTabContent,
                                                                                                                                                                                                                                                                +    MatTabGroup,
                                                                                                                                                                                                                                                                +    MatTabLabel,
                                                                                                                                                                                                                                                                +    MatTooltip,
                                                                                                                                                                                                                                                                +    AdminTabTemplateDirective,
                                                                                                                                                                                                                                                                +    DragDropModule,
                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                +  templateUrl: "./admin-tabs.component.html",
                                                                                                                                                                                                                                                                +  styleUrl: "./admin-tabs.component.scss",
                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                +export class AdminTabsComponent<E extends { title: string } | { name: string }>
                                                                                                                                                                                                                                                                +  implements OnChanges
                                                                                                                                                                                                                                                                +{
                                                                                                                                                                                                                                                                +  @Input() tabs: E[];
                                                                                                                                                                                                                                                                +  @Input() newTabFactory: () => E = () =>
                                                                                                                                                                                                                                                                +    ({ [this.tabTitleProperty]: "" }) as E;
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  tabTitleProperty: "title" | "name" = "title";
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  @ContentChild(AdminTabTemplateDirective<E>, { read: TemplateRef })
                                                                                                                                                                                                                                                                +  tabTemplate: TemplateRef<any>;
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  @ViewChild(MatTabGroup) tabGroup: MatTabGroup;
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                +    if (changes.tabs) {
                                                                                                                                                                                                                                                                +      this.detectTabTitleProperty();
                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  private detectTabTitleProperty() {
                                                                                                                                                                                                                                                                +    if (!this.tabs || this.tabs.length < 1) {
                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    this.tabTitleProperty = this.tabs[0].hasOwnProperty("name")
                                                                                                                                                                                                                                                                +      ? "name"
                                                                                                                                                                                                                                                                +      : "title";
                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  createTab() {
                                                                                                                                                                                                                                                                +    const newTab = this.newTabFactory();
                                                                                                                                                                                                                                                                +    this.tabs.push(newTab);
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    // wait until view has actually added the new tab before we can auto-select it
                                                                                                                                                                                                                                                                +    setTimeout(() => {
                                                                                                                                                                                                                                                                +      const newTabIndex = this.tabs.length - 1;
                                                                                                                                                                                                                                                                +      this.tabGroup.selectedIndex = newTabIndex;
                                                                                                                                                                                                                                                                +      this.tabGroup.focusTab(newTabIndex);
                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                +   * A list of tab element ids required for linking drag&drop targets
                                                                                                                                                                                                                                                                +   * due to the complex template of tab headers.
                                                                                                                                                                                                                                                                +   * @param index
                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                +  getAllTabs(index: number) {
                                                                                                                                                                                                                                                                +    const allTabs = [];
                                                                                                                                                                                                                                                                +    for (let i = 0; i < this.tabs?.length; i++) {
                                                                                                                                                                                                                                                                +      if (i != index) {
                                                                                                                                                                                                                                                                +        allTabs.push("tabs-" + i);
                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    return allTabs;
                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  drop(event: CdkDragDrop<string[]>) {
                                                                                                                                                                                                                                                                +    const previousIndex = parseInt(
                                                                                                                                                                                                                                                                +      event.previousContainer.id.replace("tabs-", ""),
                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                +    const currentIndex = parseInt(event.container.id.replace("tabs-", ""));
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    const previouslySelectedTab = this.tabs[this.tabGroup.selectedIndex];
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    moveItemInArray(this.tabs, previousIndex, currentIndex);
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    // re-select the previously selected tab, even after its index shifted
                                                                                                                                                                                                                                                                +    let shiftedSelectedIndex = this.tabs.indexOf(previouslySelectedTab);
                                                                                                                                                                                                                                                                +    if (shiftedSelectedIndex !== this.tabGroup.selectedIndex) {
                                                                                                                                                                                                                                                                +      this.tabGroup.selectedIndex = shiftedSelectedIndex;
                                                                                                                                                                                                                                                                +      this.tabGroup.focusTab(shiftedSelectedIndex);
                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    this.tabs = JSON.parse(JSON.stringify(this.tabs)); // Needed to avoid Angular Ivy render bug
                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                <mat-tab-group [preserveContent]="true" #matTabGroup>
                                                                                                                                                                                                                                                                +  <mat-tab *ngFor="let tab of tabs; index as tabIndex">
                                                                                                                                                                                                                                                                +    <ng-template mat-tab-label>
                                                                                                                                                                                                                                                                +      <div
                                                                                                                                                                                                                                                                +        class="drop-list flex-row"
                                                                                                                                                                                                                                                                +        [id]="'tabs-' + tabIndex"
                                                                                                                                                                                                                                                                +        cdkDropList
                                                                                                                                                                                                                                                                +        cdkDropListOrientation="horizontal"
                                                                                                                                                                                                                                                                +        (cdkDropListDropped)="drop($event)"
                                                                                                                                                                                                                                                                +        [cdkDropListConnectedTo]="getAllTabs(tabIndex)"
                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                +        <div
                                                                                                                                                                                                                                                                +          cdkDrag
                                                                                                                                                                                                                                                                +          cdkDragLockAxis="x"
                                                                                                                                                                                                                                                                +          class="flex-row align-center drop-item gap-small"
                                                                                                                                                                                                                                                                +        >
                                                                                                                                                                                                                                                                +          <fa-icon icon="grip-vertical" size="xl" class="drag-handle"></fa-icon>
                                                                                                                                                                                                                                                                +          @if (tabIndex === matTabGroup.selectedIndex) {
                                                                                                                                                                                                                                                                +            <app-admin-section-header
                                                                                                                                                                                                                                                                +              [(title)]="tab[tabTitleProperty]"
                                                                                                                                                                                                                                                                +              (remove)="
                                                                                                                                                                                                                                                                +                tabs.splice(tabIndex, 1);
                                                                                                                                                                                                                                                                +                matTabGroup.selectedIndex = tabIndex - 1
                                                                                                                                                                                                                                                                +              "
                                                                                                                                                                                                                                                                +            ></app-admin-section-header>
                                                                                                                                                                                                                                                                +          } @else {
                                                                                                                                                                                                                                                                +            <!-- only current tab can be renamed -->
                                                                                                                                                                                                                                                                +            {{ tab[tabTitleProperty] }}
                                                                                                                                                                                                                                                                +          }
                                                                                                                                                                                                                                                                +        </div>
                                                                                                                                                                                                                                                                +      </div>
                                                                                                                                                                                                                                                                +    </ng-template>
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +    <ng-template matTabContent>
                                                                                                                                                                                                                                                                +      <ng-template
                                                                                                                                                                                                                                                                +        *ngTemplateOutlet="tabTemplate; context: { $implicit: tab }"
                                                                                                                                                                                                                                                                +      ></ng-template>
                                                                                                                                                                                                                                                                +    </ng-template>
                                                                                                                                                                                                                                                                +  </mat-tab>
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +  <!-- Add new tab -->
                                                                                                                                                                                                                                                                +  <mat-tab>
                                                                                                                                                                                                                                                                +    <ng-template mat-tab-label>
                                                                                                                                                                                                                                                                +      <button
                                                                                                                                                                                                                                                                +        mat-stroked-button
                                                                                                                                                                                                                                                                +        color="accent"
                                                                                                                                                                                                                                                                +        matTooltip="add a new tab"
                                                                                                                                                                                                                                                                +        i18n-matTooltip
                                                                                                                                                                                                                                                                +        (click)="createTab()"
                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                +        <fa-icon aria-label="add" icon="plus-circle"></fa-icon>
                                                                                                                                                                                                                                                                +      </button>
                                                                                                                                                                                                                                                                +    </ng-template>
                                                                                                                                                                                                                                                                +  </mat-tab>
                                                                                                                                                                                                                                                                +</mat-tab-group>
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AlertStoriesHelperComponent.html b/documentation/components/AlertStoriesHelperComponent.html new file mode 100644 index 0000000000..b5e770e42b --- /dev/null +++ b/documentation/components/AlertStoriesHelperComponent.html @@ -0,0 +1,427 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  + src/app/core/alerts/alert-stories-helper.component.ts +

                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                  +constructor(alertService: AlertService) +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                  alertService + AlertService + + No +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                  + + + Public + alertService + + +
                                                                                                                                                                                                                                                                  + Type : AlertService + +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                  +import { AlertService } from "./alert.service";
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                  +  selector: "app-alert-demo",
                                                                                                                                                                                                                                                                  +  template: `
                                                                                                                                                                                                                                                                  +    <button (click)="alertService.addWarning('warn')">warn</button>
                                                                                                                                                                                                                                                                  +    <button (click)="alertService.addDanger('danger')">danger</button>
                                                                                                                                                                                                                                                                  +    <button (click)="alertService.addInfo('info')">info</button>
                                                                                                                                                                                                                                                                  +  `,
                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                  +export class AlertStoriesHelperComponent {
                                                                                                                                                                                                                                                                  +  constructor(public alertService: AlertService) {}
                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AnonymizeOptionsComponent.html b/documentation/components/AnonymizeOptionsComponent.html new file mode 100644 index 0000000000..32fb389db0 --- /dev/null +++ b/documentation/components/AnonymizeOptionsComponent.html @@ -0,0 +1,488 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    + src/app/core/admin/admin-entity-details/admin-entity-field/anonymize-options/anonymize-options.component.ts +

                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Simple form field for admins to select the "anonymize" mode for an entity field. +Displays tooltips as descriptions also.

                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    Outputs
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                    + + value +
                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    Outputs

                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                    + + valueChange +
                                                                                                                                                                                                                                                                    + Type : EventEmitter + +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
                                                                                                                                                                                                                                                                    +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                    +import { MatOptionModule } from "@angular/material/core";
                                                                                                                                                                                                                                                                    +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                    + * Simple form field for admins to select the "anonymize" mode for an entity field.
                                                                                                                                                                                                                                                                    + * Displays tooltips as descriptions also.
                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                    +  selector: "app-anonymize-options",
                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                    +  imports: [CommonModule, MatOptionModule, MatSelectModule, MatTooltipModule],
                                                                                                                                                                                                                                                                    +  templateUrl: "./anonymize-options.component.html",
                                                                                                                                                                                                                                                                    +  styleUrl: "./anonymize-options.component.scss",
                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                    +export class AnonymizeOptionsComponent implements OnInit {
                                                                                                                                                                                                                                                                    +  @Input() value: string;
                                                                                                                                                                                                                                                                    +  @Output() valueChange = new EventEmitter<string>();
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +  ngOnInit(): void {
                                                                                                                                                                                                                                                                    +    if (!this.value) {
                                                                                                                                                                                                                                                                    +      this.value = "";
                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    <mat-form-field appearance="fill">
                                                                                                                                                                                                                                                                    +  <mat-label>
                                                                                                                                                                                                                                                                    +    <ng-content></ng-content>
                                                                                                                                                                                                                                                                    +  </mat-label>
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +  <mat-select
                                                                                                                                                                                                                                                                    +    [(value)]="value"
                                                                                                                                                                                                                                                                    +    (selectionChange)="valueChange.emit($event.value)"
                                                                                                                                                                                                                                                                    +  >
                                                                                                                                                                                                                                                                    +    <mat-option
                                                                                                                                                                                                                                                                    +      value=""
                                                                                                                                                                                                                                                                    +      matTooltip="Completely remove the value from the record during anonymization."
                                                                                                                                                                                                                                                                    +      i18n-matTooltip
                                                                                                                                                                                                                                                                    +      matTooltipPosition="before"
                                                                                                                                                                                                                                                                    +      i18n
                                                                                                                                                                                                                                                                    +      >Remove</mat-option
                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                    +    <mat-option
                                                                                                                                                                                                                                                                    +      value="retain"
                                                                                                                                                                                                                                                                    +      matTooltip="Keep the original value without any anonymization."
                                                                                                                                                                                                                                                                    +      i18n-matTooltip
                                                                                                                                                                                                                                                                    +      matTooltipPosition="before"
                                                                                                                                                                                                                                                                    +      i18n
                                                                                                                                                                                                                                                                    +      >Retain</mat-option
                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                    +    <mat-option
                                                                                                                                                                                                                                                                    +      value="retain-anonymized"
                                                                                                                                                                                                                                                                    +      matTooltip="Anonymize the value, but retain some generalized information. For dates, this removes the day and only keeps the year for statistical reporting. If a datatype (like the simple text field) does not support partial anonymization, the value will instead be removed completely."
                                                                                                                                                                                                                                                                    +      i18n-matTooltip
                                                                                                                                                                                                                                                                    +      matTooltipPosition="before"
                                                                                                                                                                                                                                                                    +      i18n
                                                                                                                                                                                                                                                                    +      >Partially Anonymize</mat-option
                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                    +  </mat-select>
                                                                                                                                                                                                                                                                    +</mat-form-field>
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AppComponent.html b/documentation/components/AppComponent.html new file mode 100644 index 0000000000..7f04a3855c --- /dev/null +++ b/documentation/components/AppComponent.html @@ -0,0 +1,459 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      + src/app/app.component.ts +

                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Component as the main entry point for the app. +Actual logic and UI structure is defined in other modules.

                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                      +constructor(router: Router) +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                      router + Router + + No +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                      + + + configFullscreen + + +
                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                      +import { NavigationEnd, Router } from "@angular/router";
                                                                                                                                                                                                                                                                      +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                      + * Component as the main entry point for the app.
                                                                                                                                                                                                                                                                      + * Actual logic and UI structure is defined in other modules.
                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                      +  selector: "app-root",
                                                                                                                                                                                                                                                                      +  template: `@if (configFullscreen) {
                                                                                                                                                                                                                                                                      +      <router-outlet></router-outlet>
                                                                                                                                                                                                                                                                      +    } @else {
                                                                                                                                                                                                                                                                      +      <app-ui></app-ui>
                                                                                                                                                                                                                                                                      +    }`,
                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                      +export class AppComponent {
                                                                                                                                                                                                                                                                      +  configFullscreen: boolean = false;
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +  constructor(private router: Router) {
                                                                                                                                                                                                                                                                      +    this.detectConfigMode();
                                                                                                                                                                                                                                                                      +    router.events
                                                                                                                                                                                                                                                                      +      .pipe(filter((e) => e instanceof NavigationEnd))
                                                                                                                                                                                                                                                                      +      .subscribe(() => this.detectConfigMode());
                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                      +   * Switch the layout for certain admin routes to display those fullscreen without app menu and toolbar.
                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                      +  private detectConfigMode() {
                                                                                                                                                                                                                                                                      +    const currentUrl = this.router.url;
                                                                                                                                                                                                                                                                      +    this.configFullscreen = currentUrl.startsWith("/admin/entity/");
                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AppVersionComponent.html b/documentation/components/AppVersionComponent.html new file mode 100644 index 0000000000..3dce61ca4c --- /dev/null +++ b/documentation/components/AppVersionComponent.html @@ -0,0 +1,554 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        + src/app/core/ui/latest-changes/app-version/app-version.component.ts +

                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Simple component displaying the current app version +including functionality to open an info dialog showing the latest change when the user clicks on it.

                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        + OnInit +

                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        +constructor(changelogDialog: LatestChangesDialogService) +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                        changelogDialog + LatestChangesDialogService + + No +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        + + + Public + showLatestChanges + + +
                                                                                                                                                                                                                                                                        + + showLatestChanges() +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        Open dialog box to display changelog information about the latest version to the user.

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        + + + currentVersion + + +
                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        the current app version

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        import { ChangeDetectionStrategy, Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                        +import { LatestChangesDialogService } from "../latest-changes-dialog.service";
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                        + * Simple component displaying the current app version
                                                                                                                                                                                                                                                                        + * including functionality to open an info dialog showing the latest change when the user clicks on it.
                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                        +  selector: "app-version",
                                                                                                                                                                                                                                                                        +  templateUrl: "./app-version.component.html",
                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                        +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                        +export class AppVersionComponent implements OnInit {
                                                                                                                                                                                                                                                                        +  /** the current app version */
                                                                                                                                                                                                                                                                        +  currentVersion: string;
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +  constructor(private changelogDialog: LatestChangesDialogService) {}
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +  ngOnInit(): void {
                                                                                                                                                                                                                                                                        +    this.currentVersion = this.changelogDialog.getCurrentVersion();
                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                        +   * Open dialog box to display changelog information about the latest version to the user.
                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                        +  public showLatestChanges(): void {
                                                                                                                                                                                                                                                                        +    this.changelogDialog.showLatestChanges();
                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        <!--
                                                                                                                                                                                                                                                                        +  ~     This file is part of ndb-core.
                                                                                                                                                                                                                                                                        +  ~
                                                                                                                                                                                                                                                                        +  ~     ndb-core is free software: you can redistribute it and/or modify
                                                                                                                                                                                                                                                                        +  ~     it under the terms of the GNU General Public License as published by
                                                                                                                                                                                                                                                                        +  ~     the Free Software Foundation, either version 3 of the License, or
                                                                                                                                                                                                                                                                        +  ~     (at your option) any later version.
                                                                                                                                                                                                                                                                        +  ~
                                                                                                                                                                                                                                                                        +  ~     ndb-core is distributed in the hope that it will be useful,
                                                                                                                                                                                                                                                                        +  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
                                                                                                                                                                                                                                                                        +  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                                                                                                                                                                                                                                                        +  ~     GNU General Public License for more details.
                                                                                                                                                                                                                                                                        +  ~
                                                                                                                                                                                                                                                                        +  ~     You should have received a copy of the GNU General Public License
                                                                                                                                                                                                                                                                        +  ~     along with ndb-core.  If not, see <http://www.gnu.org/licenses/>.
                                                                                                                                                                                                                                                                        +  -->
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +<small>
                                                                                                                                                                                                                                                                        +  {{ currentVersion }}
                                                                                                                                                                                                                                                                        +</small>
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ApplicationLoadingComponent.html b/documentation/components/ApplicationLoadingComponent.html new file mode 100644 index 0000000000..d54cbb1f31 --- /dev/null +++ b/documentation/components/ApplicationLoadingComponent.html @@ -0,0 +1,346 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          + src/app/core/config/dynamic-routing/empty/application-loading.component.ts +

                                                                                                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                          +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                          +  templateUrl: "./application-loading.component.html",
                                                                                                                                                                                                                                                                          +  styleUrls: ["./application-loading.component.scss"],
                                                                                                                                                                                                                                                                          +  imports: [MatProgressBarModule],
                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                          +export class ApplicationLoadingComponent {}
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          <h1 i18n="Sync notification line 1">Building application</h1>
                                                                                                                                                                                                                                                                          +<p i18n="Sync notification line 2">The application will be ready in a moment</p>
                                                                                                                                                                                                                                                                          +<mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          + ./application-loading.component.scss +

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          :host {
                                                                                                                                                                                                                                                                          +  display: flex;
                                                                                                                                                                                                                                                                          +  flex-direction: column;
                                                                                                                                                                                                                                                                          +  place-items: center;
                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceBlockComponent.html b/documentation/components/AttendanceBlockComponent.html new file mode 100644 index 0000000000..9473f68026 --- /dev/null +++ b/documentation/components/AttendanceBlockComponent.html @@ -0,0 +1,745 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            + src/app/child-dev-project/attendance/attendance-block/attendance-block.component.ts +

                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Display attendance details of a single period for a participant as a compact block.

                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            + OnChanges +

                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Accessors
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            +constructor(locale: string) +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                            locale + string + + No +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + + attendanceData +
                                                                                                                                                                                                                                                                            + Type : ActivityAttendance + +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + + forChild +
                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                            + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + + + logicalCount + + +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + + + LStatus + + +
                                                                                                                                                                                                                                                                            + Default value : AttendanceLogicalStatus +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            + Accessors +

                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + + attendanceDescription +
                                                                                                                                                                                                                                                                            + getattendanceDescription() +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + + attendancePercentage +
                                                                                                                                                                                                                                                                            + getattendancePercentage() +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            + + warningLevel +
                                                                                                                                                                                                                                                                            + getwarningLevel() +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            import { Component, Inject, Input, LOCALE_ID, OnChanges } from "@angular/core";
                                                                                                                                                                                                                                                                            +import { ActivityAttendance } from "../model/activity-attendance";
                                                                                                                                                                                                                                                                            +import { AttendanceLogicalStatus } from "../model/attendance-status";
                                                                                                                                                                                                                                                                            +import { DatePipe, formatPercent, NgIf, PercentPipe } from "@angular/common";
                                                                                                                                                                                                                                                                            +import { TemplateTooltipDirective } from "../../../core/common-components/template-tooltip/template-tooltip.directive";
                                                                                                                                                                                                                                                                            +import { AttendanceCalendarComponent } from "../attendance-calendar/attendance-calendar.component";
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                            + * Display attendance details of a single period for a participant as a compact block.
                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                            +  selector: "app-attendance-block",
                                                                                                                                                                                                                                                                            +  templateUrl: "./attendance-block.component.html",
                                                                                                                                                                                                                                                                            +  styleUrls: ["./attendance-block.component.scss"],
                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                            +    PercentPipe,
                                                                                                                                                                                                                                                                            +    DatePipe,
                                                                                                                                                                                                                                                                            +    TemplateTooltipDirective,
                                                                                                                                                                                                                                                                            +    AttendanceCalendarComponent,
                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                            +export class AttendanceBlockComponent implements OnChanges {
                                                                                                                                                                                                                                                                            +  @Input() attendanceData: ActivityAttendance;
                                                                                                                                                                                                                                                                            +  @Input() forChild: string;
                                                                                                                                                                                                                                                                            +  LStatus = AttendanceLogicalStatus;
                                                                                                                                                                                                                                                                            +  logicalCount: { [key in AttendanceLogicalStatus]?: number };
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +  constructor(@Inject(LOCALE_ID) private locale: string) {}
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +  ngOnChanges() {
                                                                                                                                                                                                                                                                            +    this.logicalCount =
                                                                                                                                                                                                                                                                            +      this.attendanceData.individualLogicalStatusCounts.get(this.forChild) ??
                                                                                                                                                                                                                                                                            +      {};
                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +  get attendanceDescription(): string {
                                                                                                                                                                                                                                                                            +    return `${this.logicalCount[this.LStatus.PRESENT]} / ${
                                                                                                                                                                                                                                                                            +      (this.logicalCount[this.LStatus.PRESENT] || 0) +
                                                                                                                                                                                                                                                                            +      (this.logicalCount[this.LStatus.ABSENT] || 0)
                                                                                                                                                                                                                                                                            +    }`;
                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +  get attendancePercentage(): string {
                                                                                                                                                                                                                                                                            +    const percentage = this.attendanceData.getAttendancePercentage(
                                                                                                                                                                                                                                                                            +      this.forChild,
                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                            +    if (!Number.isFinite(percentage)) {
                                                                                                                                                                                                                                                                            +      return "-";
                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                            +      return formatPercent(percentage, this.locale, "1.0-0");
                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +  get warningLevel(): string {
                                                                                                                                                                                                                                                                            +    return this.attendanceData.getWarningLevel(this.forChild);
                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            <span
                                                                                                                                                                                                                                                                            +  class="mat-elevation-z1 attendance-block w-{{
                                                                                                                                                                                                                                                                            +    attendanceData.getWarningLevel(forChild)
                                                                                                                                                                                                                                                                            +  }}"
                                                                                                                                                                                                                                                                            +  [appTemplateTooltip]="tooltip"
                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                            +  <span *ngIf="attendanceData.getAttendancePercentage(forChild)">
                                                                                                                                                                                                                                                                            +    {{ attendanceData.getAttendancePercentage(forChild) | percent: "1.0-0" }}
                                                                                                                                                                                                                                                                            +  </span>
                                                                                                                                                                                                                                                                            +  <span *ngIf="!attendanceData.getAttendancePercentage(forChild)"> - </span>
                                                                                                                                                                                                                                                                            +</span>
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +<ng-template #tooltip>
                                                                                                                                                                                                                                                                            +  <div class="attendance-tooltip-container">
                                                                                                                                                                                                                                                                            +    <strong>
                                                                                                                                                                                                                                                                            +      {{ attendanceData.periodFrom | date: "shortDate" }} -
                                                                                                                                                                                                                                                                            +      {{ attendanceData.periodTo | date: "shortDate" }}
                                                                                                                                                                                                                                                                            +      {{ attendanceData.activity.title }}
                                                                                                                                                                                                                                                                            +    </strong>
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +    <div
                                                                                                                                                                                                                                                                            +      i18n="
                                                                                                                                                                                                                                                                            +        Attended Tooltip|How many attendees were present / how many attendees
                                                                                                                                                                                                                                                                            +        were absent
                                                                                                                                                                                                                                                                            +      "
                                                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                                                            +      attended {{ attendanceDescription }} events
                                                                                                                                                                                                                                                                            +    </div>
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +    <em
                                                                                                                                                                                                                                                                            +      *ngIf="logicalCount[LStatus.IGNORE] > 0"
                                                                                                                                                                                                                                                                            +      i18n="Attended Tooltip|How many events were excluded"
                                                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                                                            +      (excluding {{ logicalCount[LStatus.IGNORE] }} events excused or unknown)
                                                                                                                                                                                                                                                                            +    </em>
                                                                                                                                                                                                                                                                            +    <app-attendance-calendar
                                                                                                                                                                                                                                                                            +      [records]="attendanceData.events"
                                                                                                                                                                                                                                                                            +      [highlightForChild]="forChild"
                                                                                                                                                                                                                                                                            +      [activity]="attendanceData.activity"
                                                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                                                            +    </app-attendance-calendar>
                                                                                                                                                                                                                                                                            +  </div>
                                                                                                                                                                                                                                                                            +</ng-template>
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            + ./attendance-block.component.scss +

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            .attendance-block {
                                                                                                                                                                                                                                                                            +  display: inline-block;
                                                                                                                                                                                                                                                                            +  text-align: center;
                                                                                                                                                                                                                                                                            +  border-radius: 4px;
                                                                                                                                                                                                                                                                            +  margin: 3px;
                                                                                                                                                                                                                                                                            +  width: 42px;
                                                                                                                                                                                                                                                                            +  padding-top: 5px;
                                                                                                                                                                                                                                                                            +  padding-bottom: 5px;
                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +.attendance-tooltip-container {
                                                                                                                                                                                                                                                                            +  padding: 0.5em;
                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceCalendarComponent.html b/documentation/components/AttendanceCalendarComponent.html new file mode 100644 index 0000000000..90839f6017 --- /dev/null +++ b/documentation/components/AttendanceCalendarComponent.html @@ -0,0 +1,1484 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              + src/app/child-dev-project/attendance/attendance-calendar/attendance-calendar.component.ts +

                                                                                                                                                                                                                                                                              + + + + +

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              + OnChanges +

                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Accessors
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              +constructor(entityMapper: EntityMapperService, formDialog: FormDialogService, analyticsService: AnalyticsService, attendanceService: AttendanceService) +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                              formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                              analyticsService + AnalyticsService + + No +
                                                                                                                                                                                                                                                                              attendanceService + AttendanceService + + No +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + activity +
                                                                                                                                                                                                                                                                              + Type : RecurringActivity + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + highlightForChild +
                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + records +
                                                                                                                                                                                                                                                                              + Type : Note[] + +
                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + createNewEvent + + +
                                                                                                                                                                                                                                                                              +createNewEvent() +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + Async + save + + +
                                                                                                                                                                                                                                                                              + + save() +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + selectDay + + +
                                                                                                                                                                                                                                                                              +selectDay(newDate?: Date) +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                              newDate + Date + + Yes +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + showEventDetails + + +
                                                                                                                                                                                                                                                                              +showEventDetails(selectedEvent: Note) +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                              selectedEvent + Note + + No +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + + calendar + + +
                                                                                                                                                                                                                                                                              + Type : MatCalendar<Date> + +
                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                              + + @ViewChild(MatCalendar)
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + highlightDate + + +
                                                                                                                                                                                                                                                                              + Default value : () => {...} +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + maxDate + + +
                                                                                                                                                                                                                                                                              + Type : Date + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + minDate + + +
                                                                                                                                                                                                                                                                              + Type : Date + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + selectedDate + + +
                                                                                                                                                                                                                                                                              + Type : moment.Moment + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + selectedEvent + + +
                                                                                                                                                                                                                                                                              + Type : Note + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + selectedEventAttendance + + +
                                                                                                                                                                                                                                                                              + Type : EventAttendance + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + selectedEventAttendanceOriginal + + +
                                                                                                                                                                                                                                                                              + Type : EventAttendance + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + + selectedEventStats + + +
                                                                                                                                                                                                                                                                              + Type : AverageAttendanceStats + +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              + Accessors +

                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              + + hasAverage +
                                                                                                                                                                                                                                                                              + gethasAverage() +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              import {
                                                                                                                                                                                                                                                                              +  Component,
                                                                                                                                                                                                                                                                              +  Input,
                                                                                                                                                                                                                                                                              +  OnChanges,
                                                                                                                                                                                                                                                                              +  SimpleChanges,
                                                                                                                                                                                                                                                                              +  ViewChild,
                                                                                                                                                                                                                                                                              +  ViewEncapsulation,
                                                                                                                                                                                                                                                                              +} from "@angular/core";
                                                                                                                                                                                                                                                                              +import { Note } from "../../notes/model/note";
                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                              +  MatCalendar,
                                                                                                                                                                                                                                                                              +  MatCalendarCellCssClasses,
                                                                                                                                                                                                                                                                              +  MatDatepickerModule,
                                                                                                                                                                                                                                                                              +} from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                              +import moment, { Moment } from "moment";
                                                                                                                                                                                                                                                                              +import { EventAttendance } from "../model/event-attendance";
                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                              +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                              +  AverageAttendanceStats,
                                                                                                                                                                                                                                                                              +  calculateAverageAttendance,
                                                                                                                                                                                                                                                                              +} from "../model/calculate-average-event-attendance";
                                                                                                                                                                                                                                                                              +import { EventNote } from "../model/event-note";
                                                                                                                                                                                                                                                                              +import { RecurringActivity } from "../model/recurring-activity";
                                                                                                                                                                                                                                                                              +import { applyUpdate } from "../../../core/entity/model/entity-update";
                                                                                                                                                                                                                                                                              +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                              +import { AttendanceService } from "../attendance.service";
                                                                                                                                                                                                                                                                              +import { AnalyticsService } from "../../../core/analytics/analytics.service";
                                                                                                                                                                                                                                                                              +import { DatePipe, NgIf, PercentPipe } from "@angular/common";
                                                                                                                                                                                                                                                                              +import { DialogCloseComponent } from "../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                              +import { AttendanceStatusSelectComponent } from "../attendance-status-select/attendance-status-select.component";
                                                                                                                                                                                                                                                                              +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                              +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                              +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                              +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                              +  selector: "app-attendance-calendar",
                                                                                                                                                                                                                                                                              +  templateUrl: "./attendance-calendar.component.html",
                                                                                                                                                                                                                                                                              +  styleUrls: ["./attendance-calendar.component.scss"],
                                                                                                                                                                                                                                                                              +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                              +    MatDatepickerModule,
                                                                                                                                                                                                                                                                              +    DatePipe,
                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                              +    DialogCloseComponent,
                                                                                                                                                                                                                                                                              +    AttendanceStatusSelectComponent,
                                                                                                                                                                                                                                                                              +    MatFormFieldModule,
                                                                                                                                                                                                                                                                              +    MatInputModule,
                                                                                                                                                                                                                                                                              +    FormsModule,
                                                                                                                                                                                                                                                                              +    PercentPipe,
                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                              +    Angulartics2Module,
                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                              +@UntilDestroy()
                                                                                                                                                                                                                                                                              +export class AttendanceCalendarComponent implements OnChanges {
                                                                                                                                                                                                                                                                              +  @Input() records: Note[] = [];
                                                                                                                                                                                                                                                                              +  @Input() highlightForChild: string;
                                                                                                                                                                                                                                                                              +  @Input() activity: RecurringActivity;
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  @ViewChild(MatCalendar) calendar: MatCalendar<Date>;
                                                                                                                                                                                                                                                                              +  minDate: Date;
                                                                                                                                                                                                                                                                              +  maxDate: Date;
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  selectedDate: moment.Moment;
                                                                                                                                                                                                                                                                              +  selectedEvent: Note;
                                                                                                                                                                                                                                                                              +  selectedEventAttendance: EventAttendance;
                                                                                                                                                                                                                                                                              +  selectedEventAttendanceOriginal: EventAttendance;
                                                                                                                                                                                                                                                                              +  selectedEventStats: AverageAttendanceStats;
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                              +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                              +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                              +    private analyticsService: AnalyticsService,
                                                                                                                                                                                                                                                                              +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                              +    this.entityMapper
                                                                                                                                                                                                                                                                              +      .receiveUpdates(EventNote)
                                                                                                                                                                                                                                                                              +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                              +      .subscribe((newNotes) => {
                                                                                                                                                                                                                                                                              +        this.records = applyUpdate(this.records, newNotes, false);
                                                                                                                                                                                                                                                                              +        this.selectDay(this.selectedDate?.toDate());
                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  highlightDate = (cellDate: Date): MatCalendarCellCssClasses => {
                                                                                                                                                                                                                                                                              +    const cellMoment = moment(cellDate);
                                                                                                                                                                                                                                                                              +    const classes = {
                                                                                                                                                                                                                                                                              +      "attendance-calendar-date-general": true,
                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    if (this.selectedDate) {
                                                                                                                                                                                                                                                                              +      classes["attendance-calendar-date-selected"] = cellMoment.isSame(
                                                                                                                                                                                                                                                                              +        this.selectedDate,
                                                                                                                                                                                                                                                                              +        "day",
                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    const event = this.records.find((e) => cellMoment.isSame(e.date, "day"));
                                                                                                                                                                                                                                                                              +    if (event && this.highlightForChild) {
                                                                                                                                                                                                                                                                              +      // coloring for individual child
                                                                                                                                                                                                                                                                              +      const eventAttendance = event.getAttendance(this.highlightForChild);
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +      const statusClass = eventAttendance?.status?.style;
                                                                                                                                                                                                                                                                              +      classes[statusClass] = true;
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +      classes["attendance-calendar-date-has-remarks"] =
                                                                                                                                                                                                                                                                              +        eventAttendance?.remarks && eventAttendance?.remarks !== "";
                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    if (event && !this.highlightForChild) {
                                                                                                                                                                                                                                                                              +      // coloring based on averages across all children
                                                                                                                                                                                                                                                                              +      const stats = calculateAverageAttendance(event);
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +      const percentageSlab = Math.round(stats.average * 10) * 10;
                                                                                                                                                                                                                                                                              +      classes["w-" + percentageSlab] = true;
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +      classes["attendance-calendar-date-has-participants-with-unknown-status"] =
                                                                                                                                                                                                                                                                              +        stats.excludedUnknown > 0;
                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    return classes;
                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                              +    if (changes.hasOwnProperty("records")) {
                                                                                                                                                                                                                                                                              +      this.updateDateRange();
                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                              +   * restrict period available for user navigation to the months for which events are given
                                                                                                                                                                                                                                                                              +   * @private
                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                              +  private updateDateRange() {
                                                                                                                                                                                                                                                                              +    const dates: Moment[] = this.records.map((e) => moment(e.date));
                                                                                                                                                                                                                                                                              +    this.minDate = moment.min(dates).startOf("month").toDate();
                                                                                                                                                                                                                                                                              +    this.maxDate = moment.max(dates).endOf("month").toDate();
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    if (this.calendar) {
                                                                                                                                                                                                                                                                              +      // it is only possible to update the active date (i.e. which month is visible)
                                                                                                                                                                                                                                                                              +      // after minDate is propagated with the next change cycle ...
                                                                                                                                                                                                                                                                              +      setTimeout(() => (this.calendar.activeDate = this.minDate));
                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  get hasAverage(): boolean {
                                                                                                                                                                                                                                                                              +    return !Number.isNaN(this.selectedEventStats.average);
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  selectDay(newDate?: Date) {
                                                                                                                                                                                                                                                                              +    if (!newDate) {
                                                                                                                                                                                                                                                                              +      this.selectedDate = undefined;
                                                                                                                                                                                                                                                                              +      this.selectedEvent = undefined;
                                                                                                                                                                                                                                                                              +      this.selectedEventAttendance = undefined;
                                                                                                                                                                                                                                                                              +      this.selectedEventAttendanceOriginal = undefined;
                                                                                                                                                                                                                                                                              +      this.selectedEventStats = undefined;
                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                              +      this.selectedDate = moment(newDate);
                                                                                                                                                                                                                                                                              +      this.selectedEvent = this.records.find((e) =>
                                                                                                                                                                                                                                                                              +        this.selectedDate.isSame(e.date, "day"),
                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                              +      if (this.selectedEvent && this.highlightForChild) {
                                                                                                                                                                                                                                                                              +        this.selectedEvent.addChild(this.highlightForChild); // ensure child is part of the event
                                                                                                                                                                                                                                                                              +        this.selectedEventAttendance = this.selectedEvent.getAttendance(
                                                                                                                                                                                                                                                                              +          this.highlightForChild,
                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                              +      // clone attendance information to allow detecting and reverting changes
                                                                                                                                                                                                                                                                              +      this.selectedEventAttendanceOriginal = Object.assign(
                                                                                                                                                                                                                                                                              +        {},
                                                                                                                                                                                                                                                                              +        this.selectedEventAttendanceOriginal,
                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                              +      if (this.selectedEvent) {
                                                                                                                                                                                                                                                                              +        this.selectedEventStats = calculateAverageAttendance(
                                                                                                                                                                                                                                                                              +          this.selectedEvent,
                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +      this.analyticsService.eventTrack("calendar_select_date", {
                                                                                                                                                                                                                                                                              +        category: "Attendance",
                                                                                                                                                                                                                                                                              +        label: this.selectedEvent ? "with event" : "without event",
                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    this.calendar.updateTodaysDate();
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  async save() {
                                                                                                                                                                                                                                                                              +    if (
                                                                                                                                                                                                                                                                              +      this.selectedEventAttendance.status ===
                                                                                                                                                                                                                                                                              +        this.selectedEventAttendanceOriginal.status &&
                                                                                                                                                                                                                                                                              +      this.selectedEventAttendance.remarks ===
                                                                                                                                                                                                                                                                              +        this.selectedEventAttendanceOriginal.remarks
                                                                                                                                                                                                                                                                              +    ) {
                                                                                                                                                                                                                                                                              +      // don't write unchanged object
                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    await this.entityMapper.save(this.selectedEvent);
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    this.analyticsService.eventTrack("calendar_save_event_changes", {
                                                                                                                                                                                                                                                                              +      category: "Attendance",
                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  createNewEvent() {
                                                                                                                                                                                                                                                                              +    this.attendanceService
                                                                                                                                                                                                                                                                              +      .createEventForActivity(this.activity, this.selectedDate.toDate())
                                                                                                                                                                                                                                                                              +      .then((note) => {
                                                                                                                                                                                                                                                                              +        this.showEventDetails(note);
                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  showEventDetails(selectedEvent: Note) {
                                                                                                                                                                                                                                                                              +    this.formDialog.openView(selectedEvent, "NoteDetails");
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              <mat-calendar
                                                                                                                                                                                                                                                                              +  (selectedChange)="selectDay($event)"
                                                                                                                                                                                                                                                                              +  [dateClass]="highlightDate"
                                                                                                                                                                                                                                                                              +  [minDate]="minDate"
                                                                                                                                                                                                                                                                              +  [maxDate]="maxDate"
                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                              +</mat-calendar>
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +<div *ngIf="selectedDate" class="attendance-calendar-details-form">
                                                                                                                                                                                                                                                                              +  <h3 class="remove-margin-top">
                                                                                                                                                                                                                                                                              +    {{ selectedDate.toDate() | date }}
                                                                                                                                                                                                                                                                              +  </h3>
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  <app-dialog-close (click)="selectDay()"></app-dialog-close>
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  <div *ngIf="selectedEvent && highlightForChild">
                                                                                                                                                                                                                                                                              +    <div>
                                                                                                                                                                                                                                                                              +      <app-attendance-status-select
                                                                                                                                                                                                                                                                              +        [(value)]="selectedEventAttendance.status"
                                                                                                                                                                                                                                                                              +        (valueChange)="save()"
                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                              +      </app-attendance-status-select>
                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +    <div>
                                                                                                                                                                                                                                                                              +      <mat-form-field class="full-width">
                                                                                                                                                                                                                                                                              +        <textarea
                                                                                                                                                                                                                                                                              +          matInput
                                                                                                                                                                                                                                                                              +          i18n-placeholder="
                                                                                                                                                                                                                                                                              +            Remarks|Placeholder if no remarks for the attendance of a child are
                                                                                                                                                                                                                                                                              +            given
                                                                                                                                                                                                                                                                              +          "
                                                                                                                                                                                                                                                                              +          placeholder="Remarks"
                                                                                                                                                                                                                                                                              +          [(ngModel)]="selectedEventAttendance.remarks"
                                                                                                                                                                                                                                                                              +          (blur)="save()"
                                                                                                                                                                                                                                                                              +        ></textarea>
                                                                                                                                                                                                                                                                              +      </mat-form-field>
                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  <div *ngIf="selectedEvent && !highlightForChild">
                                                                                                                                                                                                                                                                              +    <div
                                                                                                                                                                                                                                                                              +      *ngIf="!hasAverage"
                                                                                                                                                                                                                                                                              +      i18n="
                                                                                                                                                                                                                                                                              +        Event participants|How many participants attended at an event (in
                                                                                                                                                                                                                                                                              +        percent)
                                                                                                                                                                                                                                                                              +      "
                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                              +      All excused (out of
                                                                                                                                                                                                                                                                              +      {{ selectedEvent.children.length }}
                                                                                                                                                                                                                                                                              +      {selectedEvent.children.length, plural,
                                                                                                                                                                                                                                                                              +        one {participant}
                                                                                                                                                                                                                                                                              +        other {participants}
                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                              +      )
                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                              +    <div *ngIf="hasAverage" i18n>
                                                                                                                                                                                                                                                                              +      {{ selectedEventStats.average | percent: "1.0-0" }}
                                                                                                                                                                                                                                                                              +      attended (of
                                                                                                                                                                                                                                                                              +      {{ selectedEvent.children.length }}
                                                                                                                                                                                                                                                                              +      {selectedEvent.children.length, plural,
                                                                                                                                                                                                                                                                              +        one {participant}
                                                                                                                                                                                                                                                                              +        other {participants}
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +      })
                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                              +    <div
                                                                                                                                                                                                                                                                              +      *ngIf="selectedEventStats.excludedUnknown > 0"
                                                                                                                                                                                                                                                                              +      i18n="Unknown status|How many children are without a status"
                                                                                                                                                                                                                                                                              +      class="unknown-status-notice"
                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                              +      {{ selectedEventStats.excludedUnknown }}
                                                                                                                                                                                                                                                                              +      {selectedEventStats.excludedUnknown, plural,
                                                                                                                                                                                                                                                                              +        one {participant}
                                                                                                                                                                                                                                                                              +        other {participants}
                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                              +      without recorded status
                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                              +    <button
                                                                                                                                                                                                                                                                              +      class="margin-top-regular"
                                                                                                                                                                                                                                                                              +      i18n="
                                                                                                                                                                                                                                                                              +        Show Details Button|Allows the user to see details of an event that took
                                                                                                                                                                                                                                                                              +        place at a particular day
                                                                                                                                                                                                                                                                              +      "
                                                                                                                                                                                                                                                                              +      mat-stroked-button
                                                                                                                                                                                                                                                                              +      (click)="showEventDetails(selectedEvent)"
                                                                                                                                                                                                                                                                              +      angulartics2On="click"
                                                                                                                                                                                                                                                                              +      angularticsCategory="Attendance"
                                                                                                                                                                                                                                                                              +      angularticsAction="calendar_show_event_details"
                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                              +      Details
                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  <ng-container *ngIf="!selectedEvent">
                                                                                                                                                                                                                                                                              +    <em
                                                                                                                                                                                                                                                                              +      i18n="
                                                                                                                                                                                                                                                                              +        No Events|Informs the user that there are no events at a particular date
                                                                                                                                                                                                                                                                              +      "
                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                              +      no events on this date
                                                                                                                                                                                                                                                                              +    </em>
                                                                                                                                                                                                                                                                              +    <button
                                                                                                                                                                                                                                                                              +      mat-stroked-button
                                                                                                                                                                                                                                                                              +      (click)="createNewEvent()"
                                                                                                                                                                                                                                                                              +      i18n="
                                                                                                                                                                                                                                                                              +        Add New Event Button|Allows the user to create a new event for the
                                                                                                                                                                                                                                                                              +        selected date
                                                                                                                                                                                                                                                                              +      "
                                                                                                                                                                                                                                                                              +      angulartics2On="click"
                                                                                                                                                                                                                                                                              +      angularticsCategory="Attendance"
                                                                                                                                                                                                                                                                              +      angularticsAction="calendar_create_event"
                                                                                                                                                                                                                                                                              +      style="margin-top: 12px; display: block"
                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                              +      Add new event
                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                              +  </ng-container>
                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              + ./attendance-calendar.component.scss +

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              @use "variables/colors";
                                                                                                                                                                                                                                                                              +@use "functions/gradient-helpers";
                                                                                                                                                                                                                                                                              +@use "variables/sizes";
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +mat-calendar {
                                                                                                                                                                                                                                                                              +  min-width: 200px;
                                                                                                                                                                                                                                                                              +  max-width: 300px;
                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +.unknown-status-notice {
                                                                                                                                                                                                                                                                              +  font-style: italic;
                                                                                                                                                                                                                                                                              +  color: colors.$error;
                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +.attendance-calendar-date-general {
                                                                                                                                                                                                                                                                              +  &.attendance-calendar-date-selected {
                                                                                                                                                                                                                                                                              +    font-weight: 900;
                                                                                                                                                                                                                                                                              +    font-size: 115%;
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  &.attendance-calendar-date-has-remarks {
                                                                                                                                                                                                                                                                              +    background: gradient-helpers.top-right-triangle(#5f5f5f);
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  &.attendance-calendar-date-has-participants-with-unknown-status {
                                                                                                                                                                                                                                                                              +    background: gradient-helpers.top-right-triangle(red);
                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +.attendance-calendar-details-form {
                                                                                                                                                                                                                                                                              +  padding: 10px;
                                                                                                                                                                                                                                                                              +  max-width: 300px;
                                                                                                                                                                                                                                                                              +  position: relative;
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +  border: 5px solid black;
                                                                                                                                                                                                                                                                              +  box-sizing: border-box;
                                                                                                                                                                                                                                                                              +  margin-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceDayBlockComponent.html b/documentation/components/AttendanceDayBlockComponent.html new file mode 100644 index 0000000000..9a2a019196 --- /dev/null +++ b/documentation/components/AttendanceDayBlockComponent.html @@ -0,0 +1,471 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                + src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.ts +

                                                                                                                                                                                                                                                                                + + + + + + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                Accessors
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                + + attendance +
                                                                                                                                                                                                                                                                                + Type : EventAttendance + +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                + Accessors +

                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                + + tooltip +
                                                                                                                                                                                                                                                                                + gettooltip() +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                +import { EventAttendance } from "../../../model/event-attendance";
                                                                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                +  selector: "app-attendance-day-block]",
                                                                                                                                                                                                                                                                                +  templateUrl: "./attendance-day-block.component.html",
                                                                                                                                                                                                                                                                                +  styleUrls: ["./attendance-day-block.component.scss"],
                                                                                                                                                                                                                                                                                +  imports: [MatTooltipModule],
                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                +export class AttendanceDayBlockComponent {
                                                                                                                                                                                                                                                                                +  @Input() attendance?: EventAttendance;
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +  get tooltip(): string {
                                                                                                                                                                                                                                                                                +    if (!this.attendance) {
                                                                                                                                                                                                                                                                                +      return $localize`No attendance information`;
                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                +    if (this.attendance?.remarks) {
                                                                                                                                                                                                                                                                                +      return this.attendance?.status.label + ": " + this.attendance?.remarks;
                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                +      return this.attendance?.status.label;
                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                <div
                                                                                                                                                                                                                                                                                +  class="day-cell attendance-{{ attendance?.status?.shortName || 'U' }} "
                                                                                                                                                                                                                                                                                +  [class.has-remark]="attendance?.remarks"
                                                                                                                                                                                                                                                                                +  [matTooltipShowDelay]="200"
                                                                                                                                                                                                                                                                                +  [matTooltip]="tooltip"
                                                                                                                                                                                                                                                                                +  matTooltipPosition="above"
                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                +  {{ attendance?.status?.shortName || "-" }}
                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                + ./attendance-day-block.component.scss +

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                @use "variables/colors";
                                                                                                                                                                                                                                                                                +@use "functions/gradient-helpers";
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +.day-cell {
                                                                                                                                                                                                                                                                                +  padding: 0.28em;
                                                                                                                                                                                                                                                                                +  line-height: 1em;
                                                                                                                                                                                                                                                                                +  width: 1ch;
                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +.has-remark {
                                                                                                                                                                                                                                                                                +  background-image: gradient-helpers.top-right-triangle(
                                                                                                                                                                                                                                                                                +    colors.$muted-background
                                                                                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceDetailsComponent.html b/documentation/components/AttendanceDetailsComponent.html new file mode 100644 index 0000000000..482b447b10 --- /dev/null +++ b/documentation/components/AttendanceDetailsComponent.html @@ -0,0 +1,867 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  + src/app/child-dev-project/attendance/attendance-details/attendance-details.component.ts +

                                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  +constructor(formDialog: FormDialogService, data: literal type) +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                  formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                  data + literal type + + No +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                  + Type : ActivityAttendance + +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  + + forChild +
                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  + + + showEventDetails + + +
                                                                                                                                                                                                                                                                                  +showEventDetails(event: EventNote) +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                  event + EventNote + + No +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  + + + EventNote + + +
                                                                                                                                                                                                                                                                                  + Default value : EventNote +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  + + + eventsColumns + + +
                                                                                                                                                                                                                                                                                  + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                  + Default value : [ + { id: "date" }, + { id: "subject", label: $localize`Event` }, + { + id: "getAttendance", + label: $localize`:How a child attended, e.g. too late, in time, excused, e.t.c:Attended`, + viewComponent: "ReadonlyFunction", + additional: (note: Note) => { + if (this.forChild) { + return note.getAttendance(this.forChild)?.status?.label || "-"; + } else { + return ( + (calculateAverageAttendance(note).average * 100).toFixed(0) + "%" || + "N/A" + ); + } + }, + }, + ] +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  import { Component, Inject, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                  +import { ActivityAttendance } from "../model/activity-attendance";
                                                                                                                                                                                                                                                                                  +import { Note } from "../../notes/model/note";
                                                                                                                                                                                                                                                                                  +import { calculateAverageAttendance } from "../model/calculate-average-event-attendance";
                                                                                                                                                                                                                                                                                  +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                  +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                  +import { EventNote } from "../model/event-note";
                                                                                                                                                                                                                                                                                  +import { DialogCloseComponent } from "../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                  +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                  +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                  +import { DatePipe, NgIf, PercentPipe } from "@angular/common";
                                                                                                                                                                                                                                                                                  +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                  +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                  +import { AttendanceCalendarComponent } from "../attendance-calendar/attendance-calendar.component";
                                                                                                                                                                                                                                                                                  +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                  +  selector: "app-attendance-details",
                                                                                                                                                                                                                                                                                  +  templateUrl: "./attendance-details.component.html",
                                                                                                                                                                                                                                                                                  +  styleUrls: ["./attendance-details.component.scss"],
                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                  +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                  +    MatDialogModule,
                                                                                                                                                                                                                                                                                  +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                  +    PercentPipe,
                                                                                                                                                                                                                                                                                  +    DatePipe,
                                                                                                                                                                                                                                                                                  +    FormsModule,
                                                                                                                                                                                                                                                                                  +    MatInputModule,
                                                                                                                                                                                                                                                                                  +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                  +    AttendanceCalendarComponent,
                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                  +export class AttendanceDetailsComponent {
                                                                                                                                                                                                                                                                                  +  @Input() entity: ActivityAttendance;
                                                                                                                                                                                                                                                                                  +  @Input() forChild: string;
                                                                                                                                                                                                                                                                                  +  EventNote = EventNote;
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +  eventsColumns: FormFieldConfig[] = [
                                                                                                                                                                                                                                                                                  +    { id: "date" },
                                                                                                                                                                                                                                                                                  +    { id: "subject", label: $localize`Event` },
                                                                                                                                                                                                                                                                                  +    {
                                                                                                                                                                                                                                                                                  +      id: "getAttendance",
                                                                                                                                                                                                                                                                                  +      label: $localize`:How a child attended, e.g. too late, in time, excused, e.t.c:Attended`,
                                                                                                                                                                                                                                                                                  +      viewComponent: "ReadonlyFunction",
                                                                                                                                                                                                                                                                                  +      additional: (note: Note) => {
                                                                                                                                                                                                                                                                                  +        if (this.forChild) {
                                                                                                                                                                                                                                                                                  +          return note.getAttendance(this.forChild)?.status?.label || "-";
                                                                                                                                                                                                                                                                                  +        } else {
                                                                                                                                                                                                                                                                                  +          return (
                                                                                                                                                                                                                                                                                  +            (calculateAverageAttendance(note).average * 100).toFixed(0) + "%" ||
                                                                                                                                                                                                                                                                                  +            "N/A"
                                                                                                                                                                                                                                                                                  +          );
                                                                                                                                                                                                                                                                                  +        }
                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                  +    },
                                                                                                                                                                                                                                                                                  +  ];
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                  +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                  +    @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                  +    data: { forChild: string; attendance: ActivityAttendance },
                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                  +    this.entity = data.attendance;
                                                                                                                                                                                                                                                                                  +    this.forChild = data.forChild;
                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +  showEventDetails(event: EventNote) {
                                                                                                                                                                                                                                                                                  +    this.formDialog.openView(event, "NoteDetails");
                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  <!--
                                                                                                                                                                                                                                                                                  +  ~     This file is part of ndb-core.
                                                                                                                                                                                                                                                                                  +  ~
                                                                                                                                                                                                                                                                                  +  ~     ndb-core is free software: you can redistribute it and/or modify
                                                                                                                                                                                                                                                                                  +  ~     it under the terms of the GNU General Public License as published by
                                                                                                                                                                                                                                                                                  +  ~     the Free Software Foundation, either version 3 of the License, or
                                                                                                                                                                                                                                                                                  +  ~     (at your option) any later version.
                                                                                                                                                                                                                                                                                  +  ~
                                                                                                                                                                                                                                                                                  +  ~     ndb-core is distributed in the hope that it will be useful,
                                                                                                                                                                                                                                                                                  +  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
                                                                                                                                                                                                                                                                                  +  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                                                                                                                                                                                                                                                                  +  ~     GNU General Public License for more details.
                                                                                                                                                                                                                                                                                  +  ~
                                                                                                                                                                                                                                                                                  +  ~     You should have received a copy of the GNU General Public License
                                                                                                                                                                                                                                                                                  +  ~     along with ndb-core.  If not, see <http://www.gnu.org/licenses/>.
                                                                                                                                                                                                                                                                                  +  -->
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +<h1 mat-dialog-title>
                                                                                                                                                                                                                                                                                  +  <app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                                                  +  {{ entity?.activity?.title }}: {{ entity.periodFrom | date: "shortDate" }} -
                                                                                                                                                                                                                                                                                  +  {{ entity.periodTo | date: "shortDate" }}
                                                                                                                                                                                                                                                                                  +</h1>
                                                                                                                                                                                                                                                                                  +<div mat-dialog-content>
                                                                                                                                                                                                                                                                                  +  <div
                                                                                                                                                                                                                                                                                  +    class="summary w-{{ entity.getWarningLevel() }}"
                                                                                                                                                                                                                                                                                  +    i18n="
                                                                                                                                                                                                                                                                                  +      Attendance|Attendance of a child (in percent) or the average of the event
                                                                                                                                                                                                                                                                                  +      (in percent)
                                                                                                                                                                                                                                                                                  +    "
                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                  +    Attendance:
                                                                                                                                                                                                                                                                                  +    {{
                                                                                                                                                                                                                                                                                  +      (forChild
                                                                                                                                                                                                                                                                                  +        ? entity?.getAttendancePercentage(forChild)
                                                                                                                                                                                                                                                                                  +        : entity?.getAttendancePercentageAverage()
                                                                                                                                                                                                                                                                                  +      ) | percent: "1.0-0"
                                                                                                                                                                                                                                                                                  +    }}
                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +  <div class="flex-row flex-wrap gap-regular" *ngIf="forChild">
                                                                                                                                                                                                                                                                                  +    <mat-form-field>
                                                                                                                                                                                                                                                                                  +      <input
                                                                                                                                                                                                                                                                                  +        matInput
                                                                                                                                                                                                                                                                                  +        type="number"
                                                                                                                                                                                                                                                                                  +        i18n-placeholder="days present|How many days a child was present"
                                                                                                                                                                                                                                                                                  +        placeholder="days present"
                                                                                                                                                                                                                                                                                  +        [value]="entity.countEventsPresent(forChild)"
                                                                                                                                                                                                                                                                                  +        readonly
                                                                                                                                                                                                                                                                                  +      />
                                                                                                                                                                                                                                                                                  +    </mat-form-field>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +    <mat-form-field>
                                                                                                                                                                                                                                                                                  +      <input
                                                                                                                                                                                                                                                                                  +        matInput
                                                                                                                                                                                                                                                                                  +        type="number"
                                                                                                                                                                                                                                                                                  +        i18n-placeholder="days absent|How many days a child was absent"
                                                                                                                                                                                                                                                                                  +        placeholder="days absent"
                                                                                                                                                                                                                                                                                  +        [value]="entity.countEventsAbsent(forChild)"
                                                                                                                                                                                                                                                                                  +        readonly
                                                                                                                                                                                                                                                                                  +      />
                                                                                                                                                                                                                                                                                  +    </mat-form-field>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +    <mat-form-field>
                                                                                                                                                                                                                                                                                  +      <input
                                                                                                                                                                                                                                                                                  +        matInput
                                                                                                                                                                                                                                                                                  +        type="number"
                                                                                                                                                                                                                                                                                  +        i18n-placeholder="
                                                                                                                                                                                                                                                                                  +          days absent|How many days the presence or absence of a child is
                                                                                                                                                                                                                                                                                  +          unknown
                                                                                                                                                                                                                                                                                  +        "
                                                                                                                                                                                                                                                                                  +        placeholder="unknown status"
                                                                                                                                                                                                                                                                                  +        [value]="entity.countEventsWithUnknownStatus(forChild)"
                                                                                                                                                                                                                                                                                  +        readonly
                                                                                                                                                                                                                                                                                  +      />
                                                                                                                                                                                                                                                                                  +    </mat-form-field>
                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +  <div class="flex-row flex-wrap gap-regular" *ngIf="!forChild">
                                                                                                                                                                                                                                                                                  +    <mat-form-field>
                                                                                                                                                                                                                                                                                  +      <input
                                                                                                                                                                                                                                                                                  +        matInput
                                                                                                                                                                                                                                                                                  +        type="number"
                                                                                                                                                                                                                                                                                  +        i18n-placeholder="Total present|How many children were present"
                                                                                                                                                                                                                                                                                  +        placeholder="Total present"
                                                                                                                                                                                                                                                                                  +        [value]="entity.countTotalPresent()"
                                                                                                                                                                                                                                                                                  +        readonly
                                                                                                                                                                                                                                                                                  +      />
                                                                                                                                                                                                                                                                                  +    </mat-form-field>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +    <mat-form-field>
                                                                                                                                                                                                                                                                                  +      <input
                                                                                                                                                                                                                                                                                  +        matInput
                                                                                                                                                                                                                                                                                  +        type="number"
                                                                                                                                                                                                                                                                                  +        i18n-placeholder="Total absent|How many children were absent"
                                                                                                                                                                                                                                                                                  +        placeholder="Total absent"
                                                                                                                                                                                                                                                                                  +        [value]="entity.countTotalAbsent()"
                                                                                                                                                                                                                                                                                  +        readonly
                                                                                                                                                                                                                                                                                  +      />
                                                                                                                                                                                                                                                                                  +    </mat-form-field>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +    <mat-form-field>
                                                                                                                                                                                                                                                                                  +      <input
                                                                                                                                                                                                                                                                                  +        matInput
                                                                                                                                                                                                                                                                                  +        type="number"
                                                                                                                                                                                                                                                                                  +        i18n-placeholder="
                                                                                                                                                                                                                                                                                  +          Total unknown|How many children have an unknown presence or absence
                                                                                                                                                                                                                                                                                  +          status
                                                                                                                                                                                                                                                                                  +        "
                                                                                                                                                                                                                                                                                  +        placeholder="Total unknown"
                                                                                                                                                                                                                                                                                  +        [value]="entity.countEventsWithUnknownStatus()"
                                                                                                                                                                                                                                                                                  +        readonly
                                                                                                                                                                                                                                                                                  +      />
                                                                                                                                                                                                                                                                                  +    </mat-form-field>
                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +  <app-entities-table
                                                                                                                                                                                                                                                                                  +    [entityType]="EventNote"
                                                                                                                                                                                                                                                                                  +    [records]="entity.events"
                                                                                                                                                                                                                                                                                  +    [customColumns]="eventsColumns"
                                                                                                                                                                                                                                                                                  +    clickMode="none"
                                                                                                                                                                                                                                                                                  +    (entityClick)="showEventDetails($event)"
                                                                                                                                                                                                                                                                                  +    [editable]="false"
                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                  +  </app-entities-table>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +  <app-attendance-calendar
                                                                                                                                                                                                                                                                                  +    [records]="entity.events"
                                                                                                                                                                                                                                                                                  +    [highlightForChild]="forChild"
                                                                                                                                                                                                                                                                                  +    [activity]="entity.activity"
                                                                                                                                                                                                                                                                                  +  ></app-attendance-calendar>
                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  + ./attendance-details.component.scss +

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  @use "variables/sizes";
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +.summary {
                                                                                                                                                                                                                                                                                  +  font-weight: bold;
                                                                                                                                                                                                                                                                                  +  margin-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceManagerComponent.html b/documentation/components/AttendanceManagerComponent.html new file mode 100644 index 0000000000..805cbb1ba4 --- /dev/null +++ b/documentation/components/AttendanceManagerComponent.html @@ -0,0 +1,561 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    + src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.ts +

                                                                                                                                                                                                                                                                                    + + + + + + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                    +constructor(comingSoonDialog: ComingSoonDialogService) +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                    comingSoonDialog + ComingSoonDialogService + + No +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + + + + + + +
                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                    + + + Public + comingSoonDialog + + +
                                                                                                                                                                                                                                                                                    + Type : ComingSoonDialogService + +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                    +import { ComingSoonDialogService } from "../../../features/coming-soon/coming-soon-dialog.service";
                                                                                                                                                                                                                                                                                    +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                    +import { RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                    +import { ViewTitleComponent } from "../../../core/common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                    +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +@RouteTarget("AttendanceManager")
                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                    +  selector: "app-attendance-manager",
                                                                                                                                                                                                                                                                                    +  templateUrl: "./attendance-manager.component.html",
                                                                                                                                                                                                                                                                                    +  styleUrls: ["./attendance-manager.component.scss"],
                                                                                                                                                                                                                                                                                    +  imports: [MatCardModule, MatButtonModule, RouterLink, ViewTitleComponent],
                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                    +export class AttendanceManagerComponent {
                                                                                                                                                                                                                                                                                    +  constructor(public comingSoonDialog: ComingSoonDialogService) {}
                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    <app-view-title
                                                                                                                                                                                                                                                                                    +  i18n="
                                                                                                                                                                                                                                                                                    +    Heading for Attendance Register|The heading for the view showing the
                                                                                                                                                                                                                                                                                    +    Attendance Register
                                                                                                                                                                                                                                                                                    +  "
                                                                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                                                                    +  Managing Attendance
                                                                                                                                                                                                                                                                                    +</app-view-title>
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +<div class="cards-wrapper">
                                                                                                                                                                                                                                                                                    +  <mat-card appearance="raised">
                                                                                                                                                                                                                                                                                    +    <mat-card-header>
                                                                                                                                                                                                                                                                                    +      <mat-card-title i18n="Record attendance title">
                                                                                                                                                                                                                                                                                    +        Record Attendance
                                                                                                                                                                                                                                                                                    +      </mat-card-title>
                                                                                                                                                                                                                                                                                    +    </mat-card-header>
                                                                                                                                                                                                                                                                                    +    <mat-card-content>
                                                                                                                                                                                                                                                                                    +      <p i18n="Record attendance content">
                                                                                                                                                                                                                                                                                    +        Record attendance for an activity on a certain day. Optimized for
                                                                                                                                                                                                                                                                                    +        smartphones.
                                                                                                                                                                                                                                                                                    +      </p>
                                                                                                                                                                                                                                                                                    +      <button
                                                                                                                                                                                                                                                                                    +        routerLink="/attendance/add-day"
                                                                                                                                                                                                                                                                                    +        mat-raised-button
                                                                                                                                                                                                                                                                                    +        i18n="Record attendance button"
                                                                                                                                                                                                                                                                                    +      >
                                                                                                                                                                                                                                                                                    +        Record
                                                                                                                                                                                                                                                                                    +      </button>
                                                                                                                                                                                                                                                                                    +    </mat-card-content>
                                                                                                                                                                                                                                                                                    +  </mat-card>
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +  <mat-card appearance="raised">
                                                                                                                                                                                                                                                                                    +    <mat-card-header>
                                                                                                                                                                                                                                                                                    +      <mat-card-title i18n="Manage Activities title">
                                                                                                                                                                                                                                                                                    +        Recurring Activities
                                                                                                                                                                                                                                                                                    +      </mat-card-title>
                                                                                                                                                                                                                                                                                    +    </mat-card-header>
                                                                                                                                                                                                                                                                                    +    <mat-card-content>
                                                                                                                                                                                                                                                                                    +      <p i18n="Manage Activities content">
                                                                                                                                                                                                                                                                                    +        Manage "recurring activities" for which you regularly record attendance.
                                                                                                                                                                                                                                                                                    +        You can assign participants and users to these activities and analyze
                                                                                                                                                                                                                                                                                    +        their attendance across time.
                                                                                                                                                                                                                                                                                    +      </p>
                                                                                                                                                                                                                                                                                    +      <button
                                                                                                                                                                                                                                                                                    +        routerLink="/attendance/recurring-activity"
                                                                                                                                                                                                                                                                                    +        mat-raised-button
                                                                                                                                                                                                                                                                                    +        i18n="Manage activities button"
                                                                                                                                                                                                                                                                                    +      >
                                                                                                                                                                                                                                                                                    +        Manage Activities
                                                                                                                                                                                                                                                                                    +      </button>
                                                                                                                                                                                                                                                                                    +    </mat-card-content>
                                                                                                                                                                                                                                                                                    +  </mat-card>
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +  <mat-card appearance="raised" disabled>
                                                                                                                                                                                                                                                                                    +    <mat-card-header>
                                                                                                                                                                                                                                                                                    +      <mat-card-title i18n="Monthly attendance title">
                                                                                                                                                                                                                                                                                    +        Monthly Attendance
                                                                                                                                                                                                                                                                                    +      </mat-card-title>
                                                                                                                                                                                                                                                                                    +    </mat-card-header>
                                                                                                                                                                                                                                                                                    +    <mat-card-content>
                                                                                                                                                                                                                                                                                    +      <p i18n="Monthly attendance content">
                                                                                                                                                                                                                                                                                    +        Document attendance totals for a whole month that were collected on
                                                                                                                                                                                                                                                                                    +        paper.
                                                                                                                                                                                                                                                                                    +      </p>
                                                                                                                                                                                                                                                                                    +      <button
                                                                                                                                                                                                                                                                                    +        (click)="comingSoonDialog.open('monthly-attendance')"
                                                                                                                                                                                                                                                                                    +        mat-stroked-button
                                                                                                                                                                                                                                                                                    +        i18n="Enter attendance button"
                                                                                                                                                                                                                                                                                    +      >
                                                                                                                                                                                                                                                                                    +        Document Month
                                                                                                                                                                                                                                                                                    +      </button>
                                                                                                                                                                                                                                                                                    +    </mat-card-content>
                                                                                                                                                                                                                                                                                    +  </mat-card>
                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    + ./attendance-manager.component.scss +

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    @use "variables/sizes";
                                                                                                                                                                                                                                                                                    +@use "variables/colors";
                                                                                                                                                                                                                                                                                    +@use "mixins/grid-layout";
                                                                                                                                                                                                                                                                                    +@use "typography/custom-typography";
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +.cards-wrapper {
                                                                                                                                                                                                                                                                                    +  @include grid-layout.adaptive($min-block-width: 250px);
                                                                                                                                                                                                                                                                                    +  margin-top: sizes.$large;
                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +.mat-mdc-card[disabled] {
                                                                                                                                                                                                                                                                                    +  background-color: colors.$disabled-transparent;
                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +mat-card-content {
                                                                                                                                                                                                                                                                                    +  display: flex;
                                                                                                                                                                                                                                                                                    +  flex-direction: column;
                                                                                                                                                                                                                                                                                    +  justify-content: space-between;
                                                                                                                                                                                                                                                                                    +  height: 100%;
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +  > button {
                                                                                                                                                                                                                                                                                    +    width: 100%;
                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceStatusSelectComponent.html b/documentation/components/AttendanceStatusSelectComponent.html new file mode 100644 index 0000000000..83d4b64da4 --- /dev/null +++ b/documentation/components/AttendanceStatusSelectComponent.html @@ -0,0 +1,605 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      + src/app/child-dev-project/attendance/attendance-status-select/attendance-status-select.component.ts +

                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Outputs
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      + + disabled +
                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      + + value +
                                                                                                                                                                                                                                                                                      + Type : AttendanceStatusType + +
                                                                                                                                                                                                                                                                                      + Default value : NullAttendanceStatusType +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      Outputs

                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      + + valueChange +
                                                                                                                                                                                                                                                                                      + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      + + + compareFn + + +
                                                                                                                                                                                                                                                                                      + Default value : compareEnums +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      + + + statusID + + +
                                                                                                                                                                                                                                                                                      + Default value : ATTENDANCE_STATUS_CONFIG_ID +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                      +  ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                                                                                                                                                      +  AttendanceStatusType,
                                                                                                                                                                                                                                                                                      +  NullAttendanceStatusType,
                                                                                                                                                                                                                                                                                      +} from "../model/attendance-status";
                                                                                                                                                                                                                                                                                      +import { compareEnums } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                      +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                      +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                      +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumDirective } from "../../../core/basic-datatypes/configurable-enum/configurable-enum-directive/configurable-enum.directive";
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                      +  selector: "app-attendance-status-select",
                                                                                                                                                                                                                                                                                      +  templateUrl: "./attendance-status-select.component.html",
                                                                                                                                                                                                                                                                                      +  styleUrls: ["./attendance-status-select.component.scss"],
                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                      +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                      +    MatSelectModule,
                                                                                                                                                                                                                                                                                      +    FormsModule,
                                                                                                                                                                                                                                                                                      +    ConfigurableEnumDirective,
                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                      +export class AttendanceStatusSelectComponent {
                                                                                                                                                                                                                                                                                      +  @Input() value: AttendanceStatusType = NullAttendanceStatusType;
                                                                                                                                                                                                                                                                                      +  @Input() disabled: boolean = false;
                                                                                                                                                                                                                                                                                      +  @Output() valueChange = new EventEmitter<AttendanceStatusType>();
                                                                                                                                                                                                                                                                                      +  statusID = ATTENDANCE_STATUS_CONFIG_ID;
                                                                                                                                                                                                                                                                                      +  compareFn = compareEnums;
                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      <mat-form-field class="compact-form-field">
                                                                                                                                                                                                                                                                                      +  <div
                                                                                                                                                                                                                                                                                      +    [class]="value.style"
                                                                                                                                                                                                                                                                                      +    class="indicator indicator__prefix"
                                                                                                                                                                                                                                                                                      +    matPrefix
                                                                                                                                                                                                                                                                                      +  ></div>
                                                                                                                                                                                                                                                                                      +  <mat-select
                                                                                                                                                                                                                                                                                      +    [(ngModel)]="value"
                                                                                                                                                                                                                                                                                      +    (ngModelChange)="valueChange.emit(value)"
                                                                                                                                                                                                                                                                                      +    [disabled]="disabled"
                                                                                                                                                                                                                                                                                      +    [compareWith]="compareFn"
                                                                                                                                                                                                                                                                                      +  >
                                                                                                                                                                                                                                                                                      +    <mat-option *appConfigurableEnum="let s of statusID" [value]="s">
                                                                                                                                                                                                                                                                                      +      <span class="indicator indicator__option" [class]="s.style"></span
                                                                                                                                                                                                                                                                                      +      >{{ s.label }}
                                                                                                                                                                                                                                                                                      +    </mat-option>
                                                                                                                                                                                                                                                                                      +  </mat-select>
                                                                                                                                                                                                                                                                                      +</mat-form-field>
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      + ./attendance-status-select.component.scss +

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      @use "variables/sizes";
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +/* The indicator is a round, colored shape with a small margin on the right
                                                                                                                                                                                                                                                                                      +it is used as prefix in the form field and for the individual options */
                                                                                                                                                                                                                                                                                      +.indicator {
                                                                                                                                                                                                                                                                                      +  width: sizes.$regular;
                                                                                                                                                                                                                                                                                      +  height: sizes.$regular;
                                                                                                                                                                                                                                                                                      +  border-radius: 50%;
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +  margin-right: sizes.$small;
                                                                                                                                                                                                                                                                                      +  margin-left: sizes.$small;
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +  /* when the indicator is used as prefix in a form field
                                                                                                                                                                                                                                                                                      +     it should be center-aligned with the content, but is baseline-aligned
                                                                                                                                                                                                                                                                                      +     without this small margin */
                                                                                                                                                                                                                                                                                      +  &__prefix {
                                                                                                                                                                                                                                                                                      +    margin-bottom: 0.15em;
                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +  /* when the indicator is used inside the option-field it has `display: inline`
                                                                                                                                                                                                                                                                                      +     which causes the field not to draw correctly */
                                                                                                                                                                                                                                                                                      +  &__option {
                                                                                                                                                                                                                                                                                      +    display: inline-block;
                                                                                                                                                                                                                                                                                      +    vertical-align: middle;
                                                                                                                                                                                                                                                                                      +    margin-bottom: 0.225em;
                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceSummaryComponent.html b/documentation/components/AttendanceSummaryComponent.html new file mode 100644 index 0000000000..689f1051fe --- /dev/null +++ b/documentation/components/AttendanceSummaryComponent.html @@ -0,0 +1,647 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        + src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.ts +

                                                                                                                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Accessors
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        + + attendance +
                                                                                                                                                                                                                                                                                        + Type : ActivityAttendance + +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        + + columns +
                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        + + forChild +
                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        + + + _columns + + +
                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        + Accessors +

                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        + + columns +
                                                                                                                                                                                                                                                                                        + setcolumns(value: FormFieldConfig[]) +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                        value + FormFieldConfig[] + + No +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                        +import { ActivityAttendance } from "../model/activity-attendance";
                                                                                                                                                                                                                                                                                        +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                        +import { DatePipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                        +import { DynamicComponentDirective } from "../../../core/config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                        +  selector: "app-attendance-summary",
                                                                                                                                                                                                                                                                                        +  templateUrl: "./attendance-summary.component.html",
                                                                                                                                                                                                                                                                                        +  styleUrls: ["./attendance-summary.component.scss"],
                                                                                                                                                                                                                                                                                        +  imports: [NgIf, DatePipe, NgForOf, DynamicComponentDirective],
                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                        +export class AttendanceSummaryComponent {
                                                                                                                                                                                                                                                                                        +  @Input() attendance: ActivityAttendance;
                                                                                                                                                                                                                                                                                        +  @Input() forChild: string;
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +  @Input() set columns(value: FormFieldConfig[]) {
                                                                                                                                                                                                                                                                                        +    this._columns = value
                                                                                                                                                                                                                                                                                        +      // hide periodFrom / periodTo as it is displayed in custom styling directly in the template
                                                                                                                                                                                                                                                                                        +      .filter((col) => !["periodFrom", "periodTo"].includes(col.id))
                                                                                                                                                                                                                                                                                        +      // start with most summative column, usually displayed right-most in table
                                                                                                                                                                                                                                                                                        +      .reverse();
                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +  _columns: FormFieldConfig[] = [];
                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        <ng-container *ngIf="attendance">
                                                                                                                                                                                                                                                                                        +  <h4 class="summary-title" i18n="Attendance summary title">
                                                                                                                                                                                                                                                                                        +    Overall Attendance
                                                                                                                                                                                                                                                                                        +  </h4>
                                                                                                                                                                                                                                                                                        +  <p class="summary-period">
                                                                                                                                                                                                                                                                                        +    {{ attendance.periodFrom | date: "shortDate" }} -
                                                                                                                                                                                                                                                                                        +    {{ attendance.periodTo | date: "shortDate" }}
                                                                                                                                                                                                                                                                                        +  </p>
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +  <table class="summary-table">
                                                                                                                                                                                                                                                                                        +    <tr *ngFor="let col of _columns" class="summary-row">
                                                                                                                                                                                                                                                                                        +      <td class="padding-small">{{ col.label }}:</td>
                                                                                                                                                                                                                                                                                        +      <td class="summary-cell">
                                                                                                                                                                                                                                                                                        +        <ng-container
                                                                                                                                                                                                                                                                                        +          [appDynamicComponent]="{
                                                                                                                                                                                                                                                                                        +            component: col.viewComponent,
                                                                                                                                                                                                                                                                                        +            config: {
                                                                                                                                                                                                                                                                                        +              id: col.id,
                                                                                                                                                                                                                                                                                        +              entity: attendance,
                                                                                                                                                                                                                                                                                        +              config: col.additional,
                                                                                                                                                                                                                                                                                        +            },
                                                                                                                                                                                                                                                                                        +          }"
                                                                                                                                                                                                                                                                                        +        ></ng-container>
                                                                                                                                                                                                                                                                                        +      </td>
                                                                                                                                                                                                                                                                                        +    </tr>
                                                                                                                                                                                                                                                                                        +  </table>
                                                                                                                                                                                                                                                                                        +</ng-container>
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        + ./attendance-summary.component.scss +

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        @use "sass:map";
                                                                                                                                                                                                                                                                                        +@use "variables/sizes";
                                                                                                                                                                                                                                                                                        +@use "variables/colors";
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +.summary-title {
                                                                                                                                                                                                                                                                                        +  margin-bottom: 0.25em;
                                                                                                                                                                                                                                                                                        +  font-size: 150%;
                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +.summary-period {
                                                                                                                                                                                                                                                                                        +  color: colors.$hint-text;
                                                                                                                                                                                                                                                                                        +  font-size: 110%;
                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +.summary-table {
                                                                                                                                                                                                                                                                                        +  border-spacing: 0 sizes.$small;
                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +.summary-row {
                                                                                                                                                                                                                                                                                        +  background-color: colors.$grey-transparent;
                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +.summary-cell {
                                                                                                                                                                                                                                                                                        +  font-size: 150%;
                                                                                                                                                                                                                                                                                        +  text-align: right;
                                                                                                                                                                                                                                                                                        +  padding: sizes.$small;
                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +:host {
                                                                                                                                                                                                                                                                                        +  display: block;
                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/AttendanceWeekDashboardComponent.html b/documentation/components/AttendanceWeekDashboardComponent.html new file mode 100644 index 0000000000..73ea869198 --- /dev/null +++ b/documentation/components/AttendanceWeekDashboardComponent.html @@ -0,0 +1,1049 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          + src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.ts +

                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          + DashboardWidget +

                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          + OnInit +

                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          +constructor(attendanceService: AttendanceService, router: Router, entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                          attendanceService + AttendanceService + + No +
                                                                                                                                                                                                                                                                                          router + Router + + No +
                                                                                                                                                                                                                                                                                          entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + absentWarningThreshold +
                                                                                                                                                                                                                                                                                          + Type : number + +
                                                                                                                                                                                                                                                                                          + Default value : 1 +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          Only participants who were absent more than this threshold are counted and shown in the dashboard.

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          The default is 1. +That means if someone was absent two or more days within a specific activity in the given week +the person will be counted and displayed as a critical case in this dashboard widget.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + attendanceStatusType +
                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          The special attendance status type for which this widget should filter.

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          (Optional) If this is not set, all status types that are counted as logically "ABSENT" are considered.

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + daysOffset +
                                                                                                                                                                                                                                                                                          + Type : number + +
                                                                                                                                                                                                                                                                                          + Default value : 0 +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          The offset from the default time period, which is the last complete week.

                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          For example: +If you set the offset of 0, the widget displays attendance for the last completed week (i.e. ending last Saturday). +If you set the offset to 7 and today is Thursday, the widget displays attendance from the Monday 3 days ago +(i.e. the current running week).

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + label +
                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          description displayed to users for what this widget is analysing +e.g. "Absences this week"

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + periodLabel +
                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + + Static + + getRequiredEntities + + +
                                                                                                                                                                                                                                                                                          + + getRequiredEntities() +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Inherited from DashboardWidget +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Defined in DashboardWidget:45 +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + + goToChild + + +
                                                                                                                                                                                                                                                                                          +goToChild(childId: string) +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                          childId + string + + No +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          + + + entries + + +
                                                                                                                                                                                                                                                                                          + Type : AttendanceWeekRow[][] + +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                          +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                          +import { AttendanceLogicalStatus } from "../../model/attendance-status";
                                                                                                                                                                                                                                                                                          +import { AttendanceService } from "../../attendance.service";
                                                                                                                                                                                                                                                                                          +import { EventAttendance } from "../../model/event-attendance";
                                                                                                                                                                                                                                                                                          +import { ActivityAttendance } from "../../model/activity-attendance";
                                                                                                                                                                                                                                                                                          +import { RecurringActivity } from "../../model/recurring-activity";
                                                                                                                                                                                                                                                                                          +import moment, { Moment } from "moment";
                                                                                                                                                                                                                                                                                          +import { groupBy } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                          +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                          +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                          +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                          +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                          +import { AttendanceDayBlockComponent } from "./attendance-day-block/attendance-day-block.component";
                                                                                                                                                                                                                                                                                          +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                          +import { EventNote } from "../../model/event-note";
                                                                                                                                                                                                                                                                                          +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +interface AttendanceWeekRow {
                                                                                                                                                                                                                                                                                          +  childId: string;
                                                                                                                                                                                                                                                                                          +  activity: RecurringActivity;
                                                                                                                                                                                                                                                                                          +  attendanceDays: (EventAttendance | undefined)[];
                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +@DynamicComponent("AttendanceWeekDashboard")
                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                          +  selector: "app-attendance-week-dashboard",
                                                                                                                                                                                                                                                                                          +  templateUrl: "./attendance-week-dashboard.component.html",
                                                                                                                                                                                                                                                                                          +  styleUrls: ["./attendance-week-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                          +    MatTableModule,
                                                                                                                                                                                                                                                                                          +    NgForOf,
                                                                                                                                                                                                                                                                                          +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                          +    AttendanceDayBlockComponent,
                                                                                                                                                                                                                                                                                          +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                          +export class AttendanceWeekDashboardComponent
                                                                                                                                                                                                                                                                                          +  extends DashboardWidget
                                                                                                                                                                                                                                                                                          +  implements OnInit
                                                                                                                                                                                                                                                                                          +{
                                                                                                                                                                                                                                                                                          +  static override getRequiredEntities() {
                                                                                                                                                                                                                                                                                          +    return EventNote.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                          +   * The offset from the default time period, which is the last complete week.
                                                                                                                                                                                                                                                                                          +   *
                                                                                                                                                                                                                                                                                          +   * For example:
                                                                                                                                                                                                                                                                                          +   * If you set the offset of 0, the widget displays attendance for the last completed week (i.e. ending last Saturday).
                                                                                                                                                                                                                                                                                          +   * If you set the offset to 7 and today is Thursday, the widget displays attendance from the Monday 3 days ago
                                                                                                                                                                                                                                                                                          +   * (i.e. the current running week).
                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                          +  @Input() daysOffset = 0;
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                          +   * description displayed to users for what this widget is analysing
                                                                                                                                                                                                                                                                                          +   * e.g. "Absences this week"
                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                          +  @Input() label: string;
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  @Input() periodLabel: string;
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                          +   * Only participants who were absent more than this threshold are counted and shown in the dashboard.
                                                                                                                                                                                                                                                                                          +   *
                                                                                                                                                                                                                                                                                          +   * The default is 1.
                                                                                                                                                                                                                                                                                          +   * That means if someone was absent two or more days within a specific activity in the given week
                                                                                                                                                                                                                                                                                          +   * the person will be counted and displayed as a critical case in this dashboard widget.
                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                          +  @Input() absentWarningThreshold: number = 1;
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                          +   * The special attendance status type for which this widget should filter.
                                                                                                                                                                                                                                                                                          +   *
                                                                                                                                                                                                                                                                                          +   * (Optional) If this is not set, all status types that are counted as logically "ABSENT" are considered.
                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                          +  @Input() attendanceStatusType: string;
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  entries: AttendanceWeekRow[][];
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                          +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                                          +    private router: Router,
                                                                                                                                                                                                                                                                                          +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                          +    super();
                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  ngOnInit() {
                                                                                                                                                                                                                                                                                          +    if (this.periodLabel && !this.label) {
                                                                                                                                                                                                                                                                                          +      this.label = $localize`:Dashboard attendance component subtitle:Absences ${this.periodLabel}`;
                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                          +    return this.loadAttendanceOfAbsentees();
                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  private async loadAttendanceOfAbsentees() {
                                                                                                                                                                                                                                                                                          +    const previousMonday = moment()
                                                                                                                                                                                                                                                                                          +      .startOf("isoWeek")
                                                                                                                                                                                                                                                                                          +      .subtract(1, "week")
                                                                                                                                                                                                                                                                                          +      .add(this.daysOffset, "days");
                                                                                                                                                                                                                                                                                          +    const previousSaturday = moment(previousMonday).add(5, "days");
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +    const activityAttendances =
                                                                                                                                                                                                                                                                                          +      await this.attendanceService.getAllActivityAttendancesForPeriod(
                                                                                                                                                                                                                                                                                          +        previousMonday.toDate(),
                                                                                                                                                                                                                                                                                          +        previousSaturday.toDate(),
                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                          +    const lowAttendanceCases = new Set<string>();
                                                                                                                                                                                                                                                                                          +    const records: AttendanceWeekRow[] = [];
                                                                                                                                                                                                                                                                                          +    for (const att of activityAttendances) {
                                                                                                                                                                                                                                                                                          +      const rows = this.generateRowsFromActivityAttendance(
                                                                                                                                                                                                                                                                                          +        att,
                                                                                                                                                                                                                                                                                          +        moment(previousMonday),
                                                                                                                                                                                                                                                                                          +        moment(previousSaturday),
                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                          +      records.push(...rows);
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +      rows
                                                                                                                                                                                                                                                                                          +        .filter((r) => this.filterLowAttendance(r))
                                                                                                                                                                                                                                                                                          +        .forEach((r) => lowAttendanceCases.add(r.childId));
                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +    const groups = groupBy(records, "childId");
                                                                                                                                                                                                                                                                                          +    this.entries = groups
                                                                                                                                                                                                                                                                                          +      .filter(([childId]) => lowAttendanceCases.has(childId))
                                                                                                                                                                                                                                                                                          +      .map(([_, attendance]) => attendance);
                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  private generateRowsFromActivityAttendance(
                                                                                                                                                                                                                                                                                          +    att: ActivityAttendance,
                                                                                                                                                                                                                                                                                          +    from: Moment,
                                                                                                                                                                                                                                                                                          +    to: Moment,
                                                                                                                                                                                                                                                                                          +  ): AttendanceWeekRow[] {
                                                                                                                                                                                                                                                                                          +    if (!att.activity) {
                                                                                                                                                                                                                                                                                          +      return [];
                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +    const results: AttendanceWeekRow[] = [];
                                                                                                                                                                                                                                                                                          +    for (const participant of att.activity.participants) {
                                                                                                                                                                                                                                                                                          +      const eventAttendances = [];
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +      let day = moment(from);
                                                                                                                                                                                                                                                                                          +      while (day.isSameOrBefore(to, "day")) {
                                                                                                                                                                                                                                                                                          +        const event = att.events.find((e) => day.isSame(e.date, "day"));
                                                                                                                                                                                                                                                                                          +        if (event) {
                                                                                                                                                                                                                                                                                          +          eventAttendances.push(event.getAttendance(participant));
                                                                                                                                                                                                                                                                                          +        } else {
                                                                                                                                                                                                                                                                                          +          // put a "placeholder" into the array for the current day
                                                                                                                                                                                                                                                                                          +          eventAttendances.push(undefined);
                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                          +        day = day.add(1, "day");
                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +      results.push({
                                                                                                                                                                                                                                                                                          +        childId: participant,
                                                                                                                                                                                                                                                                                          +        activity: att.activity,
                                                                                                                                                                                                                                                                                          +        attendanceDays: eventAttendances,
                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +    return results;
                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  private filterLowAttendance(row: AttendanceWeekRow): boolean {
                                                                                                                                                                                                                                                                                          +    let countAbsences = 0;
                                                                                                                                                                                                                                                                                          +    if (!this.attendanceStatusType) {
                                                                                                                                                                                                                                                                                          +      countAbsences = row.attendanceDays.filter(
                                                                                                                                                                                                                                                                                          +        (e) => e?.status?.countAs === AttendanceLogicalStatus.ABSENT,
                                                                                                                                                                                                                                                                                          +      ).length;
                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                          +      countAbsences = row.attendanceDays.filter(
                                                                                                                                                                                                                                                                                          +        (e) => e?.status?.id === this.attendanceStatusType,
                                                                                                                                                                                                                                                                                          +      ).length;
                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +    return countAbsences > this.absentWarningThreshold;
                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +  goToChild(childId: string) {
                                                                                                                                                                                                                                                                                          +    const Child = this.entityRegistry.get("Child");
                                                                                                                                                                                                                                                                                          +    this.router.navigate([Child.route, childId]);
                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                          +  icon="exclamation-triangle"
                                                                                                                                                                                                                                                                                          +  theme="attendance"
                                                                                                                                                                                                                                                                                          +  [subtitle]="label"
                                                                                                                                                                                                                                                                                          +  explanation="Cases absent multiple times in the given week"
                                                                                                                                                                                                                                                                                          +  i18n-explanation="Dashboard attendance component explanation tooltip"
                                                                                                                                                                                                                                                                                          +  [entries]="entries"
                                                                                                                                                                                                                                                                                          +>
                                                                                                                                                                                                                                                                                          +  <div class="table-wrapper">
                                                                                                                                                                                                                                                                                          +    <table mat-table i18n-aria-label aria-label="cases absent multiple times">
                                                                                                                                                                                                                                                                                          +      <!-- Table header only for assistive technologies like screen readers -->
                                                                                                                                                                                                                                                                                          +      <tr hidden="true">
                                                                                                                                                                                                                                                                                          +        <th scope="col" i18n="The participant of a group, e.g. a school">
                                                                                                                                                                                                                                                                                          +          Participant
                                                                                                                                                                                                                                                                                          +        </th>
                                                                                                                                                                                                                                                                                          +        <th scope="col" i18n="The attendance of a participant, e.g. a student">
                                                                                                                                                                                                                                                                                          +          Attendance
                                                                                                                                                                                                                                                                                          +        </th>
                                                                                                                                                                                                                                                                                          +      </tr>
                                                                                                                                                                                                                                                                                          +      <ng-container matColumnDef="child">
                                                                                                                                                                                                                                                                                          +        <td
                                                                                                                                                                                                                                                                                          +          *matCellDef="let rowGroup"
                                                                                                                                                                                                                                                                                          +          (click)="goToChild(rowGroup[0].childId)"
                                                                                                                                                                                                                                                                                          +          class="pointer"
                                                                                                                                                                                                                                                                                          +        >
                                                                                                                                                                                                                                                                                          +          <app-entity-block
                                                                                                                                                                                                                                                                                          +            [entityId]="rowGroup[0].childId"
                                                                                                                                                                                                                                                                                          +            entityType="Child"
                                                                                                                                                                                                                                                                                          +          ></app-entity-block>
                                                                                                                                                                                                                                                                                          +        </td>
                                                                                                                                                                                                                                                                                          +      </ng-container>
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +      <ng-container matColumnDef="attendance">
                                                                                                                                                                                                                                                                                          +        <td *matCellDef="let rowGroup">
                                                                                                                                                                                                                                                                                          +          <div
                                                                                                                                                                                                                                                                                          +            *ngFor="let activityRecord of rowGroup"
                                                                                                                                                                                                                                                                                          +            class="activities-record"
                                                                                                                                                                                                                                                                                          +          >
                                                                                                                                                                                                                                                                                          +            <ng-container *ngFor="let day of activityRecord.attendanceDays">
                                                                                                                                                                                                                                                                                          +              <app-attendance-day-block
                                                                                                                                                                                                                                                                                          +                [attendance]="day"
                                                                                                                                                                                                                                                                                          +              ></app-attendance-day-block>
                                                                                                                                                                                                                                                                                          +            </ng-container>
                                                                                                                                                                                                                                                                                          +          </div>
                                                                                                                                                                                                                                                                                          +        </td>
                                                                                                                                                                                                                                                                                          +      </ng-container>
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +      <tr mat-row *matRowDef="let row; columns: ['child', 'attendance']"></tr>
                                                                                                                                                                                                                                                                                          +    </table>
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +    <div
                                                                                                                                                                                                                                                                                          +      *ngIf="entries?.length === 0"
                                                                                                                                                                                                                                                                                          +      i18n="Placeholder if no absences are visible in dashboar"
                                                                                                                                                                                                                                                                                          +      class="headline"
                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                          +      no absences recorded
                                                                                                                                                                                                                                                                                          +    </div>
                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                          +</app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          + ./attendance-week-dashboard.component.scss +

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          @use "../../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +/* Lays out the single day components */
                                                                                                                                                                                                                                                                                          +.activities-record {
                                                                                                                                                                                                                                                                                          +  display: flex;
                                                                                                                                                                                                                                                                                          +  flex-direction: row;
                                                                                                                                                                                                                                                                                          +  gap: 3px;
                                                                                                                                                                                                                                                                                          +  /* puts the whole component to the end */
                                                                                                                                                                                                                                                                                          +  justify-content: flex-end;
                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/BackgroundProcessingIndicatorComponent.html b/documentation/components/BackgroundProcessingIndicatorComponent.html new file mode 100644 index 0000000000..999bed0dc2 --- /dev/null +++ b/documentation/components/BackgroundProcessingIndicatorComponent.html @@ -0,0 +1,806 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            + src/app/core/ui/sync-status/background-processing-indicator/background-processing-indicator.component.ts +

                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            A dumb component handling presentation of the sync indicator icon +and an additional details dropdown listing all currently running background processes.

                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + + backgroundProcesses +
                                                                                                                                                                                                                                                                                            + Type : Observable<BackgroundProcessState[]> + +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            details on current background processes to be displayed to user

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + + summarize +
                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                            + Default value : true +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            whether processes of with the same title shall be summarized into one line

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + + + allTasksFinished + + +
                                                                                                                                                                                                                                                                                            + Type : Observable<boolean> + +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + + + filteredProcesses + + +
                                                                                                                                                                                                                                                                                            + Type : Observable<BackgroundProcessState[]> + +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + + + taskCounterObservable + + +
                                                                                                                                                                                                                                                                                            + Type : Observable<number> + +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + + + + taskListDropdownTrigger + + +
                                                                                                                                                                                                                                                                                            + Type : MatMenuTrigger + +
                                                                                                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                                                                                                            + + @ViewChild(MatMenuTrigger)
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            handle to programmatically open/close the details dropdown

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            + + + wasClosed + + +
                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                            + Default value : false +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            import { Component, Input, OnInit, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                            +import { MatMenuModule, MatMenuTrigger } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                            +import { BackgroundProcessState } from "../background-process-state.interface";
                                                                                                                                                                                                                                                                                            +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                            +import { map, startWith } from "rxjs/operators";
                                                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                            +import { MatBadgeModule } from "@angular/material/badge";
                                                                                                                                                                                                                                                                                            +import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                            +import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
                                                                                                                                                                                                                                                                                            +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                            +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                            + * A dumb component handling presentation of the sync indicator icon
                                                                                                                                                                                                                                                                                            + * and an additional details dropdown listing all currently running background processes.
                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                            +  selector: "app-background-processing-indicator",
                                                                                                                                                                                                                                                                                            +  templateUrl: "./background-processing-indicator.component.html",
                                                                                                                                                                                                                                                                                            +  styleUrls: ["./background-processing-indicator.component.scss"],
                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                                                                                            +    MatBadgeModule,
                                                                                                                                                                                                                                                                                            +    MatMenuModule,
                                                                                                                                                                                                                                                                                            +    AsyncPipe,
                                                                                                                                                                                                                                                                                            +    NgForOf,
                                                                                                                                                                                                                                                                                            +    MatProgressSpinnerModule,
                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                            +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                            +    MatTooltipModule,
                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                            +export class BackgroundProcessingIndicatorComponent implements OnInit {
                                                                                                                                                                                                                                                                                            +  /** details on current background processes to be displayed to user */
                                                                                                                                                                                                                                                                                            +  @Input() backgroundProcesses: Observable<BackgroundProcessState[]>;
                                                                                                                                                                                                                                                                                            +  filteredProcesses: Observable<BackgroundProcessState[]>;
                                                                                                                                                                                                                                                                                            +  taskCounterObservable: Observable<number>;
                                                                                                                                                                                                                                                                                            +  allTasksFinished: Observable<boolean>;
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +  /** whether processes of with the same title shall be summarized into one line */
                                                                                                                                                                                                                                                                                            +  @Input() summarize: boolean = true;
                                                                                                                                                                                                                                                                                            +  wasClosed: boolean = false;
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +  /** handle to programmatically open/close the details dropdown */
                                                                                                                                                                                                                                                                                            +  @ViewChild(MatMenuTrigger) taskListDropdownTrigger: MatMenuTrigger;
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +  ngOnInit() {
                                                                                                                                                                                                                                                                                            +    this.filteredProcesses = this.backgroundProcesses.pipe(
                                                                                                                                                                                                                                                                                            +      map((processes) => this.summarizeProcesses(processes)),
                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                            +    this.taskCounterObservable = this.filteredProcesses.pipe(
                                                                                                                                                                                                                                                                                            +      map((processes) => processes.filter((p) => p.pending).length),
                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                            +    this.allTasksFinished = this.taskCounterObservable.pipe(
                                                                                                                                                                                                                                                                                            +      startWith(0),
                                                                                                                                                                                                                                                                                            +      map((tc) => tc === 0),
                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                            +    this.taskCounterObservable
                                                                                                                                                                                                                                                                                            +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                            +      .subscribe((amount) => {
                                                                                                                                                                                                                                                                                            +        if (amount === 0) {
                                                                                                                                                                                                                                                                                            +          this.taskListDropdownTrigger.closeMenu();
                                                                                                                                                                                                                                                                                            +        } else {
                                                                                                                                                                                                                                                                                            +          if (!this.wasClosed) {
                                                                                                                                                                                                                                                                                            +            // need to wait for change cycle that shows sync button
                                                                                                                                                                                                                                                                                            +            setTimeout(() => this.taskListDropdownTrigger.openMenu());
                                                                                                                                                                                                                                                                                            +          }
                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                            +      });
                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +  private combineProcesses(
                                                                                                                                                                                                                                                                                            +    first: BackgroundProcessState,
                                                                                                                                                                                                                                                                                            +    second: BackgroundProcessState,
                                                                                                                                                                                                                                                                                            +  ): BackgroundProcessState {
                                                                                                                                                                                                                                                                                            +    return {
                                                                                                                                                                                                                                                                                            +      title: first.title,
                                                                                                                                                                                                                                                                                            +      pending: first.pending || second.pending,
                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +  private summarizeProcesses(
                                                                                                                                                                                                                                                                                            +    processes: BackgroundProcessState[],
                                                                                                                                                                                                                                                                                            +  ): BackgroundProcessState[] {
                                                                                                                                                                                                                                                                                            +    if (!this.summarize) {
                                                                                                                                                                                                                                                                                            +      return processes;
                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                            +    const accumulator: BackgroundProcessState[] = [];
                                                                                                                                                                                                                                                                                            +    for (const process of processes) {
                                                                                                                                                                                                                                                                                            +      const summaryEntry = accumulator.findIndex(
                                                                                                                                                                                                                                                                                            +        (i) => i.title === process.title,
                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                            +      if (summaryEntry === -1) {
                                                                                                                                                                                                                                                                                            +        accumulator.push(process);
                                                                                                                                                                                                                                                                                            +      } else {
                                                                                                                                                                                                                                                                                            +        accumulator[summaryEntry] = this.combineProcesses(
                                                                                                                                                                                                                                                                                            +          accumulator[summaryEntry],
                                                                                                                                                                                                                                                                                            +          process,
                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                            +    return accumulator;
                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            <button
                                                                                                                                                                                                                                                                                            +  mat-icon-button
                                                                                                                                                                                                                                                                                            +  class="white"
                                                                                                                                                                                                                                                                                            +  [hidden]="allTasksFinished | async"
                                                                                                                                                                                                                                                                                            +  [matMenuTriggerFor]="taskListDropdown"
                                                                                                                                                                                                                                                                                            +  (menuClosed)="wasClosed = true"
                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                            +  <span
                                                                                                                                                                                                                                                                                            +    [matBadge]="taskCounterObservable | async"
                                                                                                                                                                                                                                                                                            +    matBadgeColor="accent"
                                                                                                                                                                                                                                                                                            +    [matBadgeHidden]="allTasksFinished | async"
                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                            +    <fa-icon class="white" icon="sync"></fa-icon>
                                                                                                                                                                                                                                                                                            +  </span>
                                                                                                                                                                                                                                                                                            +</button>
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +<mat-menu #taskListDropdown="matMenu">
                                                                                                                                                                                                                                                                                            +  <div class="padding-left-regular padding-right-regular">
                                                                                                                                                                                                                                                                                            +    <div i18n class="details-header">
                                                                                                                                                                                                                                                                                            +      The following processes are still running in the background. Until these
                                                                                                                                                                                                                                                                                            +      are finished some pages may be slow or incomplete.
                                                                                                                                                                                                                                                                                            +    </div>
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +    <div
                                                                                                                                                                                                                                                                                            +      *ngFor="let process of filteredProcesses | async"
                                                                                                                                                                                                                                                                                            +      class="flex-row gap-small align-center mat-subtitle-2 details-line"
                                                                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                                                                            +      <div>
                                                                                                                                                                                                                                                                                            +        <mat-spinner *ngIf="process.pending" [diameter]="20"></mat-spinner>
                                                                                                                                                                                                                                                                                            +        <fa-icon
                                                                                                                                                                                                                                                                                            +          *ngIf="!process.pending"
                                                                                                                                                                                                                                                                                            +          icon="check"
                                                                                                                                                                                                                                                                                            +          class="process-checkmark"
                                                                                                                                                                                                                                                                                            +        ></fa-icon>
                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                            +      <div class="truncate-text" [matTooltip]="process.description">
                                                                                                                                                                                                                                                                                            +        {{ process.title }}
                                                                                                                                                                                                                                                                                            +        <span *ngIf="process.details">({{ process.details }})</span>
                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                            +    </div>
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +    <button
                                                                                                                                                                                                                                                                                            +      mat-stroked-button
                                                                                                                                                                                                                                                                                            +      class="full-width"
                                                                                                                                                                                                                                                                                            +      (click)="taskListDropdownTrigger.closeMenu()"
                                                                                                                                                                                                                                                                                            +      i18n="Hide sync details"
                                                                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                                                                            +      Continue in background
                                                                                                                                                                                                                                                                                            +    </button>
                                                                                                                                                                                                                                                                                            +  </div>
                                                                                                                                                                                                                                                                                            +</mat-menu>
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            + ./background-processing-indicator.component.scss +

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            .details-header {
                                                                                                                                                                                                                                                                                            +  font-size: small;
                                                                                                                                                                                                                                                                                            +  text-align: justify;
                                                                                                                                                                                                                                                                                            +  line-height: normal;
                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +.process-checkmark {
                                                                                                                                                                                                                                                                                            +  color: green;
                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +.details-line {
                                                                                                                                                                                                                                                                                            +  line-height: 32px;
                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +[hidden] {
                                                                                                                                                                                                                                                                                            +  /* for some reason when `display: none` is set (instead of visibility and width), the pop-down menu is positioned incorrectly */
                                                                                                                                                                                                                                                                                            +  visibility: hidden !important;
                                                                                                                                                                                                                                                                                            +  width: 0;
                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/BasicAutocompleteComponent.html b/documentation/components/BasicAutocompleteComponent.html new file mode 100644 index 0000000000..91502de38a --- /dev/null +++ b/documentation/components/BasicAutocompleteComponent.html @@ -0,0 +1,3668 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              + src/app/core/common-components/basic-autocomplete/basic-autocomplete.component.ts +

                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Custom MatFormFieldControl for any select / dropdown field.

                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              + CustomFormControlDirective +

                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              + OnChanges + OnInit +

                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Outputs
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              HostBindings
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                              • + id +
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Accessors
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              +constructor(elementRef: ElementRef, errorStateMatcher: ErrorStateMatcher, ngControl: NgControl, parentForm: NgForm, parentFormGroup: FormGroupDirective) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              elementRef + ElementRef<HTMLElement> + + No +
                                                                                                                                                                                                                                                                                              errorStateMatcher + ErrorStateMatcher + + No +
                                                                                                                                                                                                                                                                                              ngControl + NgControl + + No +
                                                                                                                                                                                                                                                                                              parentForm + NgForm + + No +
                                                                                                                                                                                                                                                                                              parentFormGroup + FormGroupDirective + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + createOption +
                                                                                                                                                                                                                                                                                              + Type : function + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + display +
                                                                                                                                                                                                                                                                                              + Type : "text" | "chips" | "none" + +
                                                                                                                                                                                                                                                                                              + Default value : "text" +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Display the selected items as simple text, as chips or not at all (if used in combination with another component)

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + hideOption +
                                                                                                                                                                                                                                                                                              + Type : function + +
                                                                                                                                                                                                                                                                                              + Default value : () => false +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + multi +
                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Whether the user should be able to select multiple values.

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + options +
                                                                                                                                                                                                                                                                                              + Type : O[] + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + optionToString +
                                                                                                                                                                                                                                                                                              + Type : (option: O) => any + +
                                                                                                                                                                                                                                                                                              + Default value : (option: O) => option?.toString() +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + reorder +
                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + valueMapper +
                                                                                                                                                                                                                                                                                              + Type : (option: O) => V + +
                                                                                                                                                                                                                                                                                              + Default value : (option: O) => option as unknown as V +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + aria-describedby +
                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + disabled +
                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + placeholder +
                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + required +
                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + value +
                                                                                                                                                                                                                                                                                              + Type : T + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Outputs

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + autocompleteFilterChange +
                                                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              HostBindings

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + id + + +
                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                              + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + Async + createNewOption + + +
                                                                                                                                                                                                                                                                                              + + createNewOption(option: string) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              option + string + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + drop + + +
                                                                                                                                                                                                                                                                                              +drop(event: CdkDragDrop) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              event + CdkDragDrop<any[]> + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + + onContainerClick + + +
                                                                                                                                                                                                                                                                                              + + onContainerClick(event: MouseEvent) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              event + MouseEvent + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + onFocusOut + + +
                                                                                                                                                                                                                                                                                              +onFocusOut(event: FocusEvent) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              event + FocusEvent + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + select + + +
                                                                                                                                                                                                                                                                                              +select(selected: string | SelectableOption<O | V>) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              selected + string | SelectableOption<O | V> + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + showAutocomplete + + +
                                                                                                                                                                                                                                                                                              +showAutocomplete(valueToRevertTo?: string) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              valueToRevertTo + string + + Yes +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + unselect + + +
                                                                                                                                                                                                                                                                                              +unselect(option: SelectableOption<O | V>) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              option + SelectableOption<O | V> + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + + writeValue + + +
                                                                                                                                                                                                                                                                                              + + writeValue(val: V[] | V) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              val + V[] | V + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + blur + + +
                                                                                                                                                                                                                                                                                              +blur() +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + focus + + +
                                                                                                                                                                                                                                                                                              +focus() +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + registerOnChange + + +
                                                                                                                                                                                                                                                                                              +registerOnChange(fn: any) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              fn + any + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + registerOnTouched + + +
                                                                                                                                                                                                                                                                                              +registerOnTouched(fn: any) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              fn + any + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + setDescribedByIds + + +
                                                                                                                                                                                                                                                                                              +setDescribedByIds(ids: string[]) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              ids + string[] + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + setDisabledState + + +
                                                                                                                                                                                                                                                                                              +setDisabledState(isDisabled: boolean) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              isDisabled + boolean + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + _selectedOptions + + +
                                                                                                                                                                                                                                                                                              + Type : SelectableOption<O, V>[] + +
                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + + autocomplete + + +
                                                                                                                                                                                                                                                                                              + Type : MatAutocompleteTrigger + +
                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                              + + @ViewChild(MatAutocompleteTrigger)
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + autocompleteFilterFunction + + +
                                                                                                                                                                                                                                                                                              + Type : function + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + autocompleteForm + + +
                                                                                                                                                                                                                                                                                              + Default value : new FormControl("") +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + autocompleteOptions + + +
                                                                                                                                                                                                                                                                                              + Type : SelectableOption<O, V>[] + +
                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              Whether the user can manually drag & drop to reorder the selected items

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + autocompleteSuggestedOptions + + +
                                                                                                                                                                                                                                                                                              + Default value : this.autocompleteForm.valueChanges.pipe( + filter((val) => typeof val === "string"), + map((val) => this.updateAutocomplete(val)), + startWith([] as SelectableOption<O, V>[]), + ) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + + inputElement + + +
                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                              + + @ViewChild(MatInput, {static: true})
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + retainSearchValue + + +
                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + showAddOption + + +
                                                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              whether the "add new" option is logically allowed in the current context (e.g. not creating a duplicate)

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + + templateRef + + +
                                                                                                                                                                                                                                                                                              + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                              + + @ContentChild(TemplateRef)
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + + virtualScrollViewport + + +
                                                                                                                                                                                                                                                                                              + Type : CdkVirtualScrollViewport + +
                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                              + + @ViewChild(CdkVirtualScrollViewport)
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + _disabled + + +
                                                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + _value + + +
                                                                                                                                                                                                                                                                                              + Type : T + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + controlType + + +
                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                              + Default value : "custom-control" +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + Public + elementRef + + +
                                                                                                                                                                                                                                                                                              + Type : ElementRef<HTMLElement> + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + errorState + + +
                                                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + Public + errorStateMatcher + + +
                                                                                                                                                                                                                                                                                              + Type : ErrorStateMatcher + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + focused + + +
                                                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + + id + + +
                                                                                                                                                                                                                                                                                              + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                              + + @HostBinding()
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + Static + nextId + + +
                                                                                                                                                                                                                                                                                              + Type : number + +
                                                                                                                                                                                                                                                                                              + Default value : 0 +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + Public + ngControl + + +
                                                                                                                                                                                                                                                                                              + Type : NgControl + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + onChange + + +
                                                                                                                                                                                                                                                                                              + Default value : () => {...} +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + onTouched + + +
                                                                                                                                                                                                                                                                                              + Default value : () => {...} +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + Public + parentForm + + +
                                                                                                                                                                                                                                                                                              + Type : NgForm + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + Public + parentFormGroup + + +
                                                                                                                                                                                                                                                                                              + Type : FormGroupDirective + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + stateChanges + + +
                                                                                                                                                                                                                                                                                              + Default value : new Subject<void>() +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + + touched + + +
                                                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              + Accessors +

                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + displayText +
                                                                                                                                                                                                                                                                                              + getdisplayText() +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + disabled +
                                                                                                                                                                                                                                                                                              + getdisabled() +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + setdisabled(value: boolean) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              value + boolean + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              + + options +
                                                                                                                                                                                                                                                                                              + setoptions(options: O[]) +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                              options + O[] + + No +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              import {
                                                                                                                                                                                                                                                                                              +  Component,
                                                                                                                                                                                                                                                                                              +  ContentChild,
                                                                                                                                                                                                                                                                                              +  ElementRef,
                                                                                                                                                                                                                                                                                              +  EventEmitter,
                                                                                                                                                                                                                                                                                              +  Input,
                                                                                                                                                                                                                                                                                              +  OnChanges,
                                                                                                                                                                                                                                                                                              +  OnInit,
                                                                                                                                                                                                                                                                                              +  Optional,
                                                                                                                                                                                                                                                                                              +  Output,
                                                                                                                                                                                                                                                                                              +  Self,
                                                                                                                                                                                                                                                                                              +  TemplateRef,
                                                                                                                                                                                                                                                                                              +  ViewChild,
                                                                                                                                                                                                                                                                                              +} from "@angular/core";
                                                                                                                                                                                                                                                                                              +import { AsyncPipe, NgForOf, NgIf, NgTemplateOutlet } from "@angular/common";
                                                                                                                                                                                                                                                                                              +import { MatFormFieldControl } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                              +  FormControl,
                                                                                                                                                                                                                                                                                              +  FormGroupDirective,
                                                                                                                                                                                                                                                                                              +  NgControl,
                                                                                                                                                                                                                                                                                              +  NgForm,
                                                                                                                                                                                                                                                                                              +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                              +} from "@angular/forms";
                                                                                                                                                                                                                                                                                              +import { MatInput, MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                              +  MatAutocompleteModule,
                                                                                                                                                                                                                                                                                              +  MatAutocompleteTrigger,
                                                                                                                                                                                                                                                                                              +} from "@angular/material/autocomplete";
                                                                                                                                                                                                                                                                                              +import { MatCheckboxModule } from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                              +import { filter, map, startWith } from "rxjs/operators";
                                                                                                                                                                                                                                                                                              +import { ErrorStateMatcher } from "@angular/material/core";
                                                                                                                                                                                                                                                                                              +import { CustomFormControlDirective } from "./custom-form-control.directive";
                                                                                                                                                                                                                                                                                              +import { coerceBooleanProperty } from "@angular/cdk/coercion";
                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                              +  MatChipGrid,
                                                                                                                                                                                                                                                                                              +  MatChipInput,
                                                                                                                                                                                                                                                                                              +  MatChipRemove,
                                                                                                                                                                                                                                                                                              +  MatChipRow,
                                                                                                                                                                                                                                                                                              +} from "@angular/material/chips";
                                                                                                                                                                                                                                                                                              +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                              +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                              +import { MatIcon } from "@angular/material/icon";
                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                              +  CdkDragDrop,
                                                                                                                                                                                                                                                                                              +  DragDropModule,
                                                                                                                                                                                                                                                                                              +  moveItemInArray,
                                                                                                                                                                                                                                                                                              +} from "@angular/cdk/drag-drop";
                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                              +  CdkFixedSizeVirtualScroll,
                                                                                                                                                                                                                                                                                              +  CdkVirtualForOf,
                                                                                                                                                                                                                                                                                              +  CdkVirtualScrollViewport,
                                                                                                                                                                                                                                                                                              +} from "@angular/cdk/scrolling";
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +interface SelectableOption<O, V> {
                                                                                                                                                                                                                                                                                              +  initial: O;
                                                                                                                                                                                                                                                                                              +  asString: string;
                                                                                                                                                                                                                                                                                              +  asValue: V;
                                                                                                                                                                                                                                                                                              +  selected: boolean;
                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +/** Custom `MatFormFieldControl` for any select / dropdown field. */
                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                              +  selector: "app-basic-autocomplete",
                                                                                                                                                                                                                                                                                              +  templateUrl: "basic-autocomplete.component.html",
                                                                                                                                                                                                                                                                                              +  styleUrls: ["./basic-autocomplete.component.scss"],
                                                                                                                                                                                                                                                                                              +  providers: [
                                                                                                                                                                                                                                                                                              +    { provide: MatFormFieldControl, useExisting: BasicAutocompleteComponent },
                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                              +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                              +    MatInputModule,
                                                                                                                                                                                                                                                                                              +    MatAutocompleteModule,
                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                              +    MatCheckboxModule,
                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                              +    AsyncPipe,
                                                                                                                                                                                                                                                                                              +    NgTemplateOutlet,
                                                                                                                                                                                                                                                                                              +    MatChipInput,
                                                                                                                                                                                                                                                                                              +    MatChipGrid,
                                                                                                                                                                                                                                                                                              +    MatChipRow,
                                                                                                                                                                                                                                                                                              +    FaIconComponent,
                                                                                                                                                                                                                                                                                              +    MatTooltip,
                                                                                                                                                                                                                                                                                              +    MatIcon,
                                                                                                                                                                                                                                                                                              +    MatChipRemove,
                                                                                                                                                                                                                                                                                              +    DragDropModule,
                                                                                                                                                                                                                                                                                              +    CdkVirtualScrollViewport,
                                                                                                                                                                                                                                                                                              +    CdkVirtualForOf,
                                                                                                                                                                                                                                                                                              +    CdkFixedSizeVirtualScroll,
                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                              +export class BasicAutocompleteComponent<O, V = O>
                                                                                                                                                                                                                                                                                              +  extends CustomFormControlDirective<V | V[]>
                                                                                                                                                                                                                                                                                              +  implements OnChanges, OnInit
                                                                                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                                                                                              +  @ContentChild(TemplateRef) templateRef: TemplateRef<any>;
                                                                                                                                                                                                                                                                                              +  // `_elementRef` is protected in `MapInput`
                                                                                                                                                                                                                                                                                              +  @ViewChild(MatInput, { static: true }) inputElement: MatInput & {
                                                                                                                                                                                                                                                                                              +    _elementRef: ElementRef<HTMLElement>;
                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                              +  @ViewChild(MatAutocompleteTrigger) autocomplete: MatAutocompleteTrigger;
                                                                                                                                                                                                                                                                                              +  @ViewChild(CdkVirtualScrollViewport)
                                                                                                                                                                                                                                                                                              +  virtualScrollViewport: CdkVirtualScrollViewport;
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  @Input() valueMapper = (option: O) => option as unknown as V;
                                                                                                                                                                                                                                                                                              +  @Input() optionToString = (option: O) => option?.toString();
                                                                                                                                                                                                                                                                                              +  @Input() createOption: (input: string) => Promise<O>;
                                                                                                                                                                                                                                                                                              +  @Input() hideOption: (option: O) => boolean = () => false;
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                              +   * Whether the user should be able to select multiple values.
                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                              +  @Input() multi?: boolean;
                                                                                                                                                                                                                                                                                              +  @Input() reorder?: boolean;
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                              +   * Whether the user can manually drag & drop to reorder the selected items
                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  autocompleteOptions: SelectableOption<O, V>[] = [];
                                                                                                                                                                                                                                                                                              +  autocompleteForm = new FormControl("");
                                                                                                                                                                                                                                                                                              +  autocompleteSuggestedOptions = this.autocompleteForm.valueChanges.pipe(
                                                                                                                                                                                                                                                                                              +    filter((val) => typeof val === "string"),
                                                                                                                                                                                                                                                                                              +    map((val) => this.updateAutocomplete(val)),
                                                                                                                                                                                                                                                                                              +    startWith([] as SelectableOption<O, V>[]),
                                                                                                                                                                                                                                                                                              +  );
                                                                                                                                                                                                                                                                                              +  autocompleteFilterFunction: (option: O) => boolean;
                                                                                                                                                                                                                                                                                              +  @Output() autocompleteFilterChange = new EventEmitter<(o: O) => boolean>();
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  /** whether the "add new" option is logically allowed in the current context (e.g. not creating a duplicate) */
                                                                                                                                                                                                                                                                                              +  showAddOption = false;
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  get displayText() {
                                                                                                                                                                                                                                                                                              +    const values: V[] = Array.isArray(this.value) ? this.value : [this.value];
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +    return values
                                                                                                                                                                                                                                                                                              +      .map((v) => this._options.find((o) => o.asValue === v)?.asString)
                                                                                                                                                                                                                                                                                              +      .join(", ");
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  override get disabled(): boolean {
                                                                                                                                                                                                                                                                                              +    return this._disabled;
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  override set disabled(value: boolean) {
                                                                                                                                                                                                                                                                                              +    this._disabled = coerceBooleanProperty(value);
                                                                                                                                                                                                                                                                                              +    this._disabled
                                                                                                                                                                                                                                                                                              +      ? this.autocompleteForm.disable()
                                                                                                                                                                                                                                                                                              +      : this.autocompleteForm.enable();
                                                                                                                                                                                                                                                                                              +    this.stateChanges.next();
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  @Input() set options(options: O[]) {
                                                                                                                                                                                                                                                                                              +    this._options = options.map((o) => this.toSelectableOption(o));
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +  retainSearchValue: string;
                                                                                                                                                                                                                                                                                              +  private _options: SelectableOption<O, V>[] = [];
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  _selectedOptions: SelectableOption<O, V>[] = [];
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                              +   * Display the selected items as simple text, as chips or not at all (if used in combination with another component)
                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                              +  @Input() display: "text" | "chips" | "none" = "text";
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                              +    elementRef: ElementRef<HTMLElement>,
                                                                                                                                                                                                                                                                                              +    errorStateMatcher: ErrorStateMatcher,
                                                                                                                                                                                                                                                                                              +    @Optional() @Self() ngControl: NgControl,
                                                                                                                                                                                                                                                                                              +    @Optional() parentForm: NgForm,
                                                                                                                                                                                                                                                                                              +    @Optional() parentFormGroup: FormGroupDirective,
                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                              +    super(
                                                                                                                                                                                                                                                                                              +      elementRef,
                                                                                                                                                                                                                                                                                              +      errorStateMatcher,
                                                                                                                                                                                                                                                                                              +      ngControl,
                                                                                                                                                                                                                                                                                              +      parentForm,
                                                                                                                                                                                                                                                                                              +      parentFormGroup,
                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  ngOnInit() {
                                                                                                                                                                                                                                                                                              +    this.autocompleteSuggestedOptions.subscribe((options) => {
                                                                                                                                                                                                                                                                                              +      this.autocompleteOptions = options;
                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                              +    // Subscribe to the valueChanges observable to print the input value
                                                                                                                                                                                                                                                                                              +    this.autocompleteForm.valueChanges.subscribe((value) => {
                                                                                                                                                                                                                                                                                              +      if (typeof value === "string") {
                                                                                                                                                                                                                                                                                              +        this.retainSearchValue = value;
                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  ngOnChanges(changes: { [key in keyof this]?: any }) {
                                                                                                                                                                                                                                                                                              +    if (changes.valueMapper) {
                                                                                                                                                                                                                                                                                              +      this._options.forEach(
                                                                                                                                                                                                                                                                                              +        (opt) => (opt.asValue = this.valueMapper(opt.initial)),
                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    if (changes.optionToString) {
                                                                                                                                                                                                                                                                                              +      this._options.forEach(
                                                                                                                                                                                                                                                                                              +        (opt) => (opt.asString = this.optionToString(opt.initial)),
                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    if (changes.value || changes.options) {
                                                                                                                                                                                                                                                                                              +      this.setInitialInputValue();
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +      if (this.autocomplete?.panelOpen) {
                                                                                                                                                                                                                                                                                              +        // if new options have been added, make sure to update the visible autocomplete options
                                                                                                                                                                                                                                                                                              +        this.showAutocomplete(this.autocompleteForm.value);
                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  drop(event: CdkDragDrop<any[]>) {
                                                                                                                                                                                                                                                                                              +    if (event.previousContainer === event.container) {
                                                                                                                                                                                                                                                                                              +      moveItemInArray(
                                                                                                                                                                                                                                                                                              +        this.autocompleteOptions,
                                                                                                                                                                                                                                                                                              +        event.previousIndex,
                                                                                                                                                                                                                                                                                              +        event.currentIndex,
                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    this._selectedOptions = this.autocompleteOptions.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                              +    if (this.multi) {
                                                                                                                                                                                                                                                                                              +      this.value = this._selectedOptions.map((o) => o.asValue);
                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                              +      this.value = undefined;
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    this.setInitialInputValue();
                                                                                                                                                                                                                                                                                              +    this.onChange(this.value);
                                                                                                                                                                                                                                                                                              +    this.showAutocomplete(this.autocompleteForm.value);
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  showAutocomplete(valueToRevertTo?: string) {
                                                                                                                                                                                                                                                                                              +    if (this.retainSearchValue) {
                                                                                                                                                                                                                                                                                              +      this.autocompleteForm.setValue(this.retainSearchValue);
                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                              +      this.autocompleteForm.setValue("");
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    if (!this.multi) {
                                                                                                                                                                                                                                                                                              +      // cannot setValue to "" here because the current selection would be lost
                                                                                                                                                                                                                                                                                              +      this.autocompleteForm.setValue(this.displayText, { emitEvent: false });
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +    setTimeout(() => {
                                                                                                                                                                                                                                                                                              +      this.inputElement.focus();
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +      // select all text for easy overwriting when typing to search for options
                                                                                                                                                                                                                                                                                              +      (
                                                                                                                                                                                                                                                                                              +        this.inputElement._elementRef.nativeElement as HTMLInputElement
                                                                                                                                                                                                                                                                                              +      ).select();
                                                                                                                                                                                                                                                                                              +      if (valueToRevertTo) {
                                                                                                                                                                                                                                                                                              +        this.autocompleteForm.setValue(valueToRevertTo);
                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +    this.focus();
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +    // update virtual scroll as the container remains empty until the user scrolls initially
                                                                                                                                                                                                                                                                                              +    this.virtualScrollViewport.scrollToIndex(0);
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  private updateAutocomplete(inputText: string): SelectableOption<O, V>[] {
                                                                                                                                                                                                                                                                                              +    let filteredOptions = this._options.filter(
                                                                                                                                                                                                                                                                                              +      (o) => !this.hideOption(o.initial),
                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                              +    if (inputText) {
                                                                                                                                                                                                                                                                                              +      this.autocompleteFilterFunction = (option) =>
                                                                                                                                                                                                                                                                                              +        this.optionToString(option)
                                                                                                                                                                                                                                                                                              +          .toLowerCase()
                                                                                                                                                                                                                                                                                              +          .includes(inputText.toLowerCase());
                                                                                                                                                                                                                                                                                              +      this.autocompleteFilterChange.emit(this.autocompleteFilterFunction);
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +      filteredOptions = filteredOptions.filter((o) =>
                                                                                                                                                                                                                                                                                              +        this.autocompleteFilterFunction(o.initial),
                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +      // do not allow users to create a new entry "identical" to an existing one:
                                                                                                                                                                                                                                                                                              +      this.showAddOption = !this._options.some(
                                                                                                                                                                                                                                                                                              +        (o) => o.asString.toLowerCase() === inputText.toLowerCase(),
                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    return filteredOptions;
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  private setInitialInputValue() {
                                                                                                                                                                                                                                                                                              +    this._options.forEach(
                                                                                                                                                                                                                                                                                              +      (o) =>
                                                                                                                                                                                                                                                                                              +        (o.selected = Array.isArray(this.value)
                                                                                                                                                                                                                                                                                              +          ? this.value?.includes(o.asValue)
                                                                                                                                                                                                                                                                                              +          : this.value === o.asValue),
                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                              +    this._selectedOptions = this._options.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  select(selected: string | SelectableOption<O, V>) {
                                                                                                                                                                                                                                                                                              +    if (typeof selected === "string") {
                                                                                                                                                                                                                                                                                              +      this.createNewOption(selected);
                                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +    if (selected) {
                                                                                                                                                                                                                                                                                              +      this.selectOption(selected);
                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                              +      this.autocompleteForm.setValue("");
                                                                                                                                                                                                                                                                                              +      this._selectedOptions = [];
                                                                                                                                                                                                                                                                                              +      this.value = undefined;
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    this.onChange(this.value);
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  unselect(option: SelectableOption<O, V>) {
                                                                                                                                                                                                                                                                                              +    option.selected = false;
                                                                                                                                                                                                                                                                                              +    this._selectedOptions = this._options.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +    if (this.multi) {
                                                                                                                                                                                                                                                                                              +      this.value = this._selectedOptions.map((o) => o.asValue);
                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                              +      this.value = undefined;
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +    this.onChange(this.value);
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  async createNewOption(option: string) {
                                                                                                                                                                                                                                                                                              +    const createdOption = await this.createOption(option);
                                                                                                                                                                                                                                                                                              +    if (createdOption) {
                                                                                                                                                                                                                                                                                              +      const newOption = this.toSelectableOption(createdOption);
                                                                                                                                                                                                                                                                                              +      this._options.push(newOption);
                                                                                                                                                                                                                                                                                              +      this.select(newOption);
                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                              +      // continue editing
                                                                                                                                                                                                                                                                                              +      this.showAutocomplete();
                                                                                                                                                                                                                                                                                              +      this.autocompleteForm.setValue(option);
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  private selectOption(option: SelectableOption<O, V>) {
                                                                                                                                                                                                                                                                                              +    if (this.multi) {
                                                                                                                                                                                                                                                                                              +      option.selected = !option.selected;
                                                                                                                                                                                                                                                                                              +      this._selectedOptions = this._options.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                              +      this.value = this._selectedOptions.map((o) => o.asValue);
                                                                                                                                                                                                                                                                                              +      // re-open autocomplete to select next option
                                                                                                                                                                                                                                                                                              +      this.showAutocomplete();
                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                              +      this._selectedOptions = [option];
                                                                                                                                                                                                                                                                                              +      this.value = option.asValue;
                                                                                                                                                                                                                                                                                              +      this.blur();
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  private toSelectableOption(opt: O): SelectableOption<O, V> {
                                                                                                                                                                                                                                                                                              +    return {
                                                                                                                                                                                                                                                                                              +      initial: opt,
                                                                                                                                                                                                                                                                                              +      asValue: this.valueMapper(opt),
                                                                                                                                                                                                                                                                                              +      asString: this.optionToString(opt),
                                                                                                                                                                                                                                                                                              +      selected: false,
                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  onFocusOut(event: FocusEvent) {
                                                                                                                                                                                                                                                                                              +    if (
                                                                                                                                                                                                                                                                                              +      !this.elementRef.nativeElement.contains(event.relatedTarget as Element)
                                                                                                                                                                                                                                                                                              +    ) {
                                                                                                                                                                                                                                                                                              +      if (!this.multi && this.autocompleteForm.value === "") {
                                                                                                                                                                                                                                                                                              +        this.select(undefined);
                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                              +      this.blur();
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  override onContainerClick(event: MouseEvent) {
                                                                                                                                                                                                                                                                                              +    if (
                                                                                                                                                                                                                                                                                              +      !this._disabled &&
                                                                                                                                                                                                                                                                                              +      (event.target as Element).tagName.toLowerCase() != "input"
                                                                                                                                                                                                                                                                                              +    ) {
                                                                                                                                                                                                                                                                                              +      this.showAutocomplete();
                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  override writeValue(val: V[] | V) {
                                                                                                                                                                                                                                                                                              +    super.writeValue(val);
                                                                                                                                                                                                                                                                                              +    this.setInitialInputValue();
                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              <!--Display-->
                                                                                                                                                                                                                                                                                              +<input
                                                                                                                                                                                                                                                                                              +  *ngIf="display === 'text' || display === 'none'; else chipsDisplay"
                                                                                                                                                                                                                                                                                              +  [hidden]="focused || display === 'none'"
                                                                                                                                                                                                                                                                                              +  [disabled]="_disabled"
                                                                                                                                                                                                                                                                                              +  matInput
                                                                                                                                                                                                                                                                                              +  style="text-overflow: ellipsis; width: calc(100% - 50px)"
                                                                                                                                                                                                                                                                                              +  (focusin)="showAutocomplete()"
                                                                                                                                                                                                                                                                                              +  (focusout)="showAutocomplete()"
                                                                                                                                                                                                                                                                                              +  [value]="displayText"
                                                                                                                                                                                                                                                                                              +  [placeholder]="placeholder"
                                                                                                                                                                                                                                                                                              +/>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +<!--Search-->
                                                                                                                                                                                                                                                                                              +<input
                                                                                                                                                                                                                                                                                              +  [hidden]="!focused"
                                                                                                                                                                                                                                                                                              +  #inputElement
                                                                                                                                                                                                                                                                                              +  [formControl]="autocompleteForm"
                                                                                                                                                                                                                                                                                              +  matInput
                                                                                                                                                                                                                                                                                              +  style="text-overflow: ellipsis"
                                                                                                                                                                                                                                                                                              +  [matAutocomplete]="autoSuggestions"
                                                                                                                                                                                                                                                                                              +  (focusout)="onFocusOut($event)"
                                                                                                                                                                                                                                                                                              +  [placeholder]="placeholder"
                                                                                                                                                                                                                                                                                              +/>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +<!--
                                                                                                                                                                                                                                                                                              +  Autocomplete
                                                                                                                                                                                                                                                                                              +-->
                                                                                                                                                                                                                                                                                              +<mat-autocomplete
                                                                                                                                                                                                                                                                                              +  [disableRipple]="true"
                                                                                                                                                                                                                                                                                              +  #autoSuggestions="matAutocomplete"
                                                                                                                                                                                                                                                                                              +  (optionSelected)="select($event.option.value)"
                                                                                                                                                                                                                                                                                              +  autoActiveFirstOption
                                                                                                                                                                                                                                                                                              +  [hideSingleSelectionIndicator]="multi"
                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                              +  <div
                                                                                                                                                                                                                                                                                              +    cdkDropList
                                                                                                                                                                                                                                                                                              +    (cdkDropListDropped)="drop($event)"
                                                                                                                                                                                                                                                                                              +    cdkDropListGroup
                                                                                                                                                                                                                                                                                              +    [cdkDropListDisabled]="!reorder"
                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                              +    <cdk-virtual-scroll-viewport
                                                                                                                                                                                                                                                                                              +      [style.height]="(autocompleteOptions?.length ?? 0) * 48 + 'px'"
                                                                                                                                                                                                                                                                                              +      [style.max-height]="3 * 48 + 'px'"
                                                                                                                                                                                                                                                                                              +      itemSize="48"
                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                              +      <mat-option
                                                                                                                                                                                                                                                                                              +        [value]="item"
                                                                                                                                                                                                                                                                                              +        cdkDrag
                                                                                                                                                                                                                                                                                              +        *cdkVirtualFor="let item of autocompleteOptions"
                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                              +        <div class="flex-row disable-autocomplete-active-color align-center">
                                                                                                                                                                                                                                                                                              +          <div *ngIf="reorder">
                                                                                                                                                                                                                                                                                              +            <fa-icon
                                                                                                                                                                                                                                                                                              +              icon="grip-vertical"
                                                                                                                                                                                                                                                                                              +              size="sm"
                                                                                                                                                                                                                                                                                              +              class="drag-handle"
                                                                                                                                                                                                                                                                                              +            ></fa-icon>
                                                                                                                                                                                                                                                                                              +          </div>
                                                                                                                                                                                                                                                                                              +          <mat-checkbox *ngIf="multi" [checked]="item.selected"></mat-checkbox>
                                                                                                                                                                                                                                                                                              +          <ng-container *ngIf="!templateRef; else itemTemplate">
                                                                                                                                                                                                                                                                                              +            {{ item.asString }}
                                                                                                                                                                                                                                                                                              +          </ng-container>
                                                                                                                                                                                                                                                                                              +          <ng-template
                                                                                                                                                                                                                                                                                              +            class="item-option"
                                                                                                                                                                                                                                                                                              +            #itemTemplate
                                                                                                                                                                                                                                                                                              +            [ngTemplateOutlet]="templateRef"
                                                                                                                                                                                                                                                                                              +            [ngTemplateOutletContext]="{ $implicit: item.initial }"
                                                                                                                                                                                                                                                                                              +          ></ng-template>
                                                                                                                                                                                                                                                                                              +        </div>
                                                                                                                                                                                                                                                                                              +      </mat-option>
                                                                                                                                                                                                                                                                                              +    </cdk-virtual-scroll-viewport>
                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  <!-- Create new option -->
                                                                                                                                                                                                                                                                                              +  <mat-option
                                                                                                                                                                                                                                                                                              +    *ngIf="createOption && showAddOption && inputElement.value"
                                                                                                                                                                                                                                                                                              +    [value]="inputElement.value"
                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                              +    <em
                                                                                                                                                                                                                                                                                              +      i18n="Label for adding an option in a dropdown|e.g. Add new My new Option"
                                                                                                                                                                                                                                                                                              +      >Add new</em
                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                              +    {{ inputElement.value }}
                                                                                                                                                                                                                                                                                              +  </mat-option>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  <mat-option style="display: none">
                                                                                                                                                                                                                                                                                              +    <!-- This mat-option is never displayed ("display: none") but has to be there,
                                                                                                                                                                                                                                                                                              +     because the footer below will only be displayed with at least one mat-option -->
                                                                                                                                                                                                                                                                                              +  </mat-option>
                                                                                                                                                                                                                                                                                              +  <div class="autocomplete-footer">
                                                                                                                                                                                                                                                                                              +    <ng-content select="[autocompleteFooter]"></ng-content>
                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                              +</mat-autocomplete>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +<!--
                                                                                                                                                                                                                                                                                              +  Optional displaying as chips
                                                                                                                                                                                                                                                                                              +-->
                                                                                                                                                                                                                                                                                              +<ng-template #chipsDisplay>
                                                                                                                                                                                                                                                                                              +  <input
                                                                                                                                                                                                                                                                                              +    [hidden]="true"
                                                                                                                                                                                                                                                                                              +    [disabled]="_disabled"
                                                                                                                                                                                                                                                                                              +    matInput
                                                                                                                                                                                                                                                                                              +    (focusin)="showAutocomplete()"
                                                                                                                                                                                                                                                                                              +    (focusout)="showAutocomplete()"
                                                                                                                                                                                                                                                                                              +    [matChipInputFor]="chipList"
                                                                                                                                                                                                                                                                                              +  />
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +  <mat-chip-grid #chipList>
                                                                                                                                                                                                                                                                                              +    <ng-container>
                                                                                                                                                                                                                                                                                              +      <mat-chip-row
                                                                                                                                                                                                                                                                                              +        *ngFor="let item of _selectedOptions"
                                                                                                                                                                                                                                                                                              +        [editable]="!_disabled"
                                                                                                                                                                                                                                                                                              +        class="chip"
                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                              +        <ng-container *ngIf="!templateRef; else itemTemplate">
                                                                                                                                                                                                                                                                                              +          {{ item.asString }}
                                                                                                                                                                                                                                                                                              +        </ng-container>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +        <ng-template
                                                                                                                                                                                                                                                                                              +          #itemTemplate
                                                                                                                                                                                                                                                                                              +          [ngTemplateOutlet]="templateRef"
                                                                                                                                                                                                                                                                                              +          [ngTemplateOutletContext]="{ $implicit: item.initial }"
                                                                                                                                                                                                                                                                                              +        ></ng-template>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +        <button matChipRemove *ngIf="!_disabled" (click)="unselect(item)">
                                                                                                                                                                                                                                                                                              +          <fa-icon
                                                                                                                                                                                                                                                                                              +            i18n-matTooltip="tooltip for remove icon on chips of dropdown item"
                                                                                                                                                                                                                                                                                              +            matTooltip="remove"
                                                                                                                                                                                                                                                                                              +            icon="xmark"
                                                                                                                                                                                                                                                                                              +          ></fa-icon>
                                                                                                                                                                                                                                                                                              +        </button>
                                                                                                                                                                                                                                                                                              +      </mat-chip-row>
                                                                                                                                                                                                                                                                                              +    </ng-container>
                                                                                                                                                                                                                                                                                              +  </mat-chip-grid>
                                                                                                                                                                                                                                                                                              +</ng-template>
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              + ./basic-autocomplete.component.scss +

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              @use "variables/colors";
                                                                                                                                                                                                                                                                                              +@use "variables/sizes";
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +em {
                                                                                                                                                                                                                                                                                              +  color: colors.$primary;
                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +.disable-autocomplete-active-color {
                                                                                                                                                                                                                                                                                              +  color: black;
                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +.autocomplete-footer {
                                                                                                                                                                                                                                                                                              +  margin: sizes.$small sizes.$regular;
                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/BetaFeatureComponent.html b/documentation/components/BetaFeatureComponent.html new file mode 100644 index 0000000000..aef6210a80 --- /dev/null +++ b/documentation/components/BetaFeatureComponent.html @@ -0,0 +1,355 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                + src/app/features/coming-soon/beta-feature/beta-feature.component.ts +

                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                Simple banner to mark a feature as "beta" and inform users of possibly limited functionality.

                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                +import { MatCard } from "@angular/material/card";
                                                                                                                                                                                                                                                                                                +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                + * Simple banner to mark a feature as "beta" and inform users of possibly limited functionality.
                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                +  selector: "app-beta-feature",
                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                +  imports: [MatTooltip, MatCard, FaIconComponent],
                                                                                                                                                                                                                                                                                                +  templateUrl: "./beta-feature.component.html",
                                                                                                                                                                                                                                                                                                +  styleUrl: "./beta-feature.component.scss",
                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                +export class BetaFeatureComponent {}
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                <mat-card
                                                                                                                                                                                                                                                                                                +  class="banner-container"
                                                                                                                                                                                                                                                                                                +  matTooltip="This feature is overall still under development. You might experience some issues or limited functionality. We appreciate your feedback, please contact our User Support with your problems and suggestions."
                                                                                                                                                                                                                                                                                                +  i18n-matTooltip
                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                +  <fa-icon icon="person-digging"></fa-icon>
                                                                                                                                                                                                                                                                                                +  <span i18n>Beta Feature</span>
                                                                                                                                                                                                                                                                                                +</mat-card>
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/BirthdayDashboardComponent.html b/documentation/components/BirthdayDashboardComponent.html new file mode 100644 index 0000000000..40eed49b47 --- /dev/null +++ b/documentation/components/BirthdayDashboardComponent.html @@ -0,0 +1,787 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  + DashboardWidget +

                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  + BirthdayDashboardConfig + OnInit +

                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  +constructor(entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                  entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  + + entities +
                                                                                                                                                                                                                                                                                                  + Type : EntityPropertyMap + +
                                                                                                                                                                                                                                                                                                  + Default value : { ["Child"]: "dateOfBirth" } +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  An object holding the names of entities and properties where they have a DateOfBirth attribute. +E.g. (which is also the default)

                                                                                                                                                                                                                                                                                                  +Example :
                                                                                                                                                                                                                                                                                                  "entities": { "Child": "dateOfBirth" }
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  + + threshold +
                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                  + Default value : 32 +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Birthdays that are less than "threshold" days away are shown. +Default 32

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  + + + Static + + getRequiredEntities + + +
                                                                                                                                                                                                                                                                                                  + + getRequiredEntities(config: BirthdayDashboardConfig) +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Inherited from DashboardWidget +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Defined in DashboardWidget:35 +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                  config + BirthdayDashboardConfig + + No +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  + + + entries + + +
                                                                                                                                                                                                                                                                                                  + Type : EntityWithBirthday[] + +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                  +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                  +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                  +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                  +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                  +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +interface BirthdayDashboardConfig {
                                                                                                                                                                                                                                                                                                  +  entities: EntityPropertyMap;
                                                                                                                                                                                                                                                                                                  +  threshold: number;
                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +@DynamicComponent("BirthdayDashboard")
                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                  +  selector: "app-birthday-dashboard",
                                                                                                                                                                                                                                                                                                  +  templateUrl: "./birthday-dashboard.component.html",
                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./birthday-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                  +    MatTableModule,
                                                                                                                                                                                                                                                                                                  +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                  +    DatePipe,
                                                                                                                                                                                                                                                                                                  +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                  +export class BirthdayDashboardComponent
                                                                                                                                                                                                                                                                                                  +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                  +  implements BirthdayDashboardConfig, OnInit
                                                                                                                                                                                                                                                                                                  +{
                                                                                                                                                                                                                                                                                                  +  static override getRequiredEntities(config: BirthdayDashboardConfig) {
                                                                                                                                                                                                                                                                                                  +    return config?.entities ? Object.keys(config.entities) : "Child";
                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  private readonly today: Date;
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                  +   * An object holding the names of entities and properties where they have a `DateOfBirth` attribute.
                                                                                                                                                                                                                                                                                                  +   * E.g. (which is also the default)
                                                                                                                                                                                                                                                                                                  +   * ```json
                                                                                                                                                                                                                                                                                                  +   * "entities": { "Child": "dateOfBirth" }
                                                                                                                                                                                                                                                                                                  +   * ```
                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                  +  @Input() entities: EntityPropertyMap = { ["Child"]: "dateOfBirth" };
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                  +   * Birthdays that are less than "threshold" days away are shown.
                                                                                                                                                                                                                                                                                                  +   * Default 32
                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                  +  @Input() threshold = 32;
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  entries: EntityWithBirthday[];
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  constructor(private entityMapper: EntityMapperService) {
                                                                                                                                                                                                                                                                                                  +    super();
                                                                                                                                                                                                                                                                                                  +    this.today = new Date();
                                                                                                                                                                                                                                                                                                  +    this.today.setHours(0, 0, 0, 0);
                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                  +    const data: EntityWithBirthday[] = [];
                                                                                                                                                                                                                                                                                                  +    for (const [entityType, property] of Object.entries(this.entities)) {
                                                                                                                                                                                                                                                                                                  +      const entities = await this.entityMapper.loadType(entityType);
                                                                                                                                                                                                                                                                                                  +      data.push(
                                                                                                                                                                                                                                                                                                  +        ...entities
                                                                                                                                                                                                                                                                                                  +          .filter((entity) => entity.isActive && entity[property])
                                                                                                                                                                                                                                                                                                  +          .map((entity) => ({
                                                                                                                                                                                                                                                                                                  +            entity: entity,
                                                                                                                                                                                                                                                                                                  +            birthday: this.getNextBirthday(entity[property]),
                                                                                                                                                                                                                                                                                                  +            newAge: entity[property]?.age + 1,
                                                                                                                                                                                                                                                                                                  +          }))
                                                                                                                                                                                                                                                                                                  +          .filter((a) => this.daysUntil(a.birthday) < this.threshold),
                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                  +    data.sort(
                                                                                                                                                                                                                                                                                                  +      (a, b) => this.daysUntil(a.birthday) - this.daysUntil(b.birthday),
                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                  +    this.entries = data;
                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  private getNextBirthday(dateOfBirth: Date): Date {
                                                                                                                                                                                                                                                                                                  +    const birthday = new Date(
                                                                                                                                                                                                                                                                                                  +      this.today.getFullYear(),
                                                                                                                                                                                                                                                                                                  +      dateOfBirth.getMonth(),
                                                                                                                                                                                                                                                                                                  +      dateOfBirth.getDate(),
                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +    if (this.today.getTime() > birthday.getTime()) {
                                                                                                                                                                                                                                                                                                  +      birthday.setFullYear(birthday.getFullYear() + 1);
                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                  +    return birthday;
                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +  private daysUntil(date: Date): number {
                                                                                                                                                                                                                                                                                                  +    const diff = date.getTime() - this.today.getTime();
                                                                                                                                                                                                                                                                                                  +    return Math.floor(diff / (1000 * 60 * 60 * 24));
                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +interface EntityPropertyMap {
                                                                                                                                                                                                                                                                                                  +  [key: string]: string;
                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +interface EntityWithBirthday {
                                                                                                                                                                                                                                                                                                  +  entity: Entity;
                                                                                                                                                                                                                                                                                                  +  birthday: Date;
                                                                                                                                                                                                                                                                                                  +  newAge: number;
                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                                  +  icon="birthday-cake"
                                                                                                                                                                                                                                                                                                  +  theme="child"
                                                                                                                                                                                                                                                                                                  +  subtitle="Upcoming Birthdays"
                                                                                                                                                                                                                                                                                                  +  i18n-subtitle="Subtitle of the birthday widget"
                                                                                                                                                                                                                                                                                                  +  [entries]="entries"
                                                                                                                                                                                                                                                                                                  +>
                                                                                                                                                                                                                                                                                                  +  <div class="table-wrapper">
                                                                                                                                                                                                                                                                                                  +    <table mat-table>
                                                                                                                                                                                                                                                                                                  +      <tr hidden="true">
                                                                                                                                                                                                                                                                                                  +        <th scope="col">Name</th>
                                                                                                                                                                                                                                                                                                  +        <th scope="col">DateOfBirth</th>
                                                                                                                                                                                                                                                                                                  +        <th scope="col">AfterBirthdayAge</th>
                                                                                                                                                                                                                                                                                                  +      </tr>
                                                                                                                                                                                                                                                                                                  +      <ng-container matColumnDef="entity">
                                                                                                                                                                                                                                                                                                  +        <td *matCellDef="let entity">
                                                                                                                                                                                                                                                                                                  +          <app-entity-block
                                                                                                                                                                                                                                                                                                  +            [entityToDisplay]="entity.entity"
                                                                                                                                                                                                                                                                                                  +          ></app-entity-block>
                                                                                                                                                                                                                                                                                                  +        </td>
                                                                                                                                                                                                                                                                                                  +      </ng-container>
                                                                                                                                                                                                                                                                                                  +      <ng-container matColumnDef="dateOfBirth">
                                                                                                                                                                                                                                                                                                  +        <td *matCellDef="let entity">
                                                                                                                                                                                                                                                                                                  +          {{ entity.birthday | date: "E dd.MM" }}
                                                                                                                                                                                                                                                                                                  +        </td>
                                                                                                                                                                                                                                                                                                  +      </ng-container>
                                                                                                                                                                                                                                                                                                  +      <ng-container matColumnDef="newAge">
                                                                                                                                                                                                                                                                                                  +        <td *matCellDef="let entity" i18n>{{ entity.newAge }} yrs</td>
                                                                                                                                                                                                                                                                                                  +      </ng-container>
                                                                                                                                                                                                                                                                                                  +      <tr
                                                                                                                                                                                                                                                                                                  +        mat-row
                                                                                                                                                                                                                                                                                                  +        *matRowDef="let row; columns: ['entity', 'dateOfBirth', 'newAge']"
                                                                                                                                                                                                                                                                                                  +      ></tr>
                                                                                                                                                                                                                                                                                                  +    </table>
                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                  +</app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  + ./birthday-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  @use "../../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/BooleanInputComponent.html b/documentation/components/BooleanInputComponent.html new file mode 100644 index 0000000000..6e587976e9 --- /dev/null +++ b/documentation/components/BooleanInputComponent.html @@ -0,0 +1,1969 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    + src/app/core/basic-datatypes/boolean/edit-boolean/boolean-input/boolean-input.component.ts +

                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    + CustomFormControlDirective +

                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    HostBindings
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                    • + id +
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    +constructor(elementRef: ElementRef, errorStateMatcher: ErrorStateMatcher, ngControl: NgControl, parentForm: NgForm, parentFormGroup: FormGroupDirective) +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                    elementRef + ElementRef<HTMLElement> + + No +
                                                                                                                                                                                                                                                                                                    errorStateMatcher + ErrorStateMatcher + + No +
                                                                                                                                                                                                                                                                                                    ngControl + NgControl + + No +
                                                                                                                                                                                                                                                                                                    parentForm + NgForm + + No +
                                                                                                                                                                                                                                                                                                    parentFormGroup + FormGroupDirective + + No +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + aria-describedby +
                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + disabled +
                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + placeholder +
                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + required +
                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + value +
                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    HostBindings

                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + id + + +
                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                    + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + + onContainerClick + + +
                                                                                                                                                                                                                                                                                                    + + onContainerClick(event: MouseEvent) +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                    event + MouseEvent + + No +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + blur + + +
                                                                                                                                                                                                                                                                                                    +blur() +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + focus + + +
                                                                                                                                                                                                                                                                                                    +focus() +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + registerOnChange + + +
                                                                                                                                                                                                                                                                                                    +registerOnChange(fn: any) +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                    fn + any + + No +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + registerOnTouched + + +
                                                                                                                                                                                                                                                                                                    +registerOnTouched(fn: any) +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                    fn + any + + No +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + setDescribedByIds + + +
                                                                                                                                                                                                                                                                                                    +setDescribedByIds(ids: string[]) +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                    ids + string[] + + No +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + setDisabledState + + +
                                                                                                                                                                                                                                                                                                    +setDisabledState(isDisabled: boolean) +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                    isDisabled + boolean + + No +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + writeValue + + +
                                                                                                                                                                                                                                                                                                    +writeValue(val: T) +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                    val + T + + No +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + + inputElement + + +
                                                                                                                                                                                                                                                                                                    + Type : MatCheckbox + +
                                                                                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                                                                                    + + @ViewChild(MatCheckbox, {static: true})
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + _disabled + + +
                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + _value + + +
                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + controlType + + +
                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                    + Default value : "custom-control" +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + Public + elementRef + + +
                                                                                                                                                                                                                                                                                                    + Type : ElementRef<HTMLElement> + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + errorState + + +
                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + Public + errorStateMatcher + + +
                                                                                                                                                                                                                                                                                                    + Type : ErrorStateMatcher + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + focused + + +
                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + + id + + +
                                                                                                                                                                                                                                                                                                    + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                                                                                    + + @HostBinding()
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + Static + nextId + + +
                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                    + Default value : 0 +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + Public + ngControl + + +
                                                                                                                                                                                                                                                                                                    + Type : NgControl + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + onChange + + +
                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + onTouched + + +
                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + Public + parentForm + + +
                                                                                                                                                                                                                                                                                                    + Type : NgForm + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + Public + parentFormGroup + + +
                                                                                                                                                                                                                                                                                                    + Type : FormGroupDirective + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + stateChanges + + +
                                                                                                                                                                                                                                                                                                    + Default value : new Subject<void>() +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    + + + touched + + +
                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    import {
                                                                                                                                                                                                                                                                                                    +  Component,
                                                                                                                                                                                                                                                                                                    +  ElementRef,
                                                                                                                                                                                                                                                                                                    +  Optional,
                                                                                                                                                                                                                                                                                                    +  Self,
                                                                                                                                                                                                                                                                                                    +  ViewChild,
                                                                                                                                                                                                                                                                                                    +  ViewEncapsulation,
                                                                                                                                                                                                                                                                                                    +} from "@angular/core";
                                                                                                                                                                                                                                                                                                    +import { CustomFormControlDirective } from "../../../../common-components/basic-autocomplete/custom-form-control.directive";
                                                                                                                                                                                                                                                                                                    +import { MatCheckbox, MatCheckboxModule } from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                    +  FormGroupDirective,
                                                                                                                                                                                                                                                                                                    +  FormsModule,
                                                                                                                                                                                                                                                                                                    +  NgControl,
                                                                                                                                                                                                                                                                                                    +  NgForm,
                                                                                                                                                                                                                                                                                                    +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                    +import { MatFormFieldControl } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                    +import { ErrorStateMatcher } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                    +  selector: "app-boolean-input",
                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                    +  imports: [MatCheckboxModule, FormsModule],
                                                                                                                                                                                                                                                                                                    +  providers: [
                                                                                                                                                                                                                                                                                                    +    { provide: MatFormFieldControl, useExisting: BooleanInputComponent },
                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                    +  templateUrl: "./boolean-input.component.html",
                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./boolean-input.component.scss"],
                                                                                                                                                                                                                                                                                                    +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                    +export class BooleanInputComponent extends CustomFormControlDirective<boolean> {
                                                                                                                                                                                                                                                                                                    +  @ViewChild(MatCheckbox, { static: true }) inputElement: MatCheckbox;
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                    +    elementRef: ElementRef<HTMLElement>,
                                                                                                                                                                                                                                                                                                    +    errorStateMatcher: ErrorStateMatcher,
                                                                                                                                                                                                                                                                                                    +    @Optional() @Self() ngControl: NgControl,
                                                                                                                                                                                                                                                                                                    +    @Optional() parentForm: NgForm,
                                                                                                                                                                                                                                                                                                    +    @Optional() parentFormGroup: FormGroupDirective,
                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                    +    super(
                                                                                                                                                                                                                                                                                                    +      elementRef,
                                                                                                                                                                                                                                                                                                    +      errorStateMatcher,
                                                                                                                                                                                                                                                                                                    +      ngControl,
                                                                                                                                                                                                                                                                                                    +      parentForm,
                                                                                                                                                                                                                                                                                                    +      parentFormGroup,
                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +  override onContainerClick(event: MouseEvent) {
                                                                                                                                                                                                                                                                                                    +    if ((event.target as Element).tagName.toLowerCase() != "mat-checkbox") {
                                                                                                                                                                                                                                                                                                    +      this.inputElement.focus();
                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    <mat-checkbox
                                                                                                                                                                                                                                                                                                    +  [disabled]="disabled"
                                                                                                                                                                                                                                                                                                    +  [(ngModel)]="value"
                                                                                                                                                                                                                                                                                                    +  (change)="onChange($event.checked)"
                                                                                                                                                                                                                                                                                                    +  >{{ placeholder }}</mat-checkbox
                                                                                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    + ./boolean-input.component.scss +

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    app-boolean-input label {
                                                                                                                                                                                                                                                                                                    +  font-size: initial;
                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ChangelogComponent.html b/documentation/components/ChangelogComponent.html new file mode 100644 index 0000000000..a01ecb443c --- /dev/null +++ b/documentation/components/ChangelogComponent.html @@ -0,0 +1,848 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      + src/app/core/ui/latest-changes/changelog/changelog.component.ts +

                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Display information from the changelog for the latest version.

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      This component is used as content of a dialog.

                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Accessors
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      +constructor(data: Observable<Changelog[]>, latestChangesService: LatestChangesService, markdownService: MarkdownService) +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      This component is to be created through a MatDialog that should pass in the relevant data.

                                                                                                                                                                                                                                                                                                      +Example :
                                                                                                                                                                                                                                                                                                      dialog.open(ChangelogComponent, { data: { changelogData: latestChangesService.getChangelogs() } });
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                      data + Observable<Changelog[]> + + No +
                                                                                                                                                                                                                                                                                                      latestChangesService + LatestChangesService + + No +
                                                                                                                                                                                                                                                                                                      markdownService + MarkdownService + + No +
                                                                                                                                                                                                                                                                                                      + Example : +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      dialog.open(ChangelogComponent, { data: { changelogData: latestChangesService.getChangelogs() } });

                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      + + + loadPreviousRelease + + +
                                                                                                                                                                                                                                                                                                      +loadPreviousRelease() +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Add one more previous release card to the end of the currently displayed list of changelogs.

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      + + + changelogs + + +
                                                                                                                                                                                                                                                                                                      + Type : Changelog[] + +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      The array of relevant changelog entries to be displayed

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      + + + + contentContainer + + +
                                                                                                                                                                                                                                                                                                      + Type : ElementRef + +
                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                      + + @ViewChild('changelogContainer')
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                      + Type : Observable<Changelog[]> + +
                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                      + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      + + + showAdvancedDetails + + +
                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      Display advanced information that may not be useful to normal users

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      + Accessors +

                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      + + noChangelogAvailable +
                                                                                                                                                                                                                                                                                                      + getnoChangelogAvailable() +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      import {
                                                                                                                                                                                                                                                                                                      +  Component,
                                                                                                                                                                                                                                                                                                      +  ElementRef,
                                                                                                                                                                                                                                                                                                      +  Inject,
                                                                                                                                                                                                                                                                                                      +  OnInit,
                                                                                                                                                                                                                                                                                                      +  ViewChild,
                                                                                                                                                                                                                                                                                                      +} from "@angular/core";
                                                                                                                                                                                                                                                                                                      +import { Changelog } from "../changelog";
                                                                                                                                                                                                                                                                                                      +import { MAT_DIALOG_DATA } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                      +import { isObservable, Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                      +import { LatestChangesService } from "../latest-changes.service";
                                                                                                                                                                                                                                                                                                      +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                      +import { MarkdownService } from "ngx-markdown";
                                                                                                                                                                                                                                                                                                      +import { MarkedRendererCustom } from "./MarkedRendererCustom";
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                      + * Display information from the changelog for the latest version.
                                                                                                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                                                                                                      + * This component is used as content of a dialog.
                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                      +@UntilDestroy()
                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                      +  templateUrl: "./changelog.component.html",
                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./changelog.component.scss"],
                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                      +export class ChangelogComponent implements OnInit {
                                                                                                                                                                                                                                                                                                      +  /** The array of relevant changelog entries to be displayed */
                                                                                                                                                                                                                                                                                                      +  changelogs: Changelog[];
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  /** Display advanced information that may not be useful to normal users */
                                                                                                                                                                                                                                                                                                      +  showAdvancedDetails = false;
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  @ViewChild("changelogContainer") contentContainer: ElementRef;
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                      +   * This component is to be created through a MatDialog that should pass in the relevant data.
                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                      +   * @example
                                                                                                                                                                                                                                                                                                      +   * dialog.open(ChangelogComponent, { data: { changelogData: latestChangesService.getChangelogs() } });
                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                      +    @Inject(MAT_DIALOG_DATA) public data: Observable<Changelog[]>,
                                                                                                                                                                                                                                                                                                      +    private latestChangesService: LatestChangesService,
                                                                                                                                                                                                                                                                                                      +    private markdownService: MarkdownService,
                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                      +    if (isObservable(this.data)) {
                                                                                                                                                                                                                                                                                                      +      this.data
                                                                                                                                                                                                                                                                                                      +        .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                      +        .subscribe((changelog) => (this.changelogs = changelog));
                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +    this.customizeMarkdownRenderer();
                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  get noChangelogAvailable(): string {
                                                                                                                                                                                                                                                                                                      +    return $localize`No Changelog Available`;
                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                      +   * Add one more previous release card to the end of the currently displayed list of changelogs.
                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                      +  loadPreviousRelease() {
                                                                                                                                                                                                                                                                                                      +    if (!this.changelogs) {
                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +    const lastDisplayedVersion =
                                                                                                                                                                                                                                                                                                      +      this.changelogs[this.changelogs.length - 1]?.tag_name;
                                                                                                                                                                                                                                                                                                      +    this.latestChangesService
                                                                                                                                                                                                                                                                                                      +      .getChangelogsBeforeVersion(lastDisplayedVersion, 1)
                                                                                                                                                                                                                                                                                                      +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                      +      .subscribe((additionalChangelog) => {
                                                                                                                                                                                                                                                                                                      +        this.changelogs.push(...additionalChangelog);
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +        setTimeout(() => this.scrollToBottomOfReleases());
                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  private scrollToBottomOfReleases() {
                                                                                                                                                                                                                                                                                                      +    this.contentContainer.nativeElement.scrollTop =
                                                                                                                                                                                                                                                                                                      +      this.contentContainer.nativeElement.scrollHeight;
                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +  private customizeMarkdownRenderer() {
                                                                                                                                                                                                                                                                                                      +    const customRenderer = new MarkedRendererCustom();
                                                                                                                                                                                                                                                                                                      +    this.markdownService.renderer.heading = customRenderer.heading;
                                                                                                                                                                                                                                                                                                      +    this.markdownService.renderer.list = customRenderer.list;
                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      <!--
                                                                                                                                                                                                                                                                                                      +  ~     This file is part of ndb-core.
                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                      +  ~     ndb-core is free software: you can redistribute it and/or modify
                                                                                                                                                                                                                                                                                                      +  ~     it under the terms of the GNU General Public License as published by
                                                                                                                                                                                                                                                                                                      +  ~     the Free Software Foundation, either version 3 of the License, or
                                                                                                                                                                                                                                                                                                      +  ~     (at your option) any later version.
                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                      +  ~     ndb-core is distributed in the hope that it will be useful,
                                                                                                                                                                                                                                                                                                      +  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
                                                                                                                                                                                                                                                                                                      +  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                                                                                                                                                                                                                                                                                      +  ~     GNU General Public License for more details.
                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                      +  ~     You should have received a copy of the GNU General Public License
                                                                                                                                                                                                                                                                                                      +  ~     along with ndb-core.  If not, see <http://www.gnu.org/licenses/>.
                                                                                                                                                                                                                                                                                                      +  -->
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +<h1 mat-dialog-title>Latest Changes</h1>
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +<mat-dialog-content #changelogContainer>
                                                                                                                                                                                                                                                                                                      +  <div *ngFor="let changelog of changelogs" class="changelog-entry-container">
                                                                                                                                                                                                                                                                                                      +    <h2>{{ changelog?.name || noChangelogAvailable }}</h2>
                                                                                                                                                                                                                                                                                                      +    <div class="padding-bottom-regular">
                                                                                                                                                                                                                                                                                                      +      <span
                                                                                                                                                                                                                                                                                                      +        ><fa-icon icon="calendar-alt"></fa-icon>
                                                                                                                                                                                                                                                                                                      +        {{ changelog?.published_at | date }}</span
                                                                                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                                                                                      +      <span class="padding-left-small"
                                                                                                                                                                                                                                                                                                      +        ><fa-icon icon="tag"></fa-icon> {{ changelog?.tag_name }}</span
                                                                                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                                                                                      +    </div>
                                                                                                                                                                                                                                                                                                      +    <markdown [data]="changelog?.body"></markdown>
                                                                                                                                                                                                                                                                                                      +    <a
                                                                                                                                                                                                                                                                                                      +      *ngIf="showAdvancedDetails"
                                                                                                                                                                                                                                                                                                      +      mat-stroked-button
                                                                                                                                                                                                                                                                                                      +      [href]="'https://www.github.com'"
                                                                                                                                                                                                                                                                                                      +      target="_blank"
                                                                                                                                                                                                                                                                                                      +      i18n="Show more information about a change that was made to the app"
                                                                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                                                                      +      More Information
                                                                                                                                                                                                                                                                                                      +    </a>
                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                      +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +<mat-dialog-actions class="flex-row gap-regular flex-wrap">
                                                                                                                                                                                                                                                                                                      +  <button mat-stroked-button (click)="loadPreviousRelease()" i18n>
                                                                                                                                                                                                                                                                                                      +    Show previous changes
                                                                                                                                                                                                                                                                                                      +  </button>
                                                                                                                                                                                                                                                                                                      +  <button
                                                                                                                                                                                                                                                                                                      +    mat-raised-button
                                                                                                                                                                                                                                                                                                      +    [mat-dialog-close]="true"
                                                                                                                                                                                                                                                                                                      +    i18n="Generic close button"
                                                                                                                                                                                                                                                                                                      +    class="remove-margin-left"
                                                                                                                                                                                                                                                                                                      +  >
                                                                                                                                                                                                                                                                                                      +    Close
                                                                                                                                                                                                                                                                                                      +  </button>
                                                                                                                                                                                                                                                                                                      +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      + ./changelog.component.scss +

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      @use "variables/sizes";
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +.changelog-entry-container {
                                                                                                                                                                                                                                                                                                      +  border-top: 1px black solid;
                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +.changelog-entry-container h2 {
                                                                                                                                                                                                                                                                                                      +  margin: sizes.$small 0 sizes.$small 0;
                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ChildBlockComponent.html b/documentation/components/ChildBlockComponent.html new file mode 100644 index 0000000000..2d7125d262 --- /dev/null +++ b/documentation/components/ChildBlockComponent.html @@ -0,0 +1,675 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        + src/app/child-dev-project/children/child-block/child-block.component.ts +

                                                                                                                                                                                                                                                                                                        + + + + +

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        + OnChanges +

                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        +constructor(childrenService: ChildrenService) +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                        childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        + + entityId +
                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        + + linkDisabled +
                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        prevent clicks on the component to navigate to the details page

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        + + tooltipDisabled +
                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        prevent additional details to be displayed in a tooltip on mouse over

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        + + + icon + + +
                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                        +  OnChanges,
                                                                                                                                                                                                                                                                                                        +  Optional,
                                                                                                                                                                                                                                                                                                        +  SimpleChanges,
                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                        +import { ChildrenService } from "../children.service";
                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                        +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                        +import { TemplateTooltipDirective } from "../../../core/common-components/template-tooltip/template-tooltip.directive";
                                                                                                                                                                                                                                                                                                        +import { ChildBlockTooltipComponent } from "./child-block-tooltip/child-block-tooltip.component";
                                                                                                                                                                                                                                                                                                        +import { DisplayImgComponent } from "../../../features/file/display-img/display-img.component";
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +@DynamicComponent("ChildBlock")
                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                        +  selector: "app-child-block",
                                                                                                                                                                                                                                                                                                        +  templateUrl: "./child-block.component.html",
                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./child-block.component.scss"],
                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                        +    TemplateTooltipDirective,
                                                                                                                                                                                                                                                                                                        +    ChildBlockTooltipComponent,
                                                                                                                                                                                                                                                                                                        +    DisplayImgComponent,
                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                        +export class ChildBlockComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                        +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                        +  @Input() entityId: string;
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +  /** prevent clicks on the component to navigate to the details page */
                                                                                                                                                                                                                                                                                                        +  @Input() linkDisabled: boolean;
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +  /** prevent additional details to be displayed in a tooltip on mouse over */
                                                                                                                                                                                                                                                                                                        +  @Input() tooltipDisabled: boolean;
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +  icon: string;
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +  constructor(@Optional() private childrenService: ChildrenService) {}
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +  async ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                        +    if (changes.hasOwnProperty("entityId")) {
                                                                                                                                                                                                                                                                                                        +      this.entity = await this.childrenService.getChild(this.entityId);
                                                                                                                                                                                                                                                                                                        +      this.icon = this.entity?.getConstructor().icon;
                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        <span
                                                                                                                                                                                                                                                                                                        +  *ngIf="entity"
                                                                                                                                                                                                                                                                                                        +  [appTemplateTooltip]="tooltip"
                                                                                                                                                                                                                                                                                                        +  [tooltipDisabled]="tooltipDisabled"
                                                                                                                                                                                                                                                                                                        +  [class.inactive]="!entity.isActive"
                                                                                                                                                                                                                                                                                                        +  class="truncate-text container"
                                                                                                                                                                                                                                                                                                        +>
                                                                                                                                                                                                                                                                                                        +  <app-display-img
                                                                                                                                                                                                                                                                                                        +    [entity]="entity"
                                                                                                                                                                                                                                                                                                        +    imgProperty="photo"
                                                                                                                                                                                                                                                                                                        +    [defaultIcon]="icon"
                                                                                                                                                                                                                                                                                                        +    class="child-pic"
                                                                                                                                                                                                                                                                                                        +  ></app-display-img>
                                                                                                                                                                                                                                                                                                        +  <span class="font-size-rel">{{ entity?.toString() }}</span>
                                                                                                                                                                                                                                                                                                        +  <span class="subnote" *ngIf="entity?.['projectNumber']">
                                                                                                                                                                                                                                                                                                        +    ({{ entity?.["projectNumber"] }})</span
                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                        +</span>
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +<ng-template #tooltip>
                                                                                                                                                                                                                                                                                                        +  <app-child-block-tooltip [entity]="entity"></app-child-block-tooltip>
                                                                                                                                                                                                                                                                                                        +</ng-template>
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        + ./child-block.component.scss +

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        @use "variables/sizes";
                                                                                                                                                                                                                                                                                                        +@use "variables/colors";
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +.child-pic {
                                                                                                                                                                                                                                                                                                        +  width: sizes.$icon-block;
                                                                                                                                                                                                                                                                                                        +  height: sizes.$icon-block;
                                                                                                                                                                                                                                                                                                        +  border-radius: 50%;
                                                                                                                                                                                                                                                                                                        +  object-fit: cover;
                                                                                                                                                                                                                                                                                                        +  margin-right: 4px;
                                                                                                                                                                                                                                                                                                        +  vertical-align: middle;
                                                                                                                                                                                                                                                                                                        +  overflow: hidden;
                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +.inactive {
                                                                                                                                                                                                                                                                                                        +  color: colors.$inactive;
                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +.container {
                                                                                                                                                                                                                                                                                                        +  display: flex;
                                                                                                                                                                                                                                                                                                        +  align-items: center;
                                                                                                                                                                                                                                                                                                        +  font-size: 1em;
                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +.font-size-rel {
                                                                                                                                                                                                                                                                                                        +  font-size: 1em;
                                                                                                                                                                                                                                                                                                        +  margin-right: 3px;
                                                                                                                                                                                                                                                                                                        +  font-weight: 500;
                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +.subnote {
                                                                                                                                                                                                                                                                                                        +  font-size: 0.7em;
                                                                                                                                                                                                                                                                                                        +  position: relative;
                                                                                                                                                                                                                                                                                                        +  top: 0.2em;
                                                                                                                                                                                                                                                                                                        +  color: #5e5e5e;
                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ChildBlockTooltipComponent.html b/documentation/components/ChildBlockTooltipComponent.html new file mode 100644 index 0000000000..7a5ed36c91 --- /dev/null +++ b/documentation/components/ChildBlockTooltipComponent.html @@ -0,0 +1,613 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          + src/app/child-dev-project/children/child-block/child-block-tooltip/child-block-tooltip.component.ts +

                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Tooltip that is shown when hovering over a child block and the tooltip is enabled.

                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          + OnInit +

                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          +constructor(fileService: FileService) +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                          fileService + FileService + + No +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          The entity to show the tooltip for

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          + + + icon + + +
                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          + + + imgPath + + +
                                                                                                                                                                                                                                                                                                          + Type : SafeUrl + +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                          +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                          +import { FaDynamicIconComponent } from "../../../../core/common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                          +import { SafeUrl } from "@angular/platform-browser";
                                                                                                                                                                                                                                                                                                          +import { FileService } from "../../../../features/file/file.service";
                                                                                                                                                                                                                                                                                                          +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                          + * Tooltip that is shown when hovering over a child block and the tooltip is enabled.
                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                          +  selector: "app-child-block-tooltip",
                                                                                                                                                                                                                                                                                                          +  templateUrl: "./child-block-tooltip.component.html",
                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./child-block-tooltip.component.scss"],
                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                          +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                          +    NgForOf,
                                                                                                                                                                                                                                                                                                          +    FaDynamicIconComponent,
                                                                                                                                                                                                                                                                                                          +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                          +export class ChildBlockTooltipComponent implements OnInit {
                                                                                                                                                                                                                                                                                                          +  /** The entity to show the tooltip for */
                                                                                                                                                                                                                                                                                                          +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                          +  icon: string;
                                                                                                                                                                                                                                                                                                          +  imgPath: SafeUrl;
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +  constructor(private fileService: FileService) {}
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +  ngOnInit() {
                                                                                                                                                                                                                                                                                                          +    this.icon = this.entity?.getConstructor().icon;
                                                                                                                                                                                                                                                                                                          +    if (this.entity?.["photo"]) {
                                                                                                                                                                                                                                                                                                          +      this.fileService
                                                                                                                                                                                                                                                                                                          +        .loadFile(this.entity, "photo")
                                                                                                                                                                                                                                                                                                          +        .subscribe((res) => (this.imgPath = res));
                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          <app-fa-dynamic-icon *ngIf="!imgPath" [icon]="icon" />
                                                                                                                                                                                                                                                                                                          +<img
                                                                                                                                                                                                                                                                                                          +  *ngIf="imgPath"
                                                                                                                                                                                                                                                                                                          +  [src]="imgPath"
                                                                                                                                                                                                                                                                                                          +  class="child-pic mat-elevation-z1"
                                                                                                                                                                                                                                                                                                          +  alt=""
                                                                                                                                                                                                                                                                                                          +/>
                                                                                                                                                                                                                                                                                                          +<div>
                                                                                                                                                                                                                                                                                                          +  <!-- Font-weight is applied as style to override the default -->
                                                                                                                                                                                                                                                                                                          +  <h3 style="font-weight: bold">{{ entity?.["name"] }}</h3>
                                                                                                                                                                                                                                                                                                          +  <a>
                                                                                                                                                                                                                                                                                                          +    <fa-icon icon="phone"></fa-icon>
                                                                                                                                                                                                                                                                                                          +    {{ entity?.["phone"] }}</a
                                                                                                                                                                                                                                                                                                          +  >
                                                                                                                                                                                                                                                                                                          +  <p *ngIf="entity?.['schoolId'] || entity?.['schoolClass']">
                                                                                                                                                                                                                                                                                                          +    <app-entity-block
                                                                                                                                                                                                                                                                                                          +      *ngFor="let id of entity?.['schoolId']"
                                                                                                                                                                                                                                                                                                          +      [entityId]="id"
                                                                                                                                                                                                                                                                                                          +      [linkDisabled]="true"
                                                                                                                                                                                                                                                                                                          +    ></app-entity-block>
                                                                                                                                                                                                                                                                                                          +    ,
                                                                                                                                                                                                                                                                                                          +    <ng-container
                                                                                                                                                                                                                                                                                                          +      i18n="The class a child is attending|e.g. 'class 8'"
                                                                                                                                                                                                                                                                                                          +      *ngIf="entity?.['schoolClass']"
                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                          +      class {{ entity?.["schoolClass"] }}
                                                                                                                                                                                                                                                                                                          +    </ng-container>
                                                                                                                                                                                                                                                                                                          +  </p>
                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          + ./child-block-tooltip.component.scss +

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          .child-pic {
                                                                                                                                                                                                                                                                                                          +  width: 80px;
                                                                                                                                                                                                                                                                                                          +  height: 80px;
                                                                                                                                                                                                                                                                                                          +  border-radius: 100vmax;
                                                                                                                                                                                                                                                                                                          +  object-fit: cover;
                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +:host {
                                                                                                                                                                                                                                                                                                          +  padding: 0.5em;
                                                                                                                                                                                                                                                                                                          +  display: flex;
                                                                                                                                                                                                                                                                                                          +  flex-direction: row;
                                                                                                                                                                                                                                                                                                          +  gap: 2em;
                                                                                                                                                                                                                                                                                                          +  align-items: center;
                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ChildSchoolOverviewComponent.html b/documentation/components/ChildSchoolOverviewComponent.html new file mode 100644 index 0000000000..b53e7f73b8 --- /dev/null +++ b/documentation/components/ChildSchoolOverviewComponent.html @@ -0,0 +1,1492 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            + src/app/child-dev-project/children/child-school-overview/child-school-overview.component.ts +

                                                                                                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            + RelatedTimePeriodEntitiesComponent +

                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            +constructor(childrenService: ChildrenService, entityMapper: EntityMapperService, entityRegistry: EntityRegistry, screenWidthObserver: ScreenWidthObserver, filterService: FilterService) +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                            childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                            entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                            screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                            filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + columns +
                                                                                                                                                                                                                                                                                                            + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + showInactive +
                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                            + Default value : false +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + single +
                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                            + Default value : true +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + clickMode +
                                                                                                                                                                                                                                                                                                            + Type : "popup" | "navigate" + +
                                                                                                                                                                                                                                                                                                            + Default value : "popup" +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + editable +
                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                            + Default value : true +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            currently viewed/main entity for which related entities are displayed in this component

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + entityType +
                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            entity type of the related entities to be displayed

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + filter +
                                                                                                                                                                                                                                                                                                            + Type : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            This filter is applied before displaying the data.

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + loaderMethod +
                                                                                                                                                                                                                                                                                                            + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + property +
                                                                                                                                                                                                                                                                                                            + Type : string | string[] + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Property name of the related entities (type given in this.entityType) that holds the entity id +to be matched with the id of the current main entity (given in this.entity). +If not explicitly set, this will be inferred based on the defined relations between the entities.

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            manually setting this is only necessary if you have multiple properties referencing the same entity type +and you want to list only records related to one of them. +For example: if you set entityType = "Project" (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities, +you can set property = "supervisors" to only list those projects where the current User is supervisors, not participant.

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + + getData + + +
                                                                                                                                                                                                                                                                                                            + + getData() +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + + createNewRecordFactory + + +
                                                                                                                                                                                                                                                                                                            + + createNewRecordFactory() +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + Returns : () => any + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + Protected + getProperty + + +
                                                                                                                                                                                                                                                                                                            + + getProperty() +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + Returns : string | [] + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + Protected + initFilter + + +
                                                                                                                                                                                                                                                                                                            + + initFilter() +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + Returns : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + Protected + listenToEntityUpdates + + +
                                                                                                                                                                                                                                                                                                            + + listenToEntityUpdates() +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + + entityCtr + + +
                                                                                                                                                                                                                                                                                                            + Default value : ChildSchoolRelation +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + mode + + +
                                                                                                                                                                                                                                                                                                            + Type : "child" | "school" + +
                                                                                                                                                                                                                                                                                                            + Default value : "child" +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + + _columns + + +
                                                                                                                                                                                                                                                                                                            + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                            + Default value : [ + { id: "start", visibleFrom: "md" }, + { id: "end", visibleFrom: "md" }, + isActiveIndicator, + ] +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + backgroundColorFn + + +
                                                                                                                                                                                                                                                                                                            + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + hasCurrentlyActiveEntry + + +
                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                            + Type : string[] + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            + + + data + + +
                                                                                                                                                                                                                                                                                                            + Type : E[] + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                            +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                            +import { ChildSchoolRelation } from "../model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                            +import { ChildrenService } from "../children.service";
                                                                                                                                                                                                                                                                                                            +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                            +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                            +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                            +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                            +import { PillComponent } from "../../../core/common-components/pill/pill.component";
                                                                                                                                                                                                                                                                                                            +import { RelatedTimePeriodEntitiesComponent } from "../../../core/entity-details/related-time-period-entities/related-time-period-entities.component";
                                                                                                                                                                                                                                                                                                            +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                            +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                            +import { ScreenWidthObserver } from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                            +import { FilterService } from "../../../core/filter/filter.service";
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +// TODO: once schema-generated indices are available (#262), remove this component and use its generic super class directly
                                                                                                                                                                                                                                                                                                            +@DynamicComponent("ChildSchoolOverview")
                                                                                                                                                                                                                                                                                                            +@DynamicComponent("PreviousSchools")
                                                                                                                                                                                                                                                                                                            +@DynamicComponent("ChildrenOverview")
                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                            +  selector: "app-child-school-overview",
                                                                                                                                                                                                                                                                                                            +  templateUrl:
                                                                                                                                                                                                                                                                                                            +    "../../../core/entity-details/related-time-period-entities/related-time-period-entities.component.html",
                                                                                                                                                                                                                                                                                                            +  styleUrls: [
                                                                                                                                                                                                                                                                                                            +    "../../../core/entity-details/related-time-period-entities/related-time-period-entities.component.scss",
                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                            +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                            +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                                            +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                            +    FormsModule,
                                                                                                                                                                                                                                                                                                            +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                            +    PillComponent,
                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                            +export class ChildSchoolOverviewComponent
                                                                                                                                                                                                                                                                                                            +  extends RelatedTimePeriodEntitiesComponent<ChildSchoolRelation>
                                                                                                                                                                                                                                                                                                            +  implements OnInit
                                                                                                                                                                                                                                                                                                            +{
                                                                                                                                                                                                                                                                                                            +  mode: "child" | "school" = "child";
                                                                                                                                                                                                                                                                                                            +  override entityCtr = ChildSchoolRelation;
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                            +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                            +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                            +    entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                            +    screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                            +    filterService: FilterService,
                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                            +    super(
                                                                                                                                                                                                                                                                                                            +      entityMapper,
                                                                                                                                                                                                                                                                                                            +      entityRegistry,
                                                                                                                                                                                                                                                                                                            +      screenWidthObserver,
                                                                                                                                                                                                                                                                                                            +      filterService,
                                                                                                                                                                                                                                                                                                            +      null,
                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +    this.columns = [
                                                                                                                                                                                                                                                                                                            +      { id: "childId" }, // schoolId/childId replaced dynamically during init
                                                                                                                                                                                                                                                                                                            +      { id: "start", visibleFrom: "md" },
                                                                                                                                                                                                                                                                                                            +      { id: "end", visibleFrom: "md" },
                                                                                                                                                                                                                                                                                                            +      { id: "schoolClass" },
                                                                                                                                                                                                                                                                                                            +      { id: "result" },
                                                                                                                                                                                                                                                                                                            +    ];
                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +  override async ngOnInit(): Promise<void> {
                                                                                                                                                                                                                                                                                                            +    this.mode = this.entity.getType().toLowerCase() as any;
                                                                                                                                                                                                                                                                                                            +    this.showInactive = this.mode === "child";
                                                                                                                                                                                                                                                                                                            +    this.switchRelatedEntityColumnForMode();
                                                                                                                                                                                                                                                                                                            +    await super.ngOnInit();
                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +  override getData() {
                                                                                                                                                                                                                                                                                                            +    return this.childrenService.queryRelations(this.entity.getId(false));
                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +  private switchRelatedEntityColumnForMode() {
                                                                                                                                                                                                                                                                                                            +    // display the related entity that is *not* the current main entity
                                                                                                                                                                                                                                                                                                            +    const idColumn = this._columns.find(
                                                                                                                                                                                                                                                                                                            +      (c) => c.id === "childId" || c.id === "schoolId",
                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                            +    if (idColumn) {
                                                                                                                                                                                                                                                                                                            +      idColumn.id = this.mode === "child" ? "schoolId" : "childId";
                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            <app-pill class="hint-badge" *ngIf="!hasCurrentlyActiveEntry && !!data">
                                                                                                                                                                                                                                                                                                            +  Currently there is no active entry. To add a new entry, click on the
                                                                                                                                                                                                                                                                                                            +  <fa-icon class="color-accent" aria-label="add" icon="plus-circle"></fa-icon>
                                                                                                                                                                                                                                                                                                            +  button.
                                                                                                                                                                                                                                                                                                            +</app-pill>
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +<app-entities-table
                                                                                                                                                                                                                                                                                                            +  [entityType]="entityCtr"
                                                                                                                                                                                                                                                                                                            +  [records]="data"
                                                                                                                                                                                                                                                                                                            +  [filter]="filter"
                                                                                                                                                                                                                                                                                                            +  [customColumns]="_columns"
                                                                                                                                                                                                                                                                                                            +  [newRecordFactory]="createNewRecordFactory()"
                                                                                                                                                                                                                                                                                                            +  [getBackgroundColor]="showInactive ? backgroundColorFn : undefined"
                                                                                                                                                                                                                                                                                                            +  [clickMode]="clickMode"
                                                                                                                                                                                                                                                                                                            +  [(showInactive)]="showInactive"
                                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                                            +</app-entities-table>
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            + ../../../core/entity-details/related-time-period-entities/related-time-period-entities.component.scss +

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            @use "variables/sizes";
                                                                                                                                                                                                                                                                                                            +@use "variables/colors";
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +.hint-badge {
                                                                                                                                                                                                                                                                                                            +  background-color: colors.$primary;
                                                                                                                                                                                                                                                                                                            +  margin-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ComingSoonComponent.html b/documentation/components/ComingSoonComponent.html new file mode 100644 index 0000000000..b9f653b206 --- /dev/null +++ b/documentation/components/ComingSoonComponent.html @@ -0,0 +1,805 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              + src/app/features/coming-soon/coming-soon/coming-soon.component.ts +

                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Placeholder page to announce that a feature is not available yet.

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              This integrates with analytics and allows user to explicitly request the feature.

                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              +constructor(alertService: AlertService, analyticsService: AnalyticsService, activatedRoute: ActivatedRoute, dialogData: literal type) +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                              alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                              analyticsService + AnalyticsService + + No +
                                                                                                                                                                                                                                                                                                              activatedRoute + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                              dialogData + literal type + + No +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              + + featureId +
                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              the identifier for the specific feature this page serves as a placeholder for

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              + + + reportFeatureRequest + + +
                                                                                                                                                                                                                                                                                                              +reportFeatureRequest() +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Report an explicit user request for the feature through the analytics plugin.

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              + + + Static + featuresRequested + + +
                                                                                                                                                                                                                                                                                                              + Type : [] + +
                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              An array of featureIds that the user has already requested during the current session.

                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              Users cannot request the same feature twice and see that they have already requested the feature. +This information is not persisted across sessions however. So after reloading the page this history is gone.

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              + + + requested + + +
                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              whether user has already requested the feature

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              import { Component, Inject, Input, OnInit, Optional } from "@angular/core";
                                                                                                                                                                                                                                                                                                              +import { AlertService } from "../../../core/alerts/alert.service";
                                                                                                                                                                                                                                                                                                              +import { ActivatedRoute } from "@angular/router";
                                                                                                                                                                                                                                                                                                              +import { AnalyticsService } from "../../../core/analytics/analytics.service";
                                                                                                                                                                                                                                                                                                              +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                              +import { DialogCloseComponent } from "../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                              +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                              + * Placeholder page to announce that a feature is not available yet.
                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                              + * This integrates with analytics and allows user to explicitly request the feature.
                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                              +@RouteTarget("ComingSoon")
                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                              +  selector: "app-coming-soon",
                                                                                                                                                                                                                                                                                                              +  templateUrl: "./coming-soon.component.html",
                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./coming-soon.component.scss"],
                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                              +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                              +    MatDialogModule,
                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                              +export class ComingSoonComponent implements OnInit {
                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                              +   * An array of featureIds that the user has already requested during the current session.
                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                              +   * Users cannot request the same feature twice and see that they have already requested the feature.
                                                                                                                                                                                                                                                                                                              +   * This information is not persisted across sessions however. So after reloading the page this history is gone.
                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                              +  static featuresRequested = [];
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                              +   * the identifier for the specific feature this page serves as a placeholder for
                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                              +  @Input() featureId: string;
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                              +   * whether user has already requested the feature
                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                              +  requested: boolean;
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                              +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                              +    private analyticsService: AnalyticsService,
                                                                                                                                                                                                                                                                                                              +    private activatedRoute: ActivatedRoute,
                                                                                                                                                                                                                                                                                                              +    @Optional() @Inject(MAT_DIALOG_DATA) dialogData: { featureId: string },
                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                              +    if (dialogData) {
                                                                                                                                                                                                                                                                                                              +      this.init(dialogData.featureId);
                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                              +    this.activatedRoute.paramMap.subscribe((params) => {
                                                                                                                                                                                                                                                                                                              +      if (params.has("feature")) {
                                                                                                                                                                                                                                                                                                              +        this.init(params.get("feature"));
                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                              +    if (this.featureId) {
                                                                                                                                                                                                                                                                                                              +      this.init(this.featureId);
                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  private init(newFeatureId: string) {
                                                                                                                                                                                                                                                                                                              +    this.featureId = newFeatureId;
                                                                                                                                                                                                                                                                                                              +    this.requested =
                                                                                                                                                                                                                                                                                                              +      ComingSoonComponent.featuresRequested.includes(newFeatureId);
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +    this.track("visit");
                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  private track(action: string) {
                                                                                                                                                                                                                                                                                                              +    this.analyticsService.eventTrack(this.featureId, {
                                                                                                                                                                                                                                                                                                              +      category: "feature_request",
                                                                                                                                                                                                                                                                                                              +      label: action,
                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                              +   * Report an explicit user request for the feature through the analytics plugin.
                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                              +  reportFeatureRequest() {
                                                                                                                                                                                                                                                                                                              +    this.track("request");
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +    this.requested = true;
                                                                                                                                                                                                                                                                                                              +    ComingSoonComponent.featuresRequested.push(this.featureId);
                                                                                                                                                                                                                                                                                                              +    this.alertService.addInfo(
                                                                                                                                                                                                                                                                                                              +      $localize`:Sent after the user has sent a feature-request:Thank you for letting us know.`,
                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              <app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                                                                              +<mat-dialog-content>
                                                                                                                                                                                                                                                                                                              +  <h1 i18n="Coming Soon header">Coming Soon</h1>
                                                                                                                                                                                                                                                                                                              +  <h3 i18n="Coming Soon description">
                                                                                                                                                                                                                                                                                                              +    Sorry, this feature isn't quite ready yet. We are working hard to make this
                                                                                                                                                                                                                                                                                                              +    available for you. Let us know below if you need this functionality.
                                                                                                                                                                                                                                                                                                              +  </h3>
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  <div class="feedback-section margin-bottom-regular">
                                                                                                                                                                                                                                                                                                              +    <button
                                                                                                                                                                                                                                                                                                              +      mat-raised-button
                                                                                                                                                                                                                                                                                                              +      color="primary"
                                                                                                                                                                                                                                                                                                              +      class="full-width"
                                                                                                                                                                                                                                                                                                              +      (click)="reportFeatureRequest()"
                                                                                                                                                                                                                                                                                                              +      [disabled]="requested"
                                                                                                                                                                                                                                                                                                              +      i18n="
                                                                                                                                                                                                                                                                                                              +        Feature Button|Indicates that the user needs this feature and can send a
                                                                                                                                                                                                                                                                                                              +        feature-request
                                                                                                                                                                                                                                                                                                              +      "
                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                              +      <fa-icon *ngIf="requested" aria-label="requested" icon="check"></fa-icon>
                                                                                                                                                                                                                                                                                                              +      I need this feature
                                                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +    <a
                                                                                                                                                                                                                                                                                                              +      i18n
                                                                                                                                                                                                                                                                                                              +      mat-stroked-button
                                                                                                                                                                                                                                                                                                              +      class="full-width"
                                                                                                                                                                                                                                                                                                              +      target="_blank"
                                                                                                                                                                                                                                                                                                              +      rel="noopener"
                                                                                                                                                                                                                                                                                                              +      href="mailto:info@aam-digital.com?subject=Feature-Request%20{{
                                                                                                                                                                                                                                                                                                              +        featureId
                                                                                                                                                                                                                                                                                                              +      }}"
                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                              +      I can tell you about my use case
                                                                                                                                                                                                                                                                                                              +    </a>
                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +  <img src="../../../../assets/canvas-stand.png" alt="" class="illustration" />
                                                                                                                                                                                                                                                                                                              +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              + ./coming-soon.component.scss +

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              @use "variables/sizes";
                                                                                                                                                                                                                                                                                                              +@use "mixins/grid-layout";
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +.illustration {
                                                                                                                                                                                                                                                                                                              +  width: 70%;
                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +.feedback-section {
                                                                                                                                                                                                                                                                                                              +  width: 70%;
                                                                                                                                                                                                                                                                                                              +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                                                                              +    $min-block-width: 250px,
                                                                                                                                                                                                                                                                                                              +    $max-screen-width: 414px
                                                                                                                                                                                                                                                                                                              +  );
                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +mat-dialog-content {
                                                                                                                                                                                                                                                                                                              +  display: flex;
                                                                                                                                                                                                                                                                                                              +  flex-direction: column;
                                                                                                                                                                                                                                                                                                              +  align-items: center;
                                                                                                                                                                                                                                                                                                              +  max-width: sizes.$max-text-width;
                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/CompareRevComponent.html b/documentation/components/CompareRevComponent.html new file mode 100644 index 0000000000..51e439e579 --- /dev/null +++ b/documentation/components/CompareRevComponent.html @@ -0,0 +1,1321 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                + src/app/features/conflict-resolution/compare-rev/compare-rev.component.ts +

                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Visualize one specific conflicting document revision and offer resolution options.

                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                +constructor(db: Database, confirmationDialog: ConfirmationDialogService, snackBar: MatSnackBar, conflictResolver: AutoResolutionService) +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                db + Database + + No +
                                                                                                                                                                                                                                                                                                                confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                snackBar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                conflictResolver + AutoResolutionService + + No +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + doc +
                                                                                                                                                                                                                                                                                                                + Type : any + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                document from the database in the current version

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + rev +
                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                revision key (_rev) of the confliction version to be displayed

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + Public + Async + loadRev + + +
                                                                                                                                                                                                                                                                                                                + + loadRev() +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Load the document version (revision) to be displayed and generate the diffs to be visualized.

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + Public + Async + resolveByDelete + + +
                                                                                                                                                                                                                                                                                                                + + resolveByDelete(docToDelete: any) +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Resolve the displayed conflict by deleting the conflicting revision doc and keeping the current doc.

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                docToDelete + any + + No + +

                                                                                                                                                                                                                                                                                                                Document to be deleted

                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + Public + Async + resolveByManualEdit + + +
                                                                                                                                                                                                                                                                                                                + + resolveByManualEdit(diffStringToApply: string) +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Apply the given diff, save the resulting new document to the database +and remove the conflicting document, thereby resolving the conflict.

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                This method is also used to resolve the conflict to keep the conflicting version instead of the current doc. +Then this simply applies the diff of the existing conflicting version instead of a user-edited diff.

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                diffStringToApply + string + + No + +

                                                                                                                                                                                                                                                                                                                The (user-edited) diff to be applied to the current doc

                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + stringify + + +
                                                                                                                                                                                                                                                                                                                +stringify(entity: any) +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                Generate a human-readable string of the given object.

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                entity + any + + No + +

                                                                                                                                                                                                                                                                                                                Object to be stringified

                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + diffs + + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                changes the conflicting doc has compared to the current doc

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + diffsCustom + + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                the user edited diff that can be applied as an alternative resolution (initialized with same value as diffs)

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + diffsReverse + + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                changes the current doc has compared to the conflicting doc.

                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                This mirrors diffs but shows the things that would be added if the current doc would +overwrite the conflicting version instead of the other way round.

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + docString + + +
                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                used in the template for a tooltip displaying the full document

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + resolution + + +
                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                + Default value : null +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                whether/how this conflict has been resolved

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                + + + revDoc + + +
                                                                                                                                                                                                                                                                                                                + Type : any + +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                document from the database in the conflicting version

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                +import { diff } from "deep-object-diff";
                                                                                                                                                                                                                                                                                                                +import { ConfirmationDialogService } from "../../../core/common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                +import { Database } from "../../../core/database/database";
                                                                                                                                                                                                                                                                                                                +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                +import { AutoResolutionService } from "../auto-resolution/auto-resolution.service";
                                                                                                                                                                                                                                                                                                                +import { merge } from "lodash-es";
                                                                                                                                                                                                                                                                                                                +import { MatExpansionModule } from "@angular/material/expansion";
                                                                                                                                                                                                                                                                                                                +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                + * Visualize one specific conflicting document revision and offer resolution options.
                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                +  selector: "app-compare-rev",
                                                                                                                                                                                                                                                                                                                +  templateUrl: "./compare-rev.component.html",
                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./compare-rev.component.scss"],
                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                +    MatExpansionModule,
                                                                                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                                                                                +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                +    MatInputModule,
                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                +    FormsModule,
                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                +export class CompareRevComponent {
                                                                                                                                                                                                                                                                                                                +  /** revision key (_rev) of the confliction version to be displayed */
                                                                                                                                                                                                                                                                                                                +  @Input() rev: string;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /** document from the database in the current version */
                                                                                                                                                                                                                                                                                                                +  @Input() doc: any;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /** used in the template for a tooltip displaying the full document */
                                                                                                                                                                                                                                                                                                                +  docString: string;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /** document from the database in the conflicting version */
                                                                                                                                                                                                                                                                                                                +  revDoc: any;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /** changes the conflicting doc has compared to the current doc */
                                                                                                                                                                                                                                                                                                                +  diffs;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /** changes the current doc has compared to the conflicting doc.
                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                +   * This mirrors `diffs` but shows the things that would be added if the current doc would
                                                                                                                                                                                                                                                                                                                +   * overwrite the conflicting version instead of the other way round.
                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                +  diffsReverse;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /** the user edited diff that can be applied as an alternative resolution (initialized with same value as `diffs`) */
                                                                                                                                                                                                                                                                                                                +  diffsCustom;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /** whether/how this conflict has been resolved */
                                                                                                                                                                                                                                                                                                                +  resolution: string = null;
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                +    private db: Database,
                                                                                                                                                                                                                                                                                                                +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                +    private snackBar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                +    private conflictResolver: AutoResolutionService,
                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                +   * Load the document version (revision) to be displayed and generate the diffs to be visualized.
                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                +  public async loadRev() {
                                                                                                                                                                                                                                                                                                                +    this.revDoc = await this.db.get(this.doc._id, { rev: this.rev });
                                                                                                                                                                                                                                                                                                                +    const diffObject = diff(this.doc, this.revDoc);
                                                                                                                                                                                                                                                                                                                +    this.diffs = this.stringify(diffObject);
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +    const diffReverseObject = diff(this.revDoc, this.doc);
                                                                                                                                                                                                                                                                                                                +    this.diffsReverse = this.stringify(diffReverseObject);
                                                                                                                                                                                                                                                                                                                +    this.diffsCustom = this.stringify(diffReverseObject);
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +    const isIrrelevantConflictingDoc =
                                                                                                                                                                                                                                                                                                                +      this.conflictResolver.shouldDeleteConflictingRevision(
                                                                                                                                                                                                                                                                                                                +        this.doc,
                                                                                                                                                                                                                                                                                                                +        this.revDoc,
                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                +    if (isIrrelevantConflictingDoc) {
                                                                                                                                                                                                                                                                                                                +      const success = await this.deleteDoc(this.revDoc);
                                                                                                                                                                                                                                                                                                                +      if (success) {
                                                                                                                                                                                                                                                                                                                +        this.resolution = $localize`automatically deleted trivial conflict`;
                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                +   * Generate a human-readable string of the given object.
                                                                                                                                                                                                                                                                                                                +   * @param entity Object to be stringified
                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                +  stringify(entity: any) {
                                                                                                                                                                                                                                                                                                                +    return JSON.stringify(
                                                                                                                                                                                                                                                                                                                +      entity,
                                                                                                                                                                                                                                                                                                                +      (k, v) => (k === "_rev" ? undefined : v), // ignore "_rev"
                                                                                                                                                                                                                                                                                                                +      2,
                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                +   * Resolve the displayed conflict by deleting the conflicting revision doc and keeping the current doc.
                                                                                                                                                                                                                                                                                                                +   * @param docToDelete Document to be deleted
                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                +  public async resolveByDelete(docToDelete: any) {
                                                                                                                                                                                                                                                                                                                +    const confirmed = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                +      $localize`Delete Conflicting Version?`,
                                                                                                                                                                                                                                                                                                                +      $localize`Are you sure you want to keep the current version and delete this conflicting version? ${this.stringify(
                                                                                                                                                                                                                                                                                                                +        docToDelete,
                                                                                                                                                                                                                                                                                                                +      )}`,
                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +    if (confirmed) {
                                                                                                                                                                                                                                                                                                                +      const success = await this.deleteDoc(docToDelete);
                                                                                                                                                                                                                                                                                                                +      if (success) {
                                                                                                                                                                                                                                                                                                                +        this.resolution = $localize`deleted conflicting version`;
                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  private async deleteDoc(docToDelete: any): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                +    try {
                                                                                                                                                                                                                                                                                                                +      await this.db.remove(docToDelete);
                                                                                                                                                                                                                                                                                                                +      return true;
                                                                                                                                                                                                                                                                                                                +    } catch (e) {
                                                                                                                                                                                                                                                                                                                +      const errorMessage = e.message || e.toString();
                                                                                                                                                                                                                                                                                                                +      this.snackBar.open(
                                                                                                                                                                                                                                                                                                                +        $localize`Error trying to delete conflicting version: ${errorMessage}`,
                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                +      return false;
                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  private async saveDoc(docToSave: any): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                +    try {
                                                                                                                                                                                                                                                                                                                +      await this.db.put(docToSave);
                                                                                                                                                                                                                                                                                                                +      return true;
                                                                                                                                                                                                                                                                                                                +    } catch (e) {
                                                                                                                                                                                                                                                                                                                +      const errorMessage = e.message || e.toString();
                                                                                                                                                                                                                                                                                                                +      this.snackBar.open(
                                                                                                                                                                                                                                                                                                                +        $localize`Error trying to save version: ${errorMessage}`,
                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                +      return false;
                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                +   * Apply the given diff, save the resulting new document to the database
                                                                                                                                                                                                                                                                                                                +   * and remove the conflicting document, thereby resolving the conflict.
                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                +   * This method is also used to resolve the conflict to keep the conflicting version instead of the current doc.
                                                                                                                                                                                                                                                                                                                +   * Then this simply applies the diff of the existing conflicting version instead of a user-edited diff.
                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                +   * @param diffStringToApply The (user-edited) diff to be applied to the current doc
                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                +  public async resolveByManualEdit(diffStringToApply: string) {
                                                                                                                                                                                                                                                                                                                +    const originalDoc = merge({}, this.doc);
                                                                                                                                                                                                                                                                                                                +    const diffToApply = JSON.parse(diffStringToApply);
                                                                                                                                                                                                                                                                                                                +    merge(this.doc, diffToApply);
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +    const newChanges = diff(originalDoc, this.doc);
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +    const confirmed = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                +      $localize`Save Changes for Conflict Resolution?`,
                                                                                                                                                                                                                                                                                                                +      $localize`Are you sure you want to save the following changes and delete the conflicting version? ${this.stringify(
                                                                                                                                                                                                                                                                                                                +        newChanges,
                                                                                                                                                                                                                                                                                                                +      )}`,
                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                +    if (confirmed) {
                                                                                                                                                                                                                                                                                                                +      const successSave = await this.saveDoc(this.doc);
                                                                                                                                                                                                                                                                                                                +      const successDel = await this.deleteDoc(this.revDoc);
                                                                                                                                                                                                                                                                                                                +      if (successSave && successDel) {
                                                                                                                                                                                                                                                                                                                +        if (diffStringToApply === this.diffs) {
                                                                                                                                                                                                                                                                                                                +          this.resolution = $localize`selected conflicting version`;
                                                                                                                                                                                                                                                                                                                +        } else {
                                                                                                                                                                                                                                                                                                                +          this.resolution = $localize`resolved manually`;
                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                <mat-expansion-panel (opened)="loadRev()" *ngIf="!resolution">
                                                                                                                                                                                                                                                                                                                +  <mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                +    <mat-panel-title>
                                                                                                                                                                                                                                                                                                                +      <span [matTooltip]="docString" (mouseover)="docString = stringify(doc)">{{
                                                                                                                                                                                                                                                                                                                +        rev
                                                                                                                                                                                                                                                                                                                +      }}</span>
                                                                                                                                                                                                                                                                                                                +    </mat-panel-title>
                                                                                                                                                                                                                                                                                                                +  </mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +  <div class="flex-row gap-small">
                                                                                                                                                                                                                                                                                                                +    <div>
                                                                                                                                                                                                                                                                                                                +      <label
                                                                                                                                                                                                                                                                                                                +        for="conflictingDiff"
                                                                                                                                                                                                                                                                                                                +        i18n="Signals that there are conflicting database-entities"
                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                +        Conflicting Entity:
                                                                                                                                                                                                                                                                                                                +      </label>
                                                                                                                                                                                                                                                                                                                +      <textarea
                                                                                                                                                                                                                                                                                                                +        id="conflictingDiff"
                                                                                                                                                                                                                                                                                                                +        cdkTextareaAutosize
                                                                                                                                                                                                                                                                                                                +        class="diffText conflicting"
                                                                                                                                                                                                                                                                                                                +        disabled
                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                +        {{ diffs }}
                                                                                                                                                                                                                                                                                                                +      </textarea>
                                                                                                                                                                                                                                                                                                                +      <button
                                                                                                                                                                                                                                                                                                                +        mat-raised-button
                                                                                                                                                                                                                                                                                                                +        class="full-width"
                                                                                                                                                                                                                                                                                                                +        (click)="resolveByManualEdit(diffs)"
                                                                                                                                                                                                                                                                                                                +        i18n
                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                +        Choose conflicting version
                                                                                                                                                                                                                                                                                                                +      </button>
                                                                                                                                                                                                                                                                                                                +    </div>
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +    <div>
                                                                                                                                                                                                                                                                                                                +      <label for="customDiff">Custom Resolution:</label>
                                                                                                                                                                                                                                                                                                                +      <textarea
                                                                                                                                                                                                                                                                                                                +        id="customDiff"
                                                                                                                                                                                                                                                                                                                +        cdkTextareaAutosize
                                                                                                                                                                                                                                                                                                                +        class="diffText custom"
                                                                                                                                                                                                                                                                                                                +        [(ngModel)]="diffsCustom"
                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                +      </textarea>
                                                                                                                                                                                                                                                                                                                +      <button
                                                                                                                                                                                                                                                                                                                +        mat-raised-button
                                                                                                                                                                                                                                                                                                                +        class="full-width"
                                                                                                                                                                                                                                                                                                                +        (click)="resolveByManualEdit(diffsCustom)"
                                                                                                                                                                                                                                                                                                                +        i18n
                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                +        Save manually resolved record
                                                                                                                                                                                                                                                                                                                +      </button>
                                                                                                                                                                                                                                                                                                                +    </div>
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +    <div>
                                                                                                                                                                                                                                                                                                                +      <label for="currentDiff" i18n="A currently selected entity">
                                                                                                                                                                                                                                                                                                                +        Current Entity:
                                                                                                                                                                                                                                                                                                                +      </label>
                                                                                                                                                                                                                                                                                                                +      <textarea
                                                                                                                                                                                                                                                                                                                +        id="currentDiff"
                                                                                                                                                                                                                                                                                                                +        cdkTextareaAutosize
                                                                                                                                                                                                                                                                                                                +        class="diffText current"
                                                                                                                                                                                                                                                                                                                +        disabled
                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                +        {{ diffsReverse }}
                                                                                                                                                                                                                                                                                                                +      </textarea>
                                                                                                                                                                                                                                                                                                                +      <button
                                                                                                                                                                                                                                                                                                                +        mat-raised-button
                                                                                                                                                                                                                                                                                                                +        class="full-width"
                                                                                                                                                                                                                                                                                                                +        (click)="resolveByDelete(revDoc)"
                                                                                                                                                                                                                                                                                                                +        i18n="
                                                                                                                                                                                                                                                                                                                +          Choose a current version between several conflicting versions of
                                                                                                                                                                                                                                                                                                                +          database entries
                                                                                                                                                                                                                                                                                                                +        "
                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                +        Choose current version
                                                                                                                                                                                                                                                                                                                +      </button>
                                                                                                                                                                                                                                                                                                                +    </div>
                                                                                                                                                                                                                                                                                                                +  </div>
                                                                                                                                                                                                                                                                                                                +</mat-expansion-panel>
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +<div *ngIf="resolution">
                                                                                                                                                                                                                                                                                                                +  <em>Resolved ({{ resolution }})</em>
                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                + ./compare-rev.component.scss +

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                .diffText {
                                                                                                                                                                                                                                                                                                                +  width: 100%;
                                                                                                                                                                                                                                                                                                                +  background: white;
                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +.conflicting {
                                                                                                                                                                                                                                                                                                                +  background: rgba(255, 0, 0, 0.1);
                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                +.current {
                                                                                                                                                                                                                                                                                                                +  background: rgba(0, 128, 0, 0.1);
                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                +.custom {
                                                                                                                                                                                                                                                                                                                +  background: rgba(0, 0, 255, 0.1);
                                                                                                                                                                                                                                                                                                                +  font-weight: bold;
                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ConfigImportComponent.html b/documentation/components/ConfigImportComponent.html new file mode 100644 index 0000000000..e4fa873f39 --- /dev/null +++ b/documentation/components/ConfigImportComponent.html @@ -0,0 +1,774 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  + src/app/features/config-setup/config-import/config-import.component.ts +

                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  UI to upload a config definition and generate a new app Config from the imported file.

                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  +constructor(configImportParser: ConfigImportParserService) +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                  configImportParser + ConfigImportParserService + + No +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  + + + generateConfig + + +
                                                                                                                                                                                                                                                                                                                  +generateConfig(includingDefaultConfigs: boolean) +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                  includingDefaultConfigs + boolean + + No +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  + + + loadData + + +
                                                                                                                                                                                                                                                                                                                  +loadData(loadedConfigFile: ParsedData) +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                  loadedConfigFile + ParsedData + + No +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  + + + entityName + + +
                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                  + Default value : "Child" +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  + + + generatedConfig + + +
                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                  + Default value : "" +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  + + + loadedConfigFile + + +
                                                                                                                                                                                                                                                                                                                  + Type : any + +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                  +  InputFileComponent,
                                                                                                                                                                                                                                                                                                                  +  ParsedData,
                                                                                                                                                                                                                                                                                                                  +} from "../../../core/common-components/input-file/input-file.component";
                                                                                                                                                                                                                                                                                                                  +import { ConfigImportParserService } from "../config-import-parser.service";
                                                                                                                                                                                                                                                                                                                  +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                  +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                  +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                  +import { ClipboardModule } from "@angular/cdk/clipboard";
                                                                                                                                                                                                                                                                                                                  +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                  + * UI to upload a config definition and generate a new app `Config` from the imported file.
                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                  +@RouteTarget("ConfigImport")
                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                  +  selector: "app-config-import",
                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./config-import.component.html",
                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./config-import.component.scss"],
                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                  +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                  +    FormsModule,
                                                                                                                                                                                                                                                                                                                  +    MatInputModule,
                                                                                                                                                                                                                                                                                                                  +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                  +    ClipboardModule,
                                                                                                                                                                                                                                                                                                                  +    InputFileComponent,
                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                  +export class ConfigImportComponent {
                                                                                                                                                                                                                                                                                                                  +  loadedConfigFile: any;
                                                                                                                                                                                                                                                                                                                  +  entityName: string = "Child";
                                                                                                                                                                                                                                                                                                                  +  generatedConfig: string = "";
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +  constructor(private configImportParser: ConfigImportParserService) {}
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +  loadData(loadedConfigFile: ParsedData) {
                                                                                                                                                                                                                                                                                                                  +    // TODO: handle csv parse errors
                                                                                                                                                                                                                                                                                                                  +    // TODO: validate the data has the expected structure
                                                                                                                                                                                                                                                                                                                  +    this.loadedConfigFile = loadedConfigFile.data;
                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +  generateConfig(includingDefaultConfigs: boolean) {
                                                                                                                                                                                                                                                                                                                  +    this.generatedConfig = JSON.stringify(
                                                                                                                                                                                                                                                                                                                  +      this.configImportParser.parseImportDefinition(
                                                                                                                                                                                                                                                                                                                  +        this.loadedConfigFile,
                                                                                                                                                                                                                                                                                                                  +        this.entityName,
                                                                                                                                                                                                                                                                                                                  +        includingDefaultConfigs,
                                                                                                                                                                                                                                                                                                                  +      ),
                                                                                                                                                                                                                                                                                                                  +      null,
                                                                                                                                                                                                                                                                                                                  +      2,
                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  <!-- todo: flex to display below each other with proper margins -->
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +<app-input-file (fileLoad)="loadData($event)" fileType="csv"></app-input-file>
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +<br />
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +<div class="flex-row gap-small">
                                                                                                                                                                                                                                                                                                                  +  <mat-form-field>
                                                                                                                                                                                                                                                                                                                  +    <mat-label>Entity Type</mat-label>
                                                                                                                                                                                                                                                                                                                  +    <input matInput [(ngModel)]="entityName" title="entity type" type="text" />
                                                                                                                                                                                                                                                                                                                  +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                  +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                  +    (click)="generateConfig(true)"
                                                                                                                                                                                                                                                                                                                  +    [disabled]="!loadedConfigFile"
                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                  +    Generate Config
                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                  +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                  +    (click)="generateConfig(false)"
                                                                                                                                                                                                                                                                                                                  +    [disabled]="!loadedConfigFile"
                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                  +    Generate (without default configs)
                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +<br />
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +<textarea
                                                                                                                                                                                                                                                                                                                  +  [value]="generatedConfig"
                                                                                                                                                                                                                                                                                                                  +  rows="10"
                                                                                                                                                                                                                                                                                                                  +  class="config-textarea"
                                                                                                                                                                                                                                                                                                                  +></textarea>
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +<br />
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +<button mat-stroked-button [cdkCopyToClipboard]="generatedConfig">
                                                                                                                                                                                                                                                                                                                  +  Copy Config to Clipboard
                                                                                                                                                                                                                                                                                                                  +</button>
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  + ./config-import.component.scss +

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  .config-textarea {
                                                                                                                                                                                                                                                                                                                  +  width: 100%;
                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ConfigureEntityFieldValidatorComponent.html b/documentation/components/ConfigureEntityFieldValidatorComponent.html new file mode 100644 index 0000000000..598f9ccca4 --- /dev/null +++ b/documentation/components/ConfigureEntityFieldValidatorComponent.html @@ -0,0 +1,771 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    + src/app/core/admin/admin-entity-details/admin-entity-field/configure-entity-field-validator/configure-entity-field-validator.component.ts +

                                                                                                                                                                                                                                                                                                                    + + + + +

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Outputs
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    +constructor(fb: FormBuilder) +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                    fb + FormBuilder + + No +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    + + entitySchemaField +
                                                                                                                                                                                                                                                                                                                    + Type : EntitySchemaField + +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    the field definition with the currently existing validator settings to be edited

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Outputs

                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    + + entityValidatorChanges +
                                                                                                                                                                                                                                                                                                                    + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Emit the latest state of the validators config whenever the user changed it in the displayed form.

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    + + + removeDefaultValuesFromValidatorConfig + + +
                                                                                                                                                                                                                                                                                                                    +removeDefaultValuesFromValidatorConfig(validators: FormValidatorConfig) +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    Removes default fields and returns a validator config that only contains explicitly activated validators.

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                    validators + FormValidatorConfig + + No + +

                                                                                                                                                                                                                                                                                                                    form values including default values that are unchanged

                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + Returns : FormValidatorConfig + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    + + + validatorForm + + +
                                                                                                                                                                                                                                                                                                                    + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                    +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                    +  FormBuilder,
                                                                                                                                                                                                                                                                                                                    +  FormGroup,
                                                                                                                                                                                                                                                                                                                    +  FormsModule,
                                                                                                                                                                                                                                                                                                                    +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                    +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                    +import { MatCheckboxModule } from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                                    +import { EntitySchemaField } from "app/core/entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                    +import { FormValidatorConfig } from "app/core/common-components/entity-form/dynamic-form-validators/form-validator-config";
                                                                                                                                                                                                                                                                                                                    +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                    +import { HelpButtonComponent } from "../../../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                    +  selector: "app-configure-entity-field-validator",
                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                    +    MatInputModule,
                                                                                                                                                                                                                                                                                                                    +    FormsModule,
                                                                                                                                                                                                                                                                                                                    +    MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                    +    CommonModule,
                                                                                                                                                                                                                                                                                                                    +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                    +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./configure-entity-field-validator.component.html",
                                                                                                                                                                                                                                                                                                                    +  styleUrl: "./configure-entity-field-validator.component.scss",
                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                    +export class ConfigureEntityFieldValidatorComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                    +  validatorForm: FormGroup;
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                    +   * the field definition with the currently existing validator settings to be edited
                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                    +  @Input() entitySchemaField: EntitySchemaField;
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                    +   * Emit the latest state of the validators config whenever the user changed it in the displayed form.
                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                    +  @Output() entityValidatorChanges = new EventEmitter<FormValidatorConfig>();
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  constructor(private fb: FormBuilder) {}
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                    +    this.init();
                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  private init() {
                                                                                                                                                                                                                                                                                                                    +    if (this.entitySchemaField.validators) {
                                                                                                                                                                                                                                                                                                                    +      this.validatorForm = this.fb.group({
                                                                                                                                                                                                                                                                                                                    +        required: [this.entitySchemaField.validators.required],
                                                                                                                                                                                                                                                                                                                    +        min: [this.entitySchemaField.validators.min],
                                                                                                                                                                                                                                                                                                                    +        max: [this.entitySchemaField.validators.max],
                                                                                                                                                                                                                                                                                                                    +        regex: [this.entitySchemaField.validators.pattern],
                                                                                                                                                                                                                                                                                                                    +        validEmail: [this.entitySchemaField.validators.validEmail],
                                                                                                                                                                                                                                                                                                                    +        uniqueId: [this.entitySchemaField.validators.uniqueId],
                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                    +      this.validatorForm = this.fb.group({
                                                                                                                                                                                                                                                                                                                    +        required: [false],
                                                                                                                                                                                                                                                                                                                    +        min: [null],
                                                                                                                                                                                                                                                                                                                    +        max: [null],
                                                                                                                                                                                                                                                                                                                    +        regex: [""],
                                                                                                                                                                                                                                                                                                                    +        validEmail: [false],
                                                                                                                                                                                                                                                                                                                    +        uniqueId: [""],
                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +    this.validatorForm.valueChanges.subscribe((value) => {
                                                                                                                                                                                                                                                                                                                    +      const rawValues = this.validatorForm.getRawValue();
                                                                                                                                                                                                                                                                                                                    +      const cleanedValues =
                                                                                                                                                                                                                                                                                                                    +        this.removeDefaultValuesFromValidatorConfig(rawValues);
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +      this.entityValidatorChanges.emit(cleanedValues);
                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                    +   * Removes default fields and returns a validator config that only contains explicitly activated validators.
                                                                                                                                                                                                                                                                                                                    +   * @param validators form values including default values that are unchanged
                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                    +  removeDefaultValuesFromValidatorConfig(
                                                                                                                                                                                                                                                                                                                    +    validators: FormValidatorConfig,
                                                                                                                                                                                                                                                                                                                    +  ): FormValidatorConfig {
                                                                                                                                                                                                                                                                                                                    +    for (let key of Object.keys(validators)) {
                                                                                                                                                                                                                                                                                                                    +      if (isDefaultValue(validators[key])) {
                                                                                                                                                                                                                                                                                                                    +        delete validators[key];
                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +    function isDefaultValue(value): boolean {
                                                                                                                                                                                                                                                                                                                    +      return value === false || value === "" || value === null;
                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +    return validators;
                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    <form class="validator-form-cell flex-column" [formGroup]="validatorForm">
                                                                                                                                                                                                                                                                                                                    +  <ng-container *ngIf="entitySchemaField.dataType === 'number'">
                                                                                                                                                                                                                                                                                                                    +    <mat-form-field class="number-field">
                                                                                                                                                                                                                                                                                                                    +      <mat-label i18n>Minimum Value</mat-label>
                                                                                                                                                                                                                                                                                                                    +      <input formControlName="min" matInput type="number" />
                                                                                                                                                                                                                                                                                                                    +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +    <mat-form-field class="number-field">
                                                                                                                                                                                                                                                                                                                    +      <mat-label i18n>Maximum Value</mat-label>
                                                                                                                                                                                                                                                                                                                    +      <input formControlName="max" matInput type="number" />
                                                                                                                                                                                                                                                                                                                    +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                    +  </ng-container>
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  <!-- TODO: requires transformation of value to { pattern: string, message: string } before saving
                                                                                                                                                                                                                                                                                                                    +    <mat-form-field *ngIf="entitySchemaField.dataType === 'string'">
                                                                                                                                                                                                                                                                                                                    +      <mat-label i18n>Pattern (Regex)</mat-label>
                                                                                                                                                                                                                                                                                                                    +      <input formControlName="regex" matInput />
                                                                                                                                                                                                                                                                                                                    +      <app-help-button
                                                                                                                                                                                                                                                                                                                    +        matSuffix
                                                                                                                                                                                                                                                                                                                    +        text="Define a format (-> regular expression) that text values have to match to be valid."
                                                                                                                                                                                                                                                                                                                    +        i18n-text
                                                                                                                                                                                                                                                                                                                    +      ></app-help-button>
                                                                                                                                                                                                                                                                                                                    +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                    +    -->
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  <div>
                                                                                                                                                                                                                                                                                                                    +    <mat-checkbox i18n formControlName="required">
                                                                                                                                                                                                                                                                                                                    +      Required Field
                                                                                                                                                                                                                                                                                                                    +    </mat-checkbox>
                                                                                                                                                                                                                                                                                                                    +    <app-help-button
                                                                                                                                                                                                                                                                                                                    +      text="Users always must provide a value in this field"
                                                                                                                                                                                                                                                                                                                    +      i18n-text
                                                                                                                                                                                                                                                                                                                    +    ></app-help-button>
                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  <div>
                                                                                                                                                                                                                                                                                                                    +    <mat-checkbox i18n formControlName="uniqueId">
                                                                                                                                                                                                                                                                                                                    +      Unique ID [experimental]</mat-checkbox
                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                    +    <app-help-button
                                                                                                                                                                                                                                                                                                                    +      text="Ensures the value is not used as an ID for another existing record already. (Experimental Feature: Does not support advanced edge cases)"
                                                                                                                                                                                                                                                                                                                    +      i18n-text
                                                                                                                                                                                                                                                                                                                    +    ></app-help-button>
                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +  <div *ngIf="entitySchemaField.dataType === 'string'">
                                                                                                                                                                                                                                                                                                                    +    <mat-checkbox i18n formControlName="validEmail">
                                                                                                                                                                                                                                                                                                                    +      Valid Email Format
                                                                                                                                                                                                                                                                                                                    +    </mat-checkbox>
                                                                                                                                                                                                                                                                                                                    +    <app-help-button
                                                                                                                                                                                                                                                                                                                    +      text="Users must enter a text that can be used as an email."
                                                                                                                                                                                                                                                                                                                    +      i18n-text
                                                                                                                                                                                                                                                                                                                    +    ></app-help-button>
                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                    +</form>
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ConfigureEnumPopupComponent.html b/documentation/components/ConfigureEnumPopupComponent.html new file mode 100644 index 0000000000..6dc291227a --- /dev/null +++ b/documentation/components/ConfigureEnumPopupComponent.html @@ -0,0 +1,947 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/configurable-enum/configure-enum-popup/configure-enum-popup.component.ts +

                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      +constructor(enumEntity: ConfigurableEnum, dialog: MatDialogRef<ConfigureEnumPopupComponent>, entityMapper: EntityMapperService, confirmationService: ConfirmationDialogService, entities: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                      enumEntity + ConfigurableEnum + + No +
                                                                                                                                                                                                                                                                                                                      dialog + MatDialogRef<ConfigureEnumPopupComponent> + + No +
                                                                                                                                                                                                                                                                                                                      entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                      confirmationService + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                      entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + + + Async + createNewOption + + +
                                                                                                                                                                                                                                                                                                                      + + createNewOption() +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + + + Async + delete + + +
                                                                                                                                                                                                                                                                                                                      + + delete(value: ConfigurableEnumValue, index: number) +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                      value + ConfigurableEnumValue + + No +
                                                                                                                                                                                                                                                                                                                      index + number + + No +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + + + drop + + +
                                                                                                                                                                                                                                                                                                                      +drop(event: CdkDragDrop) +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                      event + CdkDragDrop<string[]> + + No +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + + + + Public + enumEntity + + +
                                                                                                                                                                                                                                                                                                                      + Type : ConfigurableEnum + +
                                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                                      + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      + + + newOptionInput + + +
                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                      +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                      +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                      +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                      +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnum } from "../configurable-enum";
                                                                                                                                                                                                                                                                                                                      +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                      +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                      +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                      +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                      +import { DialogCloseComponent } from "../../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                      +import { EntityMapperService } from "../../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                      +  CdkDrag,
                                                                                                                                                                                                                                                                                                                      +  CdkDragDrop,
                                                                                                                                                                                                                                                                                                                      +  CdkDropList,
                                                                                                                                                                                                                                                                                                                      +  moveItemInArray,
                                                                                                                                                                                                                                                                                                                      +} from "@angular/cdk/drag-drop";
                                                                                                                                                                                                                                                                                                                      +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumValue } from "../configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                      +import { ConfirmationDialogService } from "../../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                      +import { EntityRegistry } from "../../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                      +import { OkButton } from "../../../common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component";
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                      +  selector: "app-configure-enum-popup",
                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./configure-enum-popup.component.html",
                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./configure-enum-popup.component.scss"],
                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                      +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                      +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                      +    MatInputModule,
                                                                                                                                                                                                                                                                                                                      +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                      +    FormsModule,
                                                                                                                                                                                                                                                                                                                      +    CdkDropList,
                                                                                                                                                                                                                                                                                                                      +    CdkDrag,
                                                                                                                                                                                                                                                                                                                      +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                      +export class ConfigureEnumPopupComponent {
                                                                                                                                                                                                                                                                                                                      +  newOptionInput: string;
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                      +    @Inject(MAT_DIALOG_DATA) public enumEntity: ConfigurableEnum,
                                                                                                                                                                                                                                                                                                                      +    private dialog: MatDialogRef<ConfigureEnumPopupComponent>,
                                                                                                                                                                                                                                                                                                                      +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                      +    private confirmationService: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                      +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                      +    const initialValues = JSON.stringify(enumEntity.values);
                                                                                                                                                                                                                                                                                                                      +    this.dialog.afterClosed().subscribe(() => {
                                                                                                                                                                                                                                                                                                                      +      if (JSON.stringify(this.enumEntity.values) !== initialValues) {
                                                                                                                                                                                                                                                                                                                      +        this.entityMapper.save(this.enumEntity);
                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +  drop(event: CdkDragDrop<string[]>) {
                                                                                                                                                                                                                                                                                                                      +    moveItemInArray(
                                                                                                                                                                                                                                                                                                                      +      this.enumEntity.values,
                                                                                                                                                                                                                                                                                                                      +      event.previousIndex,
                                                                                                                                                                                                                                                                                                                      +      event.currentIndex,
                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +  async delete(value: ConfigurableEnumValue, index: number) {
                                                                                                                                                                                                                                                                                                                      +    const existingUsages = await this.getUsages(value);
                                                                                                                                                                                                                                                                                                                      +    let deletionText = $localize`Are you sure that you want to delete the option "${value.label}"?`;
                                                                                                                                                                                                                                                                                                                      +    if (existingUsages.length > 0) {
                                                                                                                                                                                                                                                                                                                      +      deletionText += $localize` The option is still used in ${existingUsages.join(
                                                                                                                                                                                                                                                                                                                      +        ", ",
                                                                                                                                                                                                                                                                                                                      +      )} records. If deleted, the records will not be lost but specially marked.`;
                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                      +    const confirmed = await this.confirmationService.getConfirmation(
                                                                                                                                                                                                                                                                                                                      +      $localize`Delete option`,
                                                                                                                                                                                                                                                                                                                      +      deletionText,
                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                      +    if (confirmed) {
                                                                                                                                                                                                                                                                                                                      +      this.enumEntity.values.splice(index, 1);
                                                                                                                                                                                                                                                                                                                      +      await this.entityMapper.save(this.enumEntity);
                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +  private async getUsages(value: ConfigurableEnumValue) {
                                                                                                                                                                                                                                                                                                                      +    const enumMap: { [key in string]: string[] } = {};
                                                                                                                                                                                                                                                                                                                      +    for (const entity of this.entities.values()) {
                                                                                                                                                                                                                                                                                                                      +      const schemaFields = [...entity.schema.entries()]
                                                                                                                                                                                                                                                                                                                      +        .filter(
                                                                                                                                                                                                                                                                                                                      +          ([_, schema]) => schema.additional === this.enumEntity.getId(true),
                                                                                                                                                                                                                                                                                                                      +        )
                                                                                                                                                                                                                                                                                                                      +        .map(([name]) => name);
                                                                                                                                                                                                                                                                                                                      +      if (schemaFields.length > 0) {
                                                                                                                                                                                                                                                                                                                      +        enumMap[entity.ENTITY_TYPE] = schemaFields;
                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                      +    const entityPromises = Object.entries(enumMap).map(([entityType, props]) =>
                                                                                                                                                                                                                                                                                                                      +      this.entityMapper
                                                                                                                                                                                                                                                                                                                      +        .loadType(entityType)
                                                                                                                                                                                                                                                                                                                      +        .then((entities) => this.getEntitiesWithValue(entities, props, value)),
                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                      +    const possibleEntities = await Promise.all(entityPromises);
                                                                                                                                                                                                                                                                                                                      +    return possibleEntities
                                                                                                                                                                                                                                                                                                                      +      .filter((entities) => entities.length > 0)
                                                                                                                                                                                                                                                                                                                      +      .map(
                                                                                                                                                                                                                                                                                                                      +        (entities) =>
                                                                                                                                                                                                                                                                                                                      +          `${entities.length} ${entities[0].getConstructor().label}`,
                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +  private getEntitiesWithValue(
                                                                                                                                                                                                                                                                                                                      +    res: Entity[],
                                                                                                                                                                                                                                                                                                                      +    props: string[],
                                                                                                                                                                                                                                                                                                                      +    value: ConfigurableEnumValue,
                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                      +    return res.filter((entity) =>
                                                                                                                                                                                                                                                                                                                      +      props.some(
                                                                                                                                                                                                                                                                                                                      +        (prop) =>
                                                                                                                                                                                                                                                                                                                      +          entity[prop]?.id === value?.id ||
                                                                                                                                                                                                                                                                                                                      +          entity[prop]?.map?.((v) => v.id).includes(value.id),
                                                                                                                                                                                                                                                                                                                      +      ),
                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +  async createNewOption() {
                                                                                                                                                                                                                                                                                                                      +    try {
                                                                                                                                                                                                                                                                                                                      +      this.enumEntity.addOption(this.newOptionInput);
                                                                                                                                                                                                                                                                                                                      +    } catch (error) {
                                                                                                                                                                                                                                                                                                                      +      await this.confirmationService.getConfirmation(
                                                                                                                                                                                                                                                                                                                      +        $localize`Failed to create new option`,
                                                                                                                                                                                                                                                                                                                      +        $localize`Couldn't create this new option. Please check if the value already exists.`,
                                                                                                                                                                                                                                                                                                                      +        OkButton,
                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +    this.newOptionInput = "";
                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      <h1 matDialogTitle i18n="title of dropdown options popup dialog">
                                                                                                                                                                                                                                                                                                                      +  Edit dropdown options
                                                                                                                                                                                                                                                                                                                      +</h1>
                                                                                                                                                                                                                                                                                                                      +<app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +<mat-dialog-content
                                                                                                                                                                                                                                                                                                                      +  style="max-width: 400px; padding-top: 5px"
                                                                                                                                                                                                                                                                                                                      +  cdkDropList
                                                                                                                                                                                                                                                                                                                      +  (cdkDropListDropped)="drop($event)"
                                                                                                                                                                                                                                                                                                                      +>
                                                                                                                                                                                                                                                                                                                      +  <mat-form-field
                                                                                                                                                                                                                                                                                                                      +    *ngFor="let v of enumEntity.values; let i = index"
                                                                                                                                                                                                                                                                                                                      +    cdkDrag
                                                                                                                                                                                                                                                                                                                      +    class="full-width"
                                                                                                                                                                                                                                                                                                                      +    appearance="fill"
                                                                                                                                                                                                                                                                                                                      +  >
                                                                                                                                                                                                                                                                                                                      +    <fa-icon
                                                                                                                                                                                                                                                                                                                      +      icon="grip-vertical"
                                                                                                                                                                                                                                                                                                                      +      matIconPrefix
                                                                                                                                                                                                                                                                                                                      +      class="grab-icon margin-right-small"
                                                                                                                                                                                                                                                                                                                      +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +    <input matInput [(ngModel)]="v.label" />
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +    <button mat-icon-button matIconSuffix (click)="delete(v, i)">
                                                                                                                                                                                                                                                                                                                      +      <fa-icon icon="trash"></fa-icon>
                                                                                                                                                                                                                                                                                                                      +    </button>
                                                                                                                                                                                                                                                                                                                      +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +  <!-- CREATING NEW OPTION -->
                                                                                                                                                                                                                                                                                                                      +  <mat-form-field class="full-width">
                                                                                                                                                                                                                                                                                                                      +    <mat-label i18n>Add new option</mat-label>
                                                                                                                                                                                                                                                                                                                      +    <input matInput [(ngModel)]="newOptionInput" />
                                                                                                                                                                                                                                                                                                                      +    <button
                                                                                                                                                                                                                                                                                                                      +      mat-icon-button
                                                                                                                                                                                                                                                                                                                      +      color="accent"
                                                                                                                                                                                                                                                                                                                      +      matIconSuffix
                                                                                                                                                                                                                                                                                                                      +      (click)="createNewOption()"
                                                                                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                                                                                      +      <fa-icon icon="square-plus"></fa-icon>
                                                                                                                                                                                                                                                                                                                      +    </button>
                                                                                                                                                                                                                                                                                                                      +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                      +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                      +  <button mat-raised-button mat-dialog-close i18n="Close popup">Close</button>
                                                                                                                                                                                                                                                                                                                      +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      + ./configure-enum-popup.component.scss +

                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      .grab-icon {
                                                                                                                                                                                                                                                                                                                      +  cursor: grab;
                                                                                                                                                                                                                                                                                                                      +  padding-left: 5px;
                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ConfirmationDialogComponent.html b/documentation/components/ConfirmationDialogComponent.html new file mode 100644 index 0000000000..4aacd7d80f --- /dev/null +++ b/documentation/components/ConfirmationDialogComponent.html @@ -0,0 +1,654 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts +

                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        A configurable confirmation dialog box +used by the ConfirmationDialogService.

                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        +constructor(dialogRef: MatDialogRef<ConfirmationDialogComponent>, data: ConfirmationDialogConfig) +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        This component is used as a template for MatDialog, created with the required dependencies through that service.

                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                        dialogRef + MatDialogRef<ConfirmationDialogComponent> + + No + +

                                                                                                                                                                                                                                                                                                                        The reference to the dialog this component is displayed within

                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        data + ConfirmationDialogConfig + + No + +

                                                                                                                                                                                                                                                                                                                        The configuration defining what text and buttons will be displayed

                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                        + Type : ConfirmationDialogConfig + +
                                                                                                                                                                                                                                                                                                                        + Decorators : +
                                                                                                                                                                                                                                                                                                                        + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        The configuration defining what text and buttons will be displayed
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        + + + Public + dialogRef + + +
                                                                                                                                                                                                                                                                                                                        + Type : MatDialogRef<ConfirmationDialogComponent> + +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        The reference to the dialog this component is displayed within
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                        +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                        +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                        +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                        +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                        +import { DialogCloseComponent } from "../../dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                        +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                        + * A configurable confirmation dialog box
                                                                                                                                                                                                                                                                                                                        + * used by the {@link ConfirmationDialogService}.
                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                        +  selector: "app-confirmation-dialog",
                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./confirmation-dialog.component.html",
                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                        +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                        +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                        +export class ConfirmationDialogComponent {
                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                        +   * This component is used as a template for MatDialog, created with the required dependencies through that service.
                                                                                                                                                                                                                                                                                                                        +   * @param dialogRef The reference to the dialog this component is displayed within
                                                                                                                                                                                                                                                                                                                        +   * @param data The configuration defining what text and buttons will be displayed
                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                        +    public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
                                                                                                                                                                                                                                                                                                                        +    @Inject(MAT_DIALOG_DATA) public data: ConfirmationDialogConfig,
                                                                                                                                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                        + * Options to configure the {@link ConfirmationDialogComponent}.
                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                        +export interface ConfirmationDialogConfig {
                                                                                                                                                                                                                                                                                                                        +  /** title of the dialog box */
                                                                                                                                                                                                                                                                                                                        +  title: string;
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +  /** description text in the dialog box */
                                                                                                                                                                                                                                                                                                                        +  text: string;
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +  /** The buttons that should be displayed */
                                                                                                                                                                                                                                                                                                                        +  buttons: ConfirmationDialogButton[];
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +  /** Whether or not to specify a 'close' icon-button.
                                                                                                                                                                                                                                                                                                                        +   * This button is on the top-right of the dialog and closes it with no result
                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                        +  closeButton?: boolean;
                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +export interface ConfirmationDialogButton {
                                                                                                                                                                                                                                                                                                                        +  text: string;
                                                                                                                                                                                                                                                                                                                        +  dialogResult?: boolean | undefined;
                                                                                                                                                                                                                                                                                                                        +  click();
                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +export const OkButton: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                        +    text: $localize`:Confirmation dialog OK:OK`,
                                                                                                                                                                                                                                                                                                                        +    click() {
                                                                                                                                                                                                                                                                                                                        +      // Intentionally blank
                                                                                                                                                                                                                                                                                                                        +      // To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                        +    dialogResult: true,
                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                        +];
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +export const YesNoButtons: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                        +    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,
                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                        +];
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +export const YesNoCancelButtons: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                        +    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,
                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                        +];
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        <h1 mat-dialog-title>
                                                                                                                                                                                                                                                                                                                        +  {{ data.title }}
                                                                                                                                                                                                                                                                                                                        +  <app-dialog-close
                                                                                                                                                                                                                                                                                                                        +    *ngIf="data.closeButton"
                                                                                                                                                                                                                                                                                                                        +    mat-dialog-close
                                                                                                                                                                                                                                                                                                                        +  ></app-dialog-close>
                                                                                                                                                                                                                                                                                                                        +</h1>
                                                                                                                                                                                                                                                                                                                        +<div mat-dialog-content>
                                                                                                                                                                                                                                                                                                                        +  <p *ngFor="let para of data.text?.split('\n')">{{ para }}</p>
                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +<div mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                        +  <button
                                                                                                                                                                                                                                                                                                                        +    *ngFor="let button of data.buttons"
                                                                                                                                                                                                                                                                                                                        +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                        +    (click)="button.click()"
                                                                                                                                                                                                                                                                                                                        +    [mat-dialog-close]="button.dialogResult"
                                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                                        +    {{ button.text }}
                                                                                                                                                                                                                                                                                                                        +  </button>
                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ConflictResolutionListComponent.html b/documentation/components/ConflictResolutionListComponent.html new file mode 100644 index 0000000000..b17de1289e --- /dev/null +++ b/documentation/components/ConflictResolutionListComponent.html @@ -0,0 +1,665 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          + src/app/features/conflict-resolution/conflict-resolution-list/conflict-resolution-list.component.ts +

                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          List all document conflicts and allow the user to expand for details and manual resolution.

                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          + AfterViewInit +

                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          +constructor(db: Database, entitySchemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                          db + Database + + No +
                                                                                                                                                                                                                                                                                                                          entitySchemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                          + Type : [] + +
                                                                                                                                                                                                                                                                                                                          + Default value : ["id", "data"] +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          visible table columns in the template

                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          + + + dataSource + + +
                                                                                                                                                                                                                                                                                                                          + Type : QueryDataSource<Entity> + +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          data for the table in the template

                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          + + + + paginator + + +
                                                                                                                                                                                                                                                                                                                          + Type : MatPaginator + +
                                                                                                                                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                                                                                                                                          + + @ViewChild(MatPaginator)
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          reference to mat-table paginator from template, required to set up pagination

                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          import { AfterViewInit, Component, Optional, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                                                          +import { MatPaginator, MatPaginatorModule } from "@angular/material/paginator";
                                                                                                                                                                                                                                                                                                                          +import { QueryDataSource } from "../../../core/database/query-data-source";
                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                          +import { Database } from "../../../core/database/database";
                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaService } from "../../../core/entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                          +import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                          +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                          +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                          +import { MatSortModule } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                          +import { CompareRevComponent } from "../compare-rev/compare-rev.component";
                                                                                                                                                                                                                                                                                                                          +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                          + * List all document conflicts and allow the user to expand for details and manual resolution.
                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                          +@RouteTarget("ConflictResolution")
                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                          +  selector: "app-conflict-resolution-list",
                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./conflict-resolution-list.component.html",
                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                          +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                          +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                          +    MatTableModule,
                                                                                                                                                                                                                                                                                                                          +    MatSortModule,
                                                                                                                                                                                                                                                                                                                          +    CompareRevComponent,
                                                                                                                                                                                                                                                                                                                          +    NgForOf,
                                                                                                                                                                                                                                                                                                                          +    MatPaginatorModule,
                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                          +export class ConflictResolutionListComponent implements AfterViewInit {
                                                                                                                                                                                                                                                                                                                          +  /** visible table columns in the template */
                                                                                                                                                                                                                                                                                                                          +  columnsToDisplay = ["id", "data"];
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +  /** data for the table in the template */
                                                                                                                                                                                                                                                                                                                          +  dataSource: QueryDataSource<Entity>;
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +  /** reference to mat-table paginator from template, required to set up pagination */
                                                                                                                                                                                                                                                                                                                          +  @ViewChild(MatPaginator) paginator: MatPaginator;
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                          +    private db: Database,
                                                                                                                                                                                                                                                                                                                          +    @Optional() private entitySchemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                          +  ) {}
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +  async ngAfterViewInit() {
                                                                                                                                                                                                                                                                                                                          +    await this.createDatabaseIndexForConflicts();
                                                                                                                                                                                                                                                                                                                          +    this.dataSource = new QueryDataSource(this.db, "conflicts/all");
                                                                                                                                                                                                                                                                                                                          +    this.dataSource.paginator = this.paginator;
                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                          +   * Create the database index to query document conflicts, if the index doesn't exist already.
                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                          +  private createDatabaseIndexForConflicts() {
                                                                                                                                                                                                                                                                                                                          +    const designDoc = {
                                                                                                                                                                                                                                                                                                                          +      _id: "_design/conflicts",
                                                                                                                                                                                                                                                                                                                          +      views: {
                                                                                                                                                                                                                                                                                                                          +        all: {
                                                                                                                                                                                                                                                                                                                          +          map:
                                                                                                                                                                                                                                                                                                                          +            "(doc) => { " +
                                                                                                                                                                                                                                                                                                                          +            "if (doc._conflicts) { emit(doc._conflicts, doc._id); } " +
                                                                                                                                                                                                                                                                                                                          +            "}",
                                                                                                                                                                                                                                                                                                                          +        },
                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +    return this.db.saveDatabaseIndex(designDoc);
                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          <p>conflicts to resolve:</p>
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +<div class="mat-elevation-z1">
                                                                                                                                                                                                                                                                                                                          +  <div *ngIf="dataSource?.loading$ | async">
                                                                                                                                                                                                                                                                                                                          +    <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +  <table
                                                                                                                                                                                                                                                                                                                          +    mat-table
                                                                                                                                                                                                                                                                                                                          +    [dataSource]="dataSource"
                                                                                                                                                                                                                                                                                                                          +    matSort
                                                                                                                                                                                                                                                                                                                          +    class="full-width"
                                                                                                                                                                                                                                                                                                                          +    aria-label="Table showing the conflicts"
                                                                                                                                                                                                                                                                                                                          +  >
                                                                                                                                                                                                                                                                                                                          +    <ng-container matColumnDef="id">
                                                                                                                                                                                                                                                                                                                          +      <th mat-header-cell *matHeaderCellDef mat-sort-header>_id</th>
                                                                                                                                                                                                                                                                                                                          +      <td mat-cell *matCellDef="let row">{{ row.id }}</td>
                                                                                                                                                                                                                                                                                                                          +    </ng-container>
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +    <ng-container matColumnDef="data" class="full-width">
                                                                                                                                                                                                                                                                                                                          +      <th mat-header-cell *matHeaderCellDef mat-sort-header>Data</th>
                                                                                                                                                                                                                                                                                                                          +      <td mat-cell *matCellDef="let row">
                                                                                                                                                                                                                                                                                                                          +        <app-compare-rev
                                                                                                                                                                                                                                                                                                                          +          *ngFor="let rev of row.key"
                                                                                                                                                                                                                                                                                                                          +          [rev]="rev"
                                                                                                                                                                                                                                                                                                                          +          [doc]="row.doc"
                                                                                                                                                                                                                                                                                                                          +        ></app-compare-rev>
                                                                                                                                                                                                                                                                                                                          +      </td>
                                                                                                                                                                                                                                                                                                                          +    </ng-container>
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +    <tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
                                                                                                                                                                                                                                                                                                                          +    <tr
                                                                                                                                                                                                                                                                                                                          +      mat-row
                                                                                                                                                                                                                                                                                                                          +      *matRowDef="let entity; columns: columnsToDisplay"
                                                                                                                                                                                                                                                                                                                          +      class="table-list-item"
                                                                                                                                                                                                                                                                                                                          +    ></tr>
                                                                                                                                                                                                                                                                                                                          +  </table>
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +  <mat-paginator
                                                                                                                                                                                                                                                                                                                          +    [pageSizeOptions]="[5, 10, 20]"
                                                                                                                                                                                                                                                                                                                          +    [pageSize]="10"
                                                                                                                                                                                                                                                                                                                          +    showFirstLastButtons
                                                                                                                                                                                                                                                                                                                          +  ></mat-paginator>
                                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/CustomIntervalComponent.html b/documentation/components/CustomIntervalComponent.html new file mode 100644 index 0000000000..069badb483 --- /dev/null +++ b/documentation/components/CustomIntervalComponent.html @@ -0,0 +1,612 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            + src/app/features/todos/recurring-interval/custom-interval/custom-interval.component.ts +

                                                                                                                                                                                                                                                                                                                            + + + + + + +
                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + + + + + + +
                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            + + + validateValue + + +
                                                                                                                                                                                                                                                                                                                            +validateValue() +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            + + + availableUnits + + +
                                                                                                                                                                                                                                                                                                                            + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                            + Default value : timeUnitsPrimary +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            + + + selectedUnit + + +
                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                            + Default value : "weeks" +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            + + + selectedValue + + +
                                                                                                                                                                                                                                                                                                                            + Type : number + +
                                                                                                                                                                                                                                                                                                                            + Default value : 1 +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                            +import { timeUnitsPrimary } from "../time-interval";
                                                                                                                                                                                                                                                                                                                            +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                            +import { MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                            +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                            +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                            +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                            +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                            +  selector: "app-custom-interval",
                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./custom-interval.component.html",
                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./custom-interval.component.scss"],
                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                            +    FormsModule,
                                                                                                                                                                                                                                                                                                                            +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                            +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                            +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                            +    MatInputModule,
                                                                                                                                                                                                                                                                                                                            +    NgForOf,
                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                            +export class CustomIntervalComponent {
                                                                                                                                                                                                                                                                                                                            +  availableUnits: { label: string; unit: string }[] = timeUnitsPrimary;
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +  selectedValue: number = 1;
                                                                                                                                                                                                                                                                                                                            +  selectedUnit: string = "weeks";
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +  validateValue() {
                                                                                                                                                                                                                                                                                                                            +    // if we switch to ReactiveForms here then maybe change this to Validators
                                                                                                                                                                                                                                                                                                                            +    if (this.selectedValue < 1) {
                                                                                                                                                                                                                                                                                                                            +      this.selectedValue = 1;
                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            <mat-dialog-content>
                                                                                                                                                                                                                                                                                                                            +  <span i18n>repeat every</span>
                                                                                                                                                                                                                                                                                                                            +  &nbsp;
                                                                                                                                                                                                                                                                                                                            +  <mat-form-field class="field-number">
                                                                                                                                                                                                                                                                                                                            +    <input
                                                                                                                                                                                                                                                                                                                            +      matInput
                                                                                                                                                                                                                                                                                                                            +      type="number"
                                                                                                                                                                                                                                                                                                                            +      [(ngModel)]="selectedValue"
                                                                                                                                                                                                                                                                                                                            +      min="1"
                                                                                                                                                                                                                                                                                                                            +      (keyup)="validateValue()"
                                                                                                                                                                                                                                                                                                                            +    />
                                                                                                                                                                                                                                                                                                                            +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                            +  &nbsp;
                                                                                                                                                                                                                                                                                                                            +  <mat-form-field class="field-select">
                                                                                                                                                                                                                                                                                                                            +    <mat-select [(ngModel)]="selectedUnit">
                                                                                                                                                                                                                                                                                                                            +      <mat-option *ngFor="let o of availableUnits" [value]="o.unit">
                                                                                                                                                                                                                                                                                                                            +        {{ o.label }}
                                                                                                                                                                                                                                                                                                                            +      </mat-option>
                                                                                                                                                                                                                                                                                                                            +    </mat-select>
                                                                                                                                                                                                                                                                                                                            +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                            +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                            +  <button
                                                                                                                                                                                                                                                                                                                            +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                            +    i18n="custom time interval dialog action"
                                                                                                                                                                                                                                                                                                                            +    [mat-dialog-close]="{ amount: selectedValue, unit: selectedUnit }"
                                                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                                                            +    Set
                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                            +  <button
                                                                                                                                                                                                                                                                                                                            +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                            +    i18n="custom time interval dialog action"
                                                                                                                                                                                                                                                                                                                            +    [mat-dialog-close]="undefined"
                                                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                                                            +    Cancel
                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                            +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            + ./custom-interval.component.scss +

                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            .field-number {
                                                                                                                                                                                                                                                                                                                            +  width: 80px;
                                                                                                                                                                                                                                                                                                                            +  font-weight: bold;
                                                                                                                                                                                                                                                                                                                            +  text-align: right;
                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +.field-select {
                                                                                                                                                                                                                                                                                                                            +  width: 120px;
                                                                                                                                                                                                                                                                                                                            +  font-weight: bold;
                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DashboardComponent.html b/documentation/components/DashboardComponent.html new file mode 100644 index 0000000000..5a49d4fe06 --- /dev/null +++ b/documentation/components/DashboardComponent.html @@ -0,0 +1,703 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              + src/app/core/dashboard/dashboard/dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                              + + + + +

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              + DashboardConfig +

                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Accessors
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              +constructor(ability: EntityAbility, components: ComponentRegistry, session: SessionSubject) +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                              ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                              components + ComponentRegistry + + No +
                                                                                                                                                                                                                                                                                                                              session + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              + + widgets +
                                                                                                                                                                                                                                                                                                                              + Type : DynamicComponentConfig[] + +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              + + + _widgets + + +
                                                                                                                                                                                                                                                                                                                              + Type : DynamicComponentConfig[] + +
                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              + Accessors +

                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              + + widgets +
                                                                                                                                                                                                                                                                                                                              + getwidgets() +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              + setwidgets(widgets: DynamicComponentConfig[]) +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                              widgets + DynamicComponentConfig[] + + No +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                              +import { DynamicComponentConfig } from "../../config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                              +import { NgFor } from "@angular/common";
                                                                                                                                                                                                                                                                                                                              +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                              +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                              +import { EntityAbility } from "../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                              +import { ComponentRegistry } from "../../../dynamic-components";
                                                                                                                                                                                                                                                                                                                              +import { DashboardWidget } from "../dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                              +import { SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +@RouteTarget("Dashboard")
                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                              +  selector: "app-dashboard",
                                                                                                                                                                                                                                                                                                                              +  template: ` <ng-template
                                                                                                                                                                                                                                                                                                                              +    *ngFor="let widgetConfig of _widgets"
                                                                                                                                                                                                                                                                                                                              +    [appDynamicComponent]="widgetConfig"
                                                                                                                                                                                                                                                                                                                              +  ></ng-template>`,
                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                              +  imports: [NgFor, DynamicComponentDirective],
                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                              +export class DashboardComponent implements DashboardConfig {
                                                                                                                                                                                                                                                                                                                              +  @Input() set widgets(widgets: DynamicComponentConfig[]) {
                                                                                                                                                                                                                                                                                                                              +    this.filterPermittedWidgets(widgets).then((res) => (this._widgets = res));
                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                              +  get widgets(): DynamicComponentConfig[] {
                                                                                                                                                                                                                                                                                                                              +    return this._widgets;
                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                              +  _widgets: DynamicComponentConfig[] = [];
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                              +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                              +    private components: ComponentRegistry,
                                                                                                                                                                                                                                                                                                                              +    private session: SessionSubject,
                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +  private async filterPermittedWidgets(
                                                                                                                                                                                                                                                                                                                              +    widgets: DynamicComponentConfig[],
                                                                                                                                                                                                                                                                                                                              +  ): Promise<DynamicComponentConfig[]> {
                                                                                                                                                                                                                                                                                                                              +    const permittedWidgets: DynamicComponentConfig[] = [];
                                                                                                                                                                                                                                                                                                                              +    for (const widget of widgets) {
                                                                                                                                                                                                                                                                                                                              +      if (
                                                                                                                                                                                                                                                                                                                              +        this.hasRequiredRole(widget) &&
                                                                                                                                                                                                                                                                                                                              +        (await this.hasEntityPermission(widget))
                                                                                                                                                                                                                                                                                                                              +      ) {
                                                                                                                                                                                                                                                                                                                              +        permittedWidgets.push(widget);
                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                              +    return permittedWidgets;
                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +  private hasRequiredRole(widget: DynamicComponentConfig) {
                                                                                                                                                                                                                                                                                                                              +    if (widget.permittedUserRoles?.length > 0) {
                                                                                                                                                                                                                                                                                                                              +      const userRoles = this.session.value.roles;
                                                                                                                                                                                                                                                                                                                              +      const requiredRoles = widget.permittedUserRoles;
                                                                                                                                                                                                                                                                                                                              +      return requiredRoles.some((role) => userRoles.includes(role));
                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                              +      return true;
                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +  private async hasEntityPermission(widget: DynamicComponentConfig) {
                                                                                                                                                                                                                                                                                                                              +    const comp = (await this.components.get(
                                                                                                                                                                                                                                                                                                                              +      widget.component,
                                                                                                                                                                                                                                                                                                                              +    )()) as unknown as typeof DashboardWidget;
                                                                                                                                                                                                                                                                                                                              +    let entity: string | string[];
                                                                                                                                                                                                                                                                                                                              +    if (typeof comp.getRequiredEntities === "function") {
                                                                                                                                                                                                                                                                                                                              +      entity = comp.getRequiredEntities(widget.config);
                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                              +    return this.userHasAccess(entity);
                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +  private userHasAccess(entity: string | string[]): boolean {
                                                                                                                                                                                                                                                                                                                              +    if (entity) {
                                                                                                                                                                                                                                                                                                                              +      if (Array.isArray(entity)) {
                                                                                                                                                                                                                                                                                                                              +        return entity.some((e) => this.ability.can("read", e));
                                                                                                                                                                                                                                                                                                                              +      } else {
                                                                                                                                                                                                                                                                                                                              +        return this.ability.can("read", entity);
                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                              +    // No entity relation -> show widget
                                                                                                                                                                                                                                                                                                                              +    return true;
                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +export interface DashboardConfig {
                                                                                                                                                                                                                                                                                                                              +  widgets: DynamicComponentConfig[];
                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              + ./dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              @use "mixins/grid-layout";
                                                                                                                                                                                                                                                                                                                              +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +/* The minimum size of a widget for big screens */
                                                                                                                                                                                                                                                                                                                              +/* The minimum size on small screens is whatever size is available */
                                                                                                                                                                                                                                                                                                                              +$min-widget-width: 330px;
                                                                                                                                                                                                                                                                                                                              +/* There will only be one column below this screen width, as defined by the media query */
                                                                                                                                                                                                                                                                                                                              +$max-screen-width: $min-widget-width + sizes.$margin-main-view-right +
                                                                                                                                                                                                                                                                                                                              +  sizes.$margin-main-view-left;
                                                                                                                                                                                                                                                                                                                              +$widget-height: 430px;
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +:host {
                                                                                                                                                                                                                                                                                                                              +  @include grid-layout.adaptive($min-widget-width, $max-screen-width);
                                                                                                                                                                                                                                                                                                                              +  /* Make all rows be equal in height */
                                                                                                                                                                                                                                                                                                                              +  grid-auto-rows: $widget-height;
                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +.grid-item {
                                                                                                                                                                                                                                                                                                                              +  transition: all 1s;
                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DashboardListWidgetComponent.html b/documentation/components/DashboardListWidgetComponent.html new file mode 100644 index 0000000000..71273deb56 --- /dev/null +++ b/documentation/components/DashboardListWidgetComponent.html @@ -0,0 +1,1017 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                + src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.ts +

                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Base dashboard widget to build widgets that display a number of entries as a table.

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                This widget automatically handles loading animation and pagination. +Define a mat-table with your desired layout for displaying the entries through content-projection +and provide the data array as an input using async pipe.

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                <app-dashboard-list-widget [entries]="notes | async"> + + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                To highlight a row with a colored bar at the front, apply class="row-indicator" to your first + and set the css variable to the desired color, e.g. [ngStyle]="{'--row-indicator-color': row.getColor?.()}"

                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                + OnInit + OnChanges + AfterViewInit +

                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                +constructor(entityMapperService: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + dataMapper +
                                                                                                                                                                                                                                                                                                                                + Type : function + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Pipe to map, filter or sort the loaded data

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + entityType +
                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                entity type to be loaded for displaying entries +(filter or transform entities using the dataPipe input).

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                If you define an entityType, the "entries" input is ignored in favor of directly loading data here

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + entries +
                                                                                                                                                                                                                                                                                                                                + Type : E[] + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                array of items to be displayed in paginated widget table. +you can use an observable with async pipe here to let the component automatically handle "loading" indicator: +[entries]="myDataObservable | async"

                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                Alternatively define an entityType and dataPipe to let the component load data itself.

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + explanation +
                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                optional tooltip to explain detailed meaning of this widget / statistic

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + headline +
                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + icon +
                                                                                                                                                                                                                                                                                                                                + Type : IconName + +
                                                                                                                                                                                                                                                                                                                                + Default value : "exclamation-triangle" +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + subtitle +
                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + theme +
                                                                                                                                                                                                                                                                                                                                + Type : DashboardTheme + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + title +
                                                                                                                                                                                                                                                                                                                                + Type : string | number + +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + + data + + +
                                                                                                                                                                                                                                                                                                                                + Default value : new BehaviorSubject<E[]>(undefined) +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + + dataSource + + +
                                                                                                                                                                                                                                                                                                                                + Default value : new MatTableDataSource<E>() +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                + Default value : true +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                + + + + matTable + + +
                                                                                                                                                                                                                                                                                                                                + Type : MatTable<E> + +
                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                + + @ContentChild(MatTable)
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                                                                                                +  AfterViewInit,
                                                                                                                                                                                                                                                                                                                                +  Component,
                                                                                                                                                                                                                                                                                                                                +  ContentChild,
                                                                                                                                                                                                                                                                                                                                +  Input,
                                                                                                                                                                                                                                                                                                                                +  OnChanges,
                                                                                                                                                                                                                                                                                                                                +  OnInit,
                                                                                                                                                                                                                                                                                                                                +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                +  ViewChild,
                                                                                                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                +import { IconName } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                +  DashboardTheme,
                                                                                                                                                                                                                                                                                                                                +  DashboardWidgetComponent,
                                                                                                                                                                                                                                                                                                                                +} from "../dashboard-widget/dashboard-widget.component";
                                                                                                                                                                                                                                                                                                                                +import { MatTable, MatTableDataSource } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                +import { MatPaginator, MatPaginatorModule } from "@angular/material/paginator";
                                                                                                                                                                                                                                                                                                                                +import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                +import { filter, map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                +import { applyUpdate } from "../../entity/model/entity-update";
                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                +import { WidgetContentComponent } from "../dashboard-widget/widget-content/widget-content.component";
                                                                                                                                                                                                                                                                                                                                +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                + * Base dashboard widget to build widgets that display a number of entries as a table.
                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                + * This widget automatically handles loading animation and pagination.
                                                                                                                                                                                                                                                                                                                                + * Define a mat-table with your desired layout for displaying the entries through content-projection
                                                                                                                                                                                                                                                                                                                                + * and provide the data array as an input using async pipe.
                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                + * <app-dashboard-list-widget [entries]="notes | async">
                                                                                                                                                                                                                                                                                                                                + *   <table mat-table>
                                                                                                                                                                                                                                                                                                                                + *     <!-- define row layout here-->
                                                                                                                                                                                                                                                                                                                                + *   </table>
                                                                                                                                                                                                                                                                                                                                + * </app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                + * To highlight a row with a colored bar at the front, apply `class="row-indicator"` to your first <td>
                                                                                                                                                                                                                                                                                                                                + *   and set the css variable to the desired color, e.g. `[ngStyle]="{'--row-indicator-color': row.getColor?.()}"`
                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                +  selector: "app-dashboard-list-widget",
                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./dashboard-list-widget.component.html",
                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./dashboard-list-widget.component.scss"],
                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                +    DashboardWidgetComponent,
                                                                                                                                                                                                                                                                                                                                +    WidgetContentComponent,
                                                                                                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                                                                                                +    MatPaginatorModule,
                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                +export class DashboardListWidgetComponent<E>
                                                                                                                                                                                                                                                                                                                                +  implements OnInit, OnChanges, AfterViewInit
                                                                                                                                                                                                                                                                                                                                +{
                                                                                                                                                                                                                                                                                                                                +  @Input() subtitle: string;
                                                                                                                                                                                                                                                                                                                                +  @Input() icon: IconName = "exclamation-triangle";
                                                                                                                                                                                                                                                                                                                                +  @Input() theme: DashboardTheme;
                                                                                                                                                                                                                                                                                                                                +  @Input() title: string | number;
                                                                                                                                                                                                                                                                                                                                +  /** optional tooltip to explain detailed meaning of this widget / statistic */
                                                                                                                                                                                                                                                                                                                                +  @Input() explanation: string;
                                                                                                                                                                                                                                                                                                                                +  @Input() headline: string;
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                +   * array of items to be displayed in paginated widget table.
                                                                                                                                                                                                                                                                                                                                +   * you can use an observable with async pipe here to let the component automatically handle "loading" indicator:
                                                                                                                                                                                                                                                                                                                                +   * `[entries]="myDataObservable | async"`
                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                +   * Alternatively define an entityType and dataPipe to let the component load data itself.
                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                +  @Input() entries: E[];
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                +   * entity type to be loaded for displaying entries
                                                                                                                                                                                                                                                                                                                                +   * (filter or transform entities using the dataPipe input).
                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                +   * If you define an entityType, the "entries" input is ignored in favor of directly loading data here
                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                +  @Input() entityType: string;
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                +   * Pipe to map, filter or sort the loaded data
                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                +  @Input() dataMapper: (data: E[]) => E[];
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  isLoading: boolean = true;
                                                                                                                                                                                                                                                                                                                                +  data = new BehaviorSubject<E[]>(undefined);
                                                                                                                                                                                                                                                                                                                                +  dataSource = new MatTableDataSource<E>();
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  @ContentChild(MatTable) matTable: MatTable<E>;
                                                                                                                                                                                                                                                                                                                                +  @ViewChild("paginator") private paginator: MatPaginator;
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  constructor(private entityMapperService: EntityMapperService) {}
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                +    this.data
                                                                                                                                                                                                                                                                                                                                +      .pipe(
                                                                                                                                                                                                                                                                                                                                +        filter((d) => !!d),
                                                                                                                                                                                                                                                                                                                                +        map((d) => (this.dataMapper ? this.dataMapper(d) : d)),
                                                                                                                                                                                                                                                                                                                                +        untilDestroyed(this),
                                                                                                                                                                                                                                                                                                                                +      )
                                                                                                                                                                                                                                                                                                                                +      .subscribe((newData) => {
                                                                                                                                                                                                                                                                                                                                +        this.dataSource.data = newData;
                                                                                                                                                                                                                                                                                                                                +        this.isLoading = !newData;
                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  private async loadDataForType() {
                                                                                                                                                                                                                                                                                                                                +    // load data
                                                                                                                                                                                                                                                                                                                                +    const entities = await this.entityMapperService.loadType(this.entityType);
                                                                                                                                                                                                                                                                                                                                +    this.data.next(entities as E[]);
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +    // subscribe to relevant updates of data
                                                                                                                                                                                                                                                                                                                                +    this.entityMapperService
                                                                                                                                                                                                                                                                                                                                +      .receiveUpdates(this.entityType)
                                                                                                                                                                                                                                                                                                                                +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                +      .subscribe((update) =>
                                                                                                                                                                                                                                                                                                                                +        this.data.next(applyUpdate(this.data.value as Entity[], update) as E[]),
                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                +    if (changes.entries && !this.entityType) {
                                                                                                                                                                                                                                                                                                                                +      this.data.next(this.entries);
                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                +    if (changes.entityType && !!this.entityType) {
                                                                                                                                                                                                                                                                                                                                +      this.loadDataForType();
                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  ngAfterViewInit(): void {
                                                                                                                                                                                                                                                                                                                                +    this.dataSource.paginator = this.paginator;
                                                                                                                                                                                                                                                                                                                                +    this.matTable.dataSource = this.dataSource;
                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                <app-dashboard-widget
                                                                                                                                                                                                                                                                                                                                +  [title]="title ?? dataSource.data.length"
                                                                                                                                                                                                                                                                                                                                +  [subtitle]="subtitle"
                                                                                                                                                                                                                                                                                                                                +  [theme]="theme"
                                                                                                                                                                                                                                                                                                                                +  [icon]="icon"
                                                                                                                                                                                                                                                                                                                                +  [headline]="headline"
                                                                                                                                                                                                                                                                                                                                +  [explanation]="explanation"
                                                                                                                                                                                                                                                                                                                                +  [loading]="isLoading"
                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                +  <app-widget-content>
                                                                                                                                                                                                                                                                                                                                +    <ng-container *ngIf="dataSource.data.length > 0">
                                                                                                                                                                                                                                                                                                                                +      <ng-content></ng-content>
                                                                                                                                                                                                                                                                                                                                +    </ng-container>
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +    <div *ngIf="dataSource.data.length === 0" class="headline">
                                                                                                                                                                                                                                                                                                                                +      <span
                                                                                                                                                                                                                                                                                                                                +        i18n="Description that are no items in generic dashboard list widget"
                                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                                +        no current entries
                                                                                                                                                                                                                                                                                                                                +      </span>
                                                                                                                                                                                                                                                                                                                                +    </div>
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +    <mat-paginator
                                                                                                                                                                                                                                                                                                                                +      #paginator
                                                                                                                                                                                                                                                                                                                                +      [style.display]="dataSource.data.length <= 5 ? 'none' : ''"
                                                                                                                                                                                                                                                                                                                                +      [pageSizeOptions]="[5]"
                                                                                                                                                                                                                                                                                                                                +      [hidePageSize]="true"
                                                                                                                                                                                                                                                                                                                                +    >
                                                                                                                                                                                                                                                                                                                                +    </mat-paginator>
                                                                                                                                                                                                                                                                                                                                +  </app-widget-content>
                                                                                                                                                                                                                                                                                                                                +</app-dashboard-widget>
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                + ./dashboard-list-widget.component.scss +

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                @use "../dashboard-widget-base";
                                                                                                                                                                                                                                                                                                                                +@use "../../../../styles/variables/sizes";
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +:host ::ng-deep .row-indicator {
                                                                                                                                                                                                                                                                                                                                +  position: relative;
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +  &::before {
                                                                                                                                                                                                                                                                                                                                +    left: 0;
                                                                                                                                                                                                                                                                                                                                +    top: 0;
                                                                                                                                                                                                                                                                                                                                +    content: "";
                                                                                                                                                                                                                                                                                                                                +    display: block;
                                                                                                                                                                                                                                                                                                                                +    width: sizes.$small;
                                                                                                                                                                                                                                                                                                                                +    height: 100%;
                                                                                                                                                                                                                                                                                                                                +    position: absolute;
                                                                                                                                                                                                                                                                                                                                +    background-color: var(--row-indicator-color);
                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DashboardWidgetComponent.html b/documentation/components/DashboardWidgetComponent.html new file mode 100644 index 0000000000..2d49cc83e6 --- /dev/null +++ b/documentation/components/DashboardWidgetComponent.html @@ -0,0 +1,713 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  + src/app/core/dashboard/dashboard-widget/dashboard-widget.component.ts +

                                                                                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + explanation +
                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  optional tooltip to explain detailed meaning of this widget / statistic

                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + headline +
                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + icon +
                                                                                                                                                                                                                                                                                                                                  + Type : IconName + +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + loading +
                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                  + Default value : false +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  Show a loading indicator until data is ready to be shown

                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + subtitle +
                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + theme +
                                                                                                                                                                                                                                                                                                                                  + Type : DashboardTheme + +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + title +
                                                                                                                                                                                                                                                                                                                                  + Type : string | number + +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                  +import { IconName } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                                                                                                                                                  +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                  +import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
                                                                                                                                                                                                                                                                                                                                  +import { FaDynamicIconComponent } from "../../common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                                                  +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +export type DashboardTheme =
                                                                                                                                                                                                                                                                                                                                  +  | "general"
                                                                                                                                                                                                                                                                                                                                  +  | "child"
                                                                                                                                                                                                                                                                                                                                  +  | "attendance"
                                                                                                                                                                                                                                                                                                                                  +  | "note"
                                                                                                                                                                                                                                                                                                                                  +  | "class"
                                                                                                                                                                                                                                                                                                                                  +  | "school";
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                  +  selector: "app-dashboard-widget",
                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./dashboard-widget.component.html",
                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./dashboard-widget.component.scss"],
                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                  +    MatProgressSpinnerModule,
                                                                                                                                                                                                                                                                                                                                  +    FaDynamicIconComponent,
                                                                                                                                                                                                                                                                                                                                  +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                  +export class DashboardWidgetComponent {
                                                                                                                                                                                                                                                                                                                                  +  @Input() subtitle: string;
                                                                                                                                                                                                                                                                                                                                  +  @Input() icon: IconName;
                                                                                                                                                                                                                                                                                                                                  +  @Input() theme: DashboardTheme;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +  @Input() title: string | number;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +  /** optional tooltip to explain detailed meaning of this widget / statistic */
                                                                                                                                                                                                                                                                                                                                  +  @Input() explanation: string;
                                                                                                                                                                                                                                                                                                                                  +  @Input() headline: string;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +  /** Show a loading indicator until data is ready to be shown */
                                                                                                                                                                                                                                                                                                                                  +  @Input() loading = false;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  <!-- Header -->
                                                                                                                                                                                                                                                                                                                                  +<div class="widget-header theme-background-{{ theme }}">
                                                                                                                                                                                                                                                                                                                                  +  <div *ngIf="headline" class="widget-headline">{{ headline }}</div>
                                                                                                                                                                                                                                                                                                                                  +  <div *ngIf="!headline" class="widget-title">
                                                                                                                                                                                                                                                                                                                                  +    <ng-container *ngIf="!loading">{{ title }}</ng-container>
                                                                                                                                                                                                                                                                                                                                  +    <mat-spinner *ngIf="loading" diameter="40"></mat-spinner>
                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                  +  <div *ngIf="!headline" class="widget-subheadline" [matTooltip]="explanation">
                                                                                                                                                                                                                                                                                                                                  +    {{ subtitle }}
                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                  +  <app-fa-dynamic-icon class="widget-icon" [icon]="icon"></app-fa-dynamic-icon>
                                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +<div class="widget-content">
                                                                                                                                                                                                                                                                                                                                  +  <h2 *ngIf="loading" class="headline" i18n>Loading...</h2>
                                                                                                                                                                                                                                                                                                                                  +  <ng-content *ngIf="!loading" select="app-widget-content"></ng-content>
                                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  + ./dashboard-widget.component.scss +

                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  @use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +$widget-header-height: 64px;
                                                                                                                                                                                                                                                                                                                                  +$widget-content-height: 320px;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +$font-size-headline: 40pt;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +$padding-header: 24px;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +$border-radius-card: 4px;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +.widget-header {
                                                                                                                                                                                                                                                                                                                                  +  /* Defines a grid that roughly looks like this:
                                                                                                                                                                                                                                                                                                                                  +   * |-------|--------------------------------------|
                                                                                                                                                                                                                                                                                                                                  +   * |       |                                      |
                                                                                                                                                                                                                                                                                                                                  +   * |       |                                      |
                                                                                                                                                                                                                                                                                                                                  +   * |-------|--------------------------------------|
                                                                                                                                                                                                                                                                                                                                  +   * |       |                                      |
                                                                                                                                                                                                                                                                                                                                  +   * |-------|--------------------------------------|
                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                  +   * The right-upper side is where the headline will be placed.
                                                                                                                                                                                                                                                                                                                                  +   * On the lower right side, the subhead-line is placed
                                                                                                                                                                                                                                                                                                                                  +   * On the two left sides, the icon will be placed in a
                                                                                                                                                                                                                                                                                                                                  +   * centered way
                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                  +  display: grid;
                                                                                                                                                                                                                                                                                                                                  +  grid-template: 2fr 1fr / 40pt 1fr;
                                                                                                                                                                                                                                                                                                                                  +  grid-template-areas:
                                                                                                                                                                                                                                                                                                                                  +    "icon headline"
                                                                                                                                                                                                                                                                                                                                  +    "subheadline subheadline";
                                                                                                                                                                                                                                                                                                                                  +  padding: $padding-header;
                                                                                                                                                                                                                                                                                                                                  +  height: $widget-header-height;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +.widget-icon {
                                                                                                                                                                                                                                                                                                                                  +  grid-area: icon;
                                                                                                                                                                                                                                                                                                                                  +  color: white;
                                                                                                                                                                                                                                                                                                                                  +  align-self: center;
                                                                                                                                                                                                                                                                                                                                  +  font-size: $font-size-headline;
                                                                                                                                                                                                                                                                                                                                  +  /* fixes the correct centering of this item */
                                                                                                                                                                                                                                                                                                                                  +  display: table;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +.widget-headline {
                                                                                                                                                                                                                                                                                                                                  +  grid-area: headline;
                                                                                                                                                                                                                                                                                                                                  +  text-align: end;
                                                                                                                                                                                                                                                                                                                                  +  place-self: end;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +  font-size: 28pt;
                                                                                                                                                                                                                                                                                                                                  +  color: white;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +.widget-title {
                                                                                                                                                                                                                                                                                                                                  +  grid-area: headline;
                                                                                                                                                                                                                                                                                                                                  +  text-align: end;
                                                                                                                                                                                                                                                                                                                                  +  place-self: center end;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +  font-size: 40pt;
                                                                                                                                                                                                                                                                                                                                  +  color: white;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +.widget-subheadline {
                                                                                                                                                                                                                                                                                                                                  +  grid-area: subheadline;
                                                                                                                                                                                                                                                                                                                                  +  text-align: end;
                                                                                                                                                                                                                                                                                                                                  +  place-self: end;
                                                                                                                                                                                                                                                                                                                                  +  margin-top: 8px;
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +  font-size: 14px;
                                                                                                                                                                                                                                                                                                                                  +  color: white;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +.widget-content {
                                                                                                                                                                                                                                                                                                                                  +  height: $widget-content-height;
                                                                                                                                                                                                                                                                                                                                  +  overflow: hidden;
                                                                                                                                                                                                                                                                                                                                  +  display: flex;
                                                                                                                                                                                                                                                                                                                                  +  background-color: white;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +.headline {
                                                                                                                                                                                                                                                                                                                                  +  height: 100%;
                                                                                                                                                                                                                                                                                                                                  +  width: 100%;
                                                                                                                                                                                                                                                                                                                                  +  display: flex;
                                                                                                                                                                                                                                                                                                                                  +  place-content: center;
                                                                                                                                                                                                                                                                                                                                  +  place-items: center;
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +/* Map containing the colors that belong to a certain theme */
                                                                                                                                                                                                                                                                                                                                  +$themes: (
                                                                                                                                                                                                                                                                                                                                  +  general: #555555,
                                                                                                                                                                                                                                                                                                                                  +  child: #1565c0,
                                                                                                                                                                                                                                                                                                                                  +  attendance: #00838f,
                                                                                                                                                                                                                                                                                                                                  +  note: #008f53,
                                                                                                                                                                                                                                                                                                                                  +  class: #2e7d32,
                                                                                                                                                                                                                                                                                                                                  +  school: #9e9d24,
                                                                                                                                                                                                                                                                                                                                  +);
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +@each $ident, $color in $themes {
                                                                                                                                                                                                                                                                                                                                  +  .theme-background-#{$ident} {
                                                                                                                                                                                                                                                                                                                                  +    background-color: $color;
                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +:host {
                                                                                                                                                                                                                                                                                                                                  +  display: block;
                                                                                                                                                                                                                                                                                                                                  +  border-radius: $border-radius-card;
                                                                                                                                                                                                                                                                                                                                  +  /* necessary for the border-radius to apply */
                                                                                                                                                                                                                                                                                                                                  +  overflow: auto;
                                                                                                                                                                                                                                                                                                                                  +  @include mat-elevation.elevation(3);
                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DateImportConfigComponent.html b/documentation/components/DateImportConfigComponent.html new file mode 100644 index 0000000000..c12e7c28c1 --- /dev/null +++ b/documentation/components/DateImportConfigComponent.html @@ -0,0 +1,815 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    + src/app/core/basic-datatypes/date/date-import-config/date-import-config.component.ts +

                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Configuration dialog for parsing date value of data imported from a file.

                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    +constructor(data: MappingDialogData, confirmation: ConfirmationDialogService, dialog: MatDialogRef) +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                    data + MappingDialogData + + No +
                                                                                                                                                                                                                                                                                                                                    confirmation + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                    dialog + MatDialogRef<any> + + No +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    + + + checkDateValues + + +
                                                                                                                                                                                                                                                                                                                                    +checkDateValues() +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    + + + Async + save + + +
                                                                                                                                                                                                                                                                                                                                    + + save() +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                    + Type : MappingDialogData + +
                                                                                                                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                                                                                                                    + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    + + + format + + +
                                                                                                                                                                                                                                                                                                                                    + Default value : new FormControl("") +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    + + + valid + + +
                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    + + + values + + +
                                                                                                                                                                                                                                                                                                                                    + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                    + Default value : [] +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                    +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                    +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                    +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                    +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                    +import moment from "moment/moment";
                                                                                                                                                                                                                                                                                                                                    +import { FormControl, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                    +import { ConfirmationDialogService } from "../../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                    +import { MappingDialogData } from "../../../import/import-column-mapping/import-column-mapping.component";
                                                                                                                                                                                                                                                                                                                                    +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                    +import { DatePipe, NgClass, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                    +import { MatListModule } from "@angular/material/list";
                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                    +import { HelpButtonComponent } from "../../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                    + * Configuration dialog for parsing date value of data imported from a file.
                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                    +@DynamicComponent("DateImportConfig")
                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                    +  selector: "app-date-import-config",
                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./date-import-config.component.html",
                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./date-import-config.component.scss"],
                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                    +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                    +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                    +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                    +    MatListModule,
                                                                                                                                                                                                                                                                                                                                    +    NgForOf,
                                                                                                                                                                                                                                                                                                                                    +    NgClass,
                                                                                                                                                                                                                                                                                                                                    +    DatePipe,
                                                                                                                                                                                                                                                                                                                                    +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                    +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                    +export class DateImportConfigComponent {
                                                                                                                                                                                                                                                                                                                                    +  format = new FormControl("");
                                                                                                                                                                                                                                                                                                                                    +  valid = false;
                                                                                                                                                                                                                                                                                                                                    +  values: { value: string; parsed?: Date }[] = [];
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                    +    @Inject(MAT_DIALOG_DATA) public data: MappingDialogData,
                                                                                                                                                                                                                                                                                                                                    +    private confirmation: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                    +    private dialog: MatDialogRef<any>,
                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                    +    this.values = this.data.values
                                                                                                                                                                                                                                                                                                                                    +      .filter((val) => !!val)
                                                                                                                                                                                                                                                                                                                                    +      .map((value) => ({ value }));
                                                                                                                                                                                                                                                                                                                                    +    this.format.valueChanges.subscribe(() => this.checkDateValues());
                                                                                                                                                                                                                                                                                                                                    +    this.format.setValue(this.data.col.additional);
                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  checkDateValues() {
                                                                                                                                                                                                                                                                                                                                    +    this.format.setErrors(undefined);
                                                                                                                                                                                                                                                                                                                                    +    this.values.forEach((val) => {
                                                                                                                                                                                                                                                                                                                                    +      // TODO: check and improve the date parsing. Tests fail with moment.js > 2.29
                                                                                                                                                                                                                                                                                                                                    +      const date = moment(val.value, this.format.value?.toUpperCase(), true);
                                                                                                                                                                                                                                                                                                                                    +      if (date.isValid()) {
                                                                                                                                                                                                                                                                                                                                    +        val.parsed = date.toDate();
                                                                                                                                                                                                                                                                                                                                    +      } else {
                                                                                                                                                                                                                                                                                                                                    +        delete val.parsed;
                                                                                                                                                                                                                                                                                                                                    +        this.format.setErrors({ parsingError: true });
                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                    +    // Sort unparsed dates to front
                                                                                                                                                                                                                                                                                                                                    +    this.values.sort((v1, v2) =>
                                                                                                                                                                                                                                                                                                                                    +      v1.parsed && !v2.parsed ? 1 : !v1.parsed && v2.parsed ? -1 : 0,
                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  async save() {
                                                                                                                                                                                                                                                                                                                                    +    const confirmed =
                                                                                                                                                                                                                                                                                                                                    +      !this.format.errors ||
                                                                                                                                                                                                                                                                                                                                    +      (await this.confirmation.getConfirmation(
                                                                                                                                                                                                                                                                                                                                    +        $localize`Ignore values?`,
                                                                                                                                                                                                                                                                                                                                    +        $localize`Some values don't have a mapping and will not be imported. Are you sure you want to keep it like this?`,
                                                                                                                                                                                                                                                                                                                                    +      ));
                                                                                                                                                                                                                                                                                                                                    +    if (confirmed) {
                                                                                                                                                                                                                                                                                                                                    +      this.data.col.additional = this.format.value?.toUpperCase();
                                                                                                                                                                                                                                                                                                                                    +      this.dialog.close();
                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    <mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                    +  <mat-form-field>
                                                                                                                                                                                                                                                                                                                                    +    <mat-label i18n>Date format</mat-label>
                                                                                                                                                                                                                                                                                                                                    +    <input [formControl]="format" matInput />
                                                                                                                                                                                                                                                                                                                                    +    <mat-hint i18n>
                                                                                                                                                                                                                                                                                                                                    +      e.g. YYYY-MM-DD
                                                                                                                                                                                                                                                                                                                                    +      <a
                                                                                                                                                                                                                                                                                                                                    +        href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format"
                                                                                                                                                                                                                                                                                                                                    +        target="_blank"
                                                                                                                                                                                                                                                                                                                                    +        rel="noopener"
                                                                                                                                                                                                                                                                                                                                    +        >(help)</a
                                                                                                                                                                                                                                                                                                                                    +      >
                                                                                                                                                                                                                                                                                                                                    +    </mat-hint>
                                                                                                                                                                                                                                                                                                                                    +    <mat-error *ngIf="format.errors" i18n>
                                                                                                                                                                                                                                                                                                                                    +      Format cannot parse all dates
                                                                                                                                                                                                                                                                                                                                    +    </mat-error>
                                                                                                                                                                                                                                                                                                                                    +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  <app-help-button
                                                                                                                                                                                                                                                                                                                                    +    text="Define how date values in your imported data are formatted, so that the system correctly understands them. Values that do not match the given format will be ignored (remain empty) during import."
                                                                                                                                                                                                                                                                                                                                    +    i18n-text="import - value mapping (date) - help text"
                                                                                                                                                                                                                                                                                                                                    +  ></app-help-button>
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  <mat-list>
                                                                                                                                                                                                                                                                                                                                    +    <mat-list-item
                                                                                                                                                                                                                                                                                                                                    +      *ngFor="let val of values"
                                                                                                                                                                                                                                                                                                                                    +      [ngClass]="{ invalid: !val.parsed }"
                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                    +      {{ val.value }} -> {{ val.parsed | date }}
                                                                                                                                                                                                                                                                                                                                    +    </mat-list-item>
                                                                                                                                                                                                                                                                                                                                    +  </mat-list>
                                                                                                                                                                                                                                                                                                                                    +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                    +  <button mat-raised-button color="accent" (click)="save()" i18n>
                                                                                                                                                                                                                                                                                                                                    +    Save & Close
                                                                                                                                                                                                                                                                                                                                    +  </button>
                                                                                                                                                                                                                                                                                                                                    +  <button mat-stroked-button matDialogClose i18n>Cancel</button>
                                                                                                                                                                                                                                                                                                                                    +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    + ./date-import-config.component.scss +

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    .invalid {
                                                                                                                                                                                                                                                                                                                                    +  background-color: rgba(256, 0, 0, 0.5);
                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +mat-list-item {
                                                                                                                                                                                                                                                                                                                                    +  margin: 5px 0;
                                                                                                                                                                                                                                                                                                                                    +  border-radius: 5px;
                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DateRangeFilterComponent.html b/documentation/components/DateRangeFilterComponent.html new file mode 100644 index 0000000000..8bff0d605b --- /dev/null +++ b/documentation/components/DateRangeFilterComponent.html @@ -0,0 +1,731 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/date/date-range-filter/date-range-filter.component.ts +

                                                                                                                                                                                                                                                                                                                                      + + + + +

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      + OnChanges +

                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      +constructor(dialog: MatDialog) +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                      dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      + + filterConfig +
                                                                                                                                                                                                                                                                                                                                      + Type : DateFilter<T> + +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      + + + dateChangedManually + + +
                                                                                                                                                                                                                                                                                                                                      +dateChangedManually() +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      + + + openDialog + + +
                                                                                                                                                                                                                                                                                                                                      +openDialog(e: Event) +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                      e + Event + + No +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      + + + fromDate + + +
                                                                                                                                                                                                                                                                                                                                      + Type : Date + +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      + + + toDate + + +
                                                                                                                                                                                                                                                                                                                                      + Type : Date + +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                      +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                      +import { DateRangeFilterPanelComponent } from "./date-range-filter-panel/date-range-filter-panel.component";
                                                                                                                                                                                                                                                                                                                                      +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                      +import { MatDatepickerModule } from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                      +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                      +import { dateToString, isValidDate } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                      +import { DateFilter } from "../../../filter/filters/dateFilter";
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                      +  selector: "app-date-range-filter",
                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./date-range-filter.component.html",
                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./date-range-filter.component.scss"],
                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                      +  imports: [MatFormFieldModule, MatDatepickerModule, FormsModule],
                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                      +export class DateRangeFilterComponent<T extends Entity> implements OnChanges {
                                                                                                                                                                                                                                                                                                                                      +  fromDate: Date;
                                                                                                                                                                                                                                                                                                                                      +  toDate: Date;
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  @Input() filterConfig: DateFilter<T>;
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  constructor(private dialog: MatDialog) {}
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                      +    if (changes.filterConfig) {
                                                                                                                                                                                                                                                                                                                                      +      this.initDates();
                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  private initDates() {
                                                                                                                                                                                                                                                                                                                                      +    const range = this.filterConfig.getDateRange();
                                                                                                                                                                                                                                                                                                                                      +    if (
                                                                                                                                                                                                                                                                                                                                      +      (range.start !== this.fromDate || range.start === undefined) &&
                                                                                                                                                                                                                                                                                                                                      +      (range.end !== this.toDate || range.end === undefined)
                                                                                                                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                                                                                                                      +      this.fromDate = range.start;
                                                                                                                                                                                                                                                                                                                                      +      this.toDate = range.end;
                                                                                                                                                                                                                                                                                                                                      +      this.filterConfig.selectedOptionChange.emit(
                                                                                                                                                                                                                                                                                                                                      +        this.filterConfig.selectedOptionValues,
                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  dateChangedManually() {
                                                                                                                                                                                                                                                                                                                                      +    this.filterConfig.selectedOptionValues = [
                                                                                                                                                                                                                                                                                                                                      +      isValidDate(this.fromDate) ? dateToString(this.fromDate) : "",
                                                                                                                                                                                                                                                                                                                                      +      isValidDate(this.toDate) ? dateToString(this.toDate) : "",
                                                                                                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                                                                                                      +    this.filterConfig.selectedOptionChange.emit(
                                                                                                                                                                                                                                                                                                                                      +      this.filterConfig.selectedOptionValues,
                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  openDialog(e: Event) {
                                                                                                                                                                                                                                                                                                                                      +    e.stopPropagation();
                                                                                                                                                                                                                                                                                                                                      +    this.dialog
                                                                                                                                                                                                                                                                                                                                      +      .open(DateRangeFilterPanelComponent, {
                                                                                                                                                                                                                                                                                                                                      +        width: "600px",
                                                                                                                                                                                                                                                                                                                                      +        minWidth: "400px",
                                                                                                                                                                                                                                                                                                                                      +        data: this.filterConfig,
                                                                                                                                                                                                                                                                                                                                      +      })
                                                                                                                                                                                                                                                                                                                                      +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                      +      .subscribe(() => this.initDates());
                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      <mat-form-field>
                                                                                                                                                                                                                                                                                                                                      +  <mat-label>{{ filterConfig.label || filterConfig.name }}</mat-label>
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  <mat-date-range-input>
                                                                                                                                                                                                                                                                                                                                      +    <input
                                                                                                                                                                                                                                                                                                                                      +      matStartDate
                                                                                                                                                                                                                                                                                                                                      +      (dateChange)="dateChangedManually()"
                                                                                                                                                                                                                                                                                                                                      +      [(ngModel)]="fromDate"
                                                                                                                                                                                                                                                                                                                                      +      i18n-placeholder="Date selection"
                                                                                                                                                                                                                                                                                                                                      +      placeholder="Start date"
                                                                                                                                                                                                                                                                                                                                      +    />
                                                                                                                                                                                                                                                                                                                                      +    <input
                                                                                                                                                                                                                                                                                                                                      +      matEndDate
                                                                                                                                                                                                                                                                                                                                      +      (dateChange)="dateChangedManually()"
                                                                                                                                                                                                                                                                                                                                      +      [(ngModel)]="toDate"
                                                                                                                                                                                                                                                                                                                                      +      i18n-placeholder="Date selection"
                                                                                                                                                                                                                                                                                                                                      +      placeholder="End date"
                                                                                                                                                                                                                                                                                                                                      +    />
                                                                                                                                                                                                                                                                                                                                      +  </mat-date-range-input>
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +  <mat-datepicker-toggle
                                                                                                                                                                                                                                                                                                                                      +    matSuffix
                                                                                                                                                                                                                                                                                                                                      +    (click)="openDialog($event)"
                                                                                                                                                                                                                                                                                                                                      +  ></mat-datepicker-toggle>
                                                                                                                                                                                                                                                                                                                                      +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      + ./date-range-filter.component.scss +

                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DateRangeFilterPanelComponent.html b/documentation/components/DateRangeFilterPanelComponent.html new file mode 100644 index 0000000000..136e58146c --- /dev/null +++ b/documentation/components/DateRangeFilterPanelComponent.html @@ -0,0 +1,1074 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        + src/app/core/basic-datatypes/date/date-range-filter/date-range-filter-panel/date-range-filter-panel.component.ts +

                                                                                                                                                                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        +constructor(filter: DateFilter, dialogRef: MatDialogRef<DateRangeFilterPanelComponent>) +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                        filter + DateFilter<any> + + No +
                                                                                                                                                                                                                                                                                                                                        dialogRef + MatDialogRef<DateRangeFilterPanelComponent> + + No +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + preselectAllRange + + +
                                                                                                                                                                                                                                                                                                                                        +preselectAllRange() +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + preselectRange + + +
                                                                                                                                                                                                                                                                                                                                        +preselectRange(dateRangeOption) +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        NameOptional
                                                                                                                                                                                                                                                                                                                                        dateRangeOption + No +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + selectedRangeChange + + +
                                                                                                                                                                                                                                                                                                                                        +selectedRangeChange(selectedDate: Date) +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                        selectedDate + Date + + No +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + selectRangeAndClose + + +
                                                                                                                                                                                                                                                                                                                                        +selectRangeAndClose(index: number | "all") +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                        index + number | "all" + + No +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + unselectRange + + +
                                                                                                                                                                                                                                                                                                                                        +unselectRange() +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + comparisonRange + + +
                                                                                                                                                                                                                                                                                                                                        + Type : DateRange<Date> + +
                                                                                                                                                                                                                                                                                                                                        + Default value : new DateRange(null, null) +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + + Public + filter + + +
                                                                                                                                                                                                                                                                                                                                        + Type : DateFilter<any> + +
                                                                                                                                                                                                                                                                                                                                        + Decorators : +
                                                                                                                                                                                                                                                                                                                                        + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + selectedOption + + +
                                                                                                                                                                                                                                                                                                                                        + Type : DateRangeFilterConfigOption + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        + + + selectedRangeValue + + +
                                                                                                                                                                                                                                                                                                                                        + Type : DateRange<Date> + +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                        +  DateRange,
                                                                                                                                                                                                                                                                                                                                        +  MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
                                                                                                                                                                                                                                                                                                                                        +  MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                        +  MatDateSelectionModel,
                                                                                                                                                                                                                                                                                                                                        +  MatRangeDateSelectionModel,
                                                                                                                                                                                                                                                                                                                                        +} from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                        +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                        +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                        +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                        +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                        +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                        +import { DateRangeFilterConfigOption } from "../../../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                        +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                        +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                        +import { dateToString } from "../../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                        +import { DateFilter } from "../../../../filter/filters/dateFilter";
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +export const defaultDateFilters: DateRangeFilterConfigOption[] = [
                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                        +    label: $localize`:Filter label:Today`,
                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                        +    startOffsets: [{ amount: 0, unit: "weeks" }],
                                                                                                                                                                                                                                                                                                                                        +    endOffsets: [{ amount: 0, unit: "weeks" }],
                                                                                                                                                                                                                                                                                                                                        +    label: $localize`:Filter label:This week`,
                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                        +    startOffsets: [{ amount: -1, unit: "weeks" }],
                                                                                                                                                                                                                                                                                                                                        +    label: $localize`:Filter label:Since last week`,
                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                        +    startOffsets: [{ amount: 0, unit: "months" }],
                                                                                                                                                                                                                                                                                                                                        +    endOffsets: [{ amount: 0, unit: "months" }],
                                                                                                                                                                                                                                                                                                                                        +    label: $localize`:Filter label:This month`,
                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                        +    startOffsets: [{ amount: -1, unit: "months" }],
                                                                                                                                                                                                                                                                                                                                        +    endOffsets: [{ amount: -1, unit: "months" }],
                                                                                                                                                                                                                                                                                                                                        +    label: $localize`:Filter label:Last month`,
                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                        +];
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                        +  selector: "app-date-range-filter-panel",
                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./date-range-filter-panel.component.html",
                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./date-range-filter-panel.component.scss"],
                                                                                                                                                                                                                                                                                                                                        +  providers: [
                                                                                                                                                                                                                                                                                                                                        +    { provide: MatDateSelectionModel, useClass: MatRangeDateSelectionModel },
                                                                                                                                                                                                                                                                                                                                        +    MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                        +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                        +    MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                        +    FormsModule,
                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                        +export class DateRangeFilterPanelComponent {
                                                                                                                                                                                                                                                                                                                                        +  selectedRangeValue: DateRange<Date>;
                                                                                                                                                                                                                                                                                                                                        +  selectedOption: DateRangeFilterConfigOption;
                                                                                                                                                                                                                                                                                                                                        +  comparisonRange: DateRange<Date> = new DateRange(null, null);
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                        +    @Inject(MAT_DIALOG_DATA) public filter: DateFilter<any>,
                                                                                                                                                                                                                                                                                                                                        +    private dialogRef: MatDialogRef<DateRangeFilterPanelComponent>,
                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                        +    this.selectedRangeValue = new DateRange(
                                                                                                                                                                                                                                                                                                                                        +      this.filter.getDateRange().start ?? new Date("1900-01-01"),
                                                                                                                                                                                                                                                                                                                                        +      this.filter.getDateRange().end ?? new Date("2999-12-31"),
                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                        +    this.selectedOption = this.filter.getSelectedOption();
                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  preselectRange(dateRangeOption): void {
                                                                                                                                                                                                                                                                                                                                        +    this.comparisonRange = calculateDateRange(dateRangeOption);
                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  preselectAllRange(): void {
                                                                                                                                                                                                                                                                                                                                        +    this.comparisonRange = new DateRange(
                                                                                                                                                                                                                                                                                                                                        +      new Date("1900-01-01"),
                                                                                                                                                                                                                                                                                                                                        +      new Date("2999-12-31"),
                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  unselectRange() {
                                                                                                                                                                                                                                                                                                                                        +    this.comparisonRange = new DateRange(null, null);
                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  selectRangeAndClose(index: number | "all"): void {
                                                                                                                                                                                                                                                                                                                                        +    if (typeof index === "number") {
                                                                                                                                                                                                                                                                                                                                        +      this.filter.selectedOptionValues = [index.toString()];
                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                        +      this.filter.selectedOptionValues = [];
                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                        +    this.dialogRef.close();
                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  selectedRangeChange(selectedDate: Date) {
                                                                                                                                                                                                                                                                                                                                        +    if (!this.selectedRangeValue?.start || this.selectedRangeValue?.end) {
                                                                                                                                                                                                                                                                                                                                        +      this.selectedRangeValue = new DateRange(selectedDate, null);
                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                        +      const start: Date = this.selectedRangeValue.start;
                                                                                                                                                                                                                                                                                                                                        +      this.filter.selectedOptionValues =
                                                                                                                                                                                                                                                                                                                                        +        start < selectedDate
                                                                                                                                                                                                                                                                                                                                        +          ? [dateToString(start), dateToString(selectedDate)]
                                                                                                                                                                                                                                                                                                                                        +          : [dateToString(selectedDate), dateToString(start)];
                                                                                                                                                                                                                                                                                                                                        +      this.dialogRef.close();
                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +export function calculateDateRange(
                                                                                                                                                                                                                                                                                                                                        +  dateRangeOption: DateRangeFilterConfigOption,
                                                                                                                                                                                                                                                                                                                                        +): DateRange<Date> {
                                                                                                                                                                                                                                                                                                                                        +  const startOffsets = dateRangeOption.startOffsets ?? [
                                                                                                                                                                                                                                                                                                                                        +    { amount: 0, unit: "days" },
                                                                                                                                                                                                                                                                                                                                        +  ];
                                                                                                                                                                                                                                                                                                                                        +  const endOffsets = dateRangeOption.endOffsets ?? [
                                                                                                                                                                                                                                                                                                                                        +    { amount: 0, unit: "days" },
                                                                                                                                                                                                                                                                                                                                        +  ];
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  const start = moment();
                                                                                                                                                                                                                                                                                                                                        +  const end = moment();
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  startOffsets.forEach((offset) => start.add(offset.amount, offset.unit));
                                                                                                                                                                                                                                                                                                                                        +  endOffsets.forEach((offset) => end.add(offset.amount, offset.unit));
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  start.startOf(startOffsets[0].unit);
                                                                                                                                                                                                                                                                                                                                        +  end.endOf(endOffsets[0].unit);
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +  return new DateRange(start.toDate(), end.toDate());
                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        <div mat-dialog-title i18n="Title of dialog">Select a date range</div>
                                                                                                                                                                                                                                                                                                                                        +<mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                        +  <div class="container">
                                                                                                                                                                                                                                                                                                                                        +    <mat-calendar
                                                                                                                                                                                                                                                                                                                                        +      class="calendar"
                                                                                                                                                                                                                                                                                                                                        +      (selectedChange)="selectedRangeChange($event)"
                                                                                                                                                                                                                                                                                                                                        +      [selected]="selectedRangeValue"
                                                                                                                                                                                                                                                                                                                                        +      [comparisonStart]="comparisonRange.start"
                                                                                                                                                                                                                                                                                                                                        +      [comparisonEnd]="comparisonRange.end"
                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                        +    </mat-calendar>
                                                                                                                                                                                                                                                                                                                                        +    <div class="panel">
                                                                                                                                                                                                                                                                                                                                        +      <div>
                                                                                                                                                                                                                                                                                                                                        +        <button
                                                                                                                                                                                                                                                                                                                                        +          class="button"
                                                                                                                                                                                                                                                                                                                                        +          mat-button
                                                                                                                                                                                                                                                                                                                                        +          color="primary"
                                                                                                                                                                                                                                                                                                                                        +          (mouseenter)="preselectAllRange()"
                                                                                                                                                                                                                                                                                                                                        +          (mouseleave)="unselectRange()"
                                                                                                                                                                                                                                                                                                                                        +          (click)="selectRangeAndClose('all')"
                                                                                                                                                                                                                                                                                                                                        +          [class.selected-option]="filter.selectedOptionValues.length === 0"
                                                                                                                                                                                                                                                                                                                                        +        >
                                                                                                                                                                                                                                                                                                                                        +          All
                                                                                                                                                                                                                                                                                                                                        +        </button>
                                                                                                                                                                                                                                                                                                                                        +      </div>
                                                                                                                                                                                                                                                                                                                                        +      <div
                                                                                                                                                                                                                                                                                                                                        +        *ngFor="
                                                                                                                                                                                                                                                                                                                                        +          let item of filter.rangeOptions;
                                                                                                                                                                                                                                                                                                                                        +          let selectedIndexOfDateRanges = index
                                                                                                                                                                                                                                                                                                                                        +        "
                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                        +        <button
                                                                                                                                                                                                                                                                                                                                        +          class="button"
                                                                                                                                                                                                                                                                                                                                        +          mat-button
                                                                                                                                                                                                                                                                                                                                        +          color="primary"
                                                                                                                                                                                                                                                                                                                                        +          [class.selected-option]="item === selectedOption"
                                                                                                                                                                                                                                                                                                                                        +          (mouseenter)="preselectRange(item)"
                                                                                                                                                                                                                                                                                                                                        +          (mouseleave)="unselectRange()"
                                                                                                                                                                                                                                                                                                                                        +          (click)="selectRangeAndClose(selectedIndexOfDateRanges)"
                                                                                                                                                                                                                                                                                                                                        +        >
                                                                                                                                                                                                                                                                                                                                        +          {{ item.label }}
                                                                                                                                                                                                                                                                                                                                        +        </button>
                                                                                                                                                                                                                                                                                                                                        +      </div>
                                                                                                                                                                                                                                                                                                                                        +    </div>
                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                        +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        + ./date-range-filter-panel.component.scss +

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        .container {
                                                                                                                                                                                                                                                                                                                                        +  display: flex;
                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +.calendar {
                                                                                                                                                                                                                                                                                                                                        +  width: 60%;
                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +.panel {
                                                                                                                                                                                                                                                                                                                                        +  width: 40%;
                                                                                                                                                                                                                                                                                                                                        +  margin: auto;
                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +.button {
                                                                                                                                                                                                                                                                                                                                        +  display: block;
                                                                                                                                                                                                                                                                                                                                        +  text-align: left;
                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +.selected-option {
                                                                                                                                                                                                                                                                                                                                        +  font-weight: bold;
                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DefaultValueOptionsComponent.html b/documentation/components/DefaultValueOptionsComponent.html new file mode 100644 index 0000000000..1684bcf756 --- /dev/null +++ b/documentation/components/DefaultValueOptionsComponent.html @@ -0,0 +1,1136 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          + src/app/core/admin/admin-entity-details/admin-entity-field/default-value-options/default-value-options.component.ts +

                                                                                                                                                                                                                                                                                                                                          + + + + +

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          + OnChanges +

                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Outputs
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          +constructor(entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                          entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + entityType +
                                                                                                                                                                                                                                                                                                                                          + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + value +
                                                                                                                                                                                                                                                                                                                                          + Type : DefaultValueConfig + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          Outputs

                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + valueChange +
                                                                                                                                                                                                                                                                                                                                          + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + + clearDefaultValue + + +
                                                                                                                                                                                                                                                                                                                                          +clearDefaultValue() +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + + availableInheritanceAttributes + + +
                                                                                                                                                                                                                                                                                                                                          + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + + currentInheritanceFields + + +
                                                                                                                                                                                                                                                                                                                                          + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + + form + + +
                                                                                                                                                                                                                                                                                                                                          + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + + + inheritedFieldSelectElement + + +
                                                                                                                                                                                                                                                                                                                                          + Type : MatSelect + +
                                                                                                                                                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                                                                                                                                                          + + @ViewChild('inheritedFieldSelect')
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + + + inputElement + + +
                                                                                                                                                                                                                                                                                                                                          + Type : ElementRef + +
                                                                                                                                                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                                                                                                                                                          + + @ViewChild('inputElement')
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          + + + mode + + +
                                                                                                                                                                                                                                                                                                                                          + Type : DefaultValueMode + +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          import {
                                                                                                                                                                                                                                                                                                                                          +  Component,
                                                                                                                                                                                                                                                                                                                                          +  ElementRef,
                                                                                                                                                                                                                                                                                                                                          +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                          +  Input,
                                                                                                                                                                                                                                                                                                                                          +  OnChanges,
                                                                                                                                                                                                                                                                                                                                          +  Output,
                                                                                                                                                                                                                                                                                                                                          +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                          +  ViewChild,
                                                                                                                                                                                                                                                                                                                                          +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                          +  DefaultValueConfig,
                                                                                                                                                                                                                                                                                                                                          +  DefaultValueMode,
                                                                                                                                                                                                                                                                                                                                          +} from "../../../../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                          +  MatError,
                                                                                                                                                                                                                                                                                                                                          +  MatFormField,
                                                                                                                                                                                                                                                                                                                                          +  MatLabel,
                                                                                                                                                                                                                                                                                                                                          +  MatSuffix,
                                                                                                                                                                                                                                                                                                                                          +} from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                          +import { MatInput } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                          +  FormControl,
                                                                                                                                                                                                                                                                                                                                          +  FormGroup,
                                                                                                                                                                                                                                                                                                                                          +  FormsModule,
                                                                                                                                                                                                                                                                                                                                          +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                          +  ValidatorFn,
                                                                                                                                                                                                                                                                                                                                          +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                          +  MatButtonToggle,
                                                                                                                                                                                                                                                                                                                                          +  MatButtonToggleGroup,
                                                                                                                                                                                                                                                                                                                                          +} from "@angular/material/button-toggle";
                                                                                                                                                                                                                                                                                                                                          +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                          +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                          +import { MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                          +import { MatOption, MatSelect } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                          +import { asArray } from "../../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                          +import { EntityFieldLabelComponent } from "../../../../common-components/entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                                                                                                          +import { EntityConstructor } from "../../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                          +import { EntityDatatype } from "../../../../basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                          +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                          +  selector: "app-default-value-options",
                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                          +    MatFormField,
                                                                                                                                                                                                                                                                                                                                          +    MatLabel,
                                                                                                                                                                                                                                                                                                                                          +    MatError,
                                                                                                                                                                                                                                                                                                                                          +    MatInput,
                                                                                                                                                                                                                                                                                                                                          +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                          +    FormsModule,
                                                                                                                                                                                                                                                                                                                                          +    MatButtonToggleGroup,
                                                                                                                                                                                                                                                                                                                                          +    MatButtonToggle,
                                                                                                                                                                                                                                                                                                                                          +    MatTooltip,
                                                                                                                                                                                                                                                                                                                                          +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                          +    MatSuffix,
                                                                                                                                                                                                                                                                                                                                          +    MatIconButton,
                                                                                                                                                                                                                                                                                                                                          +    MatSelect,
                                                                                                                                                                                                                                                                                                                                          +    MatOption,
                                                                                                                                                                                                                                                                                                                                          +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./default-value-options.component.html",
                                                                                                                                                                                                                                                                                                                                          +  styleUrl: "./default-value-options.component.scss",
                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                          +export class DefaultValueOptionsComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                          +  @Input() value: DefaultValueConfig;
                                                                                                                                                                                                                                                                                                                                          +  @Output() valueChange = new EventEmitter<DefaultValueConfig>();
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  @Input() entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  form: FormGroup;
                                                                                                                                                                                                                                                                                                                                          +  mode: DefaultValueMode;
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  @ViewChild("inputElement") inputElement: ElementRef;
                                                                                                                                                                                                                                                                                                                                          +  @ViewChild("inheritedFieldSelect") inheritedFieldSelectElement: MatSelect;
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  availableInheritanceAttributes: string[];
                                                                                                                                                                                                                                                                                                                                          +  currentInheritanceFields: {
                                                                                                                                                                                                                                                                                                                                          +    localAttribute: string;
                                                                                                                                                                                                                                                                                                                                          +    referencedEntityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                          +    availableFields: string[];
                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  constructor(private entityRegistry: EntityRegistry) {
                                                                                                                                                                                                                                                                                                                                          +    this.initForm();
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  private initForm() {
                                                                                                                                                                                                                                                                                                                                          +    this.form = new FormGroup(
                                                                                                                                                                                                                                                                                                                                          +      {
                                                                                                                                                                                                                                                                                                                                          +        mode: new FormControl(this.value?.mode),
                                                                                                                                                                                                                                                                                                                                          +        value: new FormControl(this.value?.value, {
                                                                                                                                                                                                                                                                                                                                          +          validators: [this.requiredForMode(["static", "dynamic"])],
                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                          +        localAttribute: new FormControl(this.value?.localAttribute, {
                                                                                                                                                                                                                                                                                                                                          +          validators: [this.requiredForMode("inherited")],
                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                          +        field: new FormControl(this.value?.field, {
                                                                                                                                                                                                                                                                                                                                          +          validators: [this.requiredForMode("inherited")],
                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                                          +      { updateOn: "blur" },
                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    this.form
                                                                                                                                                                                                                                                                                                                                          +      .get("mode")
                                                                                                                                                                                                                                                                                                                                          +      .valueChanges.subscribe((mode) => this.switchMode(mode));
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("value").valueChanges.subscribe((value) => {
                                                                                                                                                                                                                                                                                                                                          +      if (!this.mode && !!value) {
                                                                                                                                                                                                                                                                                                                                          +        // set default mode as "static" after user started typing a value
                                                                                                                                                                                                                                                                                                                                          +        this.mode = "static";
                                                                                                                                                                                                                                                                                                                                          +        this.form.get("mode").setValue(this.mode, { emitEvent: false });
                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                          +    this.form
                                                                                                                                                                                                                                                                                                                                          +      .get("localAttribute")
                                                                                                                                                                                                                                                                                                                                          +      .valueChanges.subscribe((v) => this.updateCurrentInheritanceFields(v));
                                                                                                                                                                                                                                                                                                                                          +    this.form.valueChanges
                                                                                                                                                                                                                                                                                                                                          +      .pipe(
                                                                                                                                                                                                                                                                                                                                          +        filter((v) => {
                                                                                                                                                                                                                                                                                                                                          +          this.form
                                                                                                                                                                                                                                                                                                                                          +            .get("localAttribute")
                                                                                                                                                                                                                                                                                                                                          +            .updateValueAndValidity({ emitEvent: false });
                                                                                                                                                                                                                                                                                                                                          +          this.form.get("field").updateValueAndValidity({ emitEvent: false });
                                                                                                                                                                                                                                                                                                                                          +          this.form.get("value").updateValueAndValidity({ emitEvent: false });
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +          return this.form.valid;
                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                          +      )
                                                                                                                                                                                                                                                                                                                                          +      .subscribe(() => this.emitValue());
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                          +    if (changes.value) {
                                                                                                                                                                                                                                                                                                                                          +      this.updateForm(this.value);
                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                          +    if (changes.entityType) {
                                                                                                                                                                                                                                                                                                                                          +      this.updateAvailableInheritanceAttributes();
                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  private updateForm(newValue: DefaultValueConfig) {
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("mode").setValue(newValue?.mode);
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("value").setValue(newValue?.value);
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("localAttribute").setValue(newValue?.localAttribute);
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("field").setValue(newValue?.field);
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    this.mode = newValue?.mode;
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  private switchMode(mode: DefaultValueMode) {
                                                                                                                                                                                                                                                                                                                                          +    this.mode = mode;
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("value").setValue(null);
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("localAttribute").setValue(null);
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("field").setValue(null);
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  private emitValue() {
                                                                                                                                                                                                                                                                                                                                          +    let newConfigValue: DefaultValueConfig | undefined = undefined;
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    switch (this.mode) {
                                                                                                                                                                                                                                                                                                                                          +      case "static":
                                                                                                                                                                                                                                                                                                                                          +      case "dynamic":
                                                                                                                                                                                                                                                                                                                                          +        newConfigValue = {
                                                                                                                                                                                                                                                                                                                                          +          mode: this.mode,
                                                                                                                                                                                                                                                                                                                                          +          value: this.form.get("value").value,
                                                                                                                                                                                                                                                                                                                                          +        };
                                                                                                                                                                                                                                                                                                                                          +        break;
                                                                                                                                                                                                                                                                                                                                          +      case "inherited":
                                                                                                                                                                                                                                                                                                                                          +        newConfigValue = {
                                                                                                                                                                                                                                                                                                                                          +          mode: this.mode,
                                                                                                                                                                                                                                                                                                                                          +          localAttribute: this.form.get("localAttribute").value,
                                                                                                                                                                                                                                                                                                                                          +          field: this.form.get("field").value,
                                                                                                                                                                                                                                                                                                                                          +        };
                                                                                                                                                                                                                                                                                                                                          +        break;
                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    if (JSON.stringify(newConfigValue) !== JSON.stringify(this.value)) {
                                                                                                                                                                                                                                                                                                                                          +      this.value = newConfigValue;
                                                                                                                                                                                                                                                                                                                                          +      this.valueChange.emit(newConfigValue);
                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  private requiredForMode(
                                                                                                                                                                                                                                                                                                                                          +    mode: DefaultValueMode | DefaultValueMode[],
                                                                                                                                                                                                                                                                                                                                          +  ): ValidatorFn {
                                                                                                                                                                                                                                                                                                                                          +    const modes = asArray(mode);
                                                                                                                                                                                                                                                                                                                                          +    return (control) => {
                                                                                                                                                                                                                                                                                                                                          +      if (modes.includes(this.form?.get("mode")?.value) && !control.value) {
                                                                                                                                                                                                                                                                                                                                          +        return { requiredForMode: true };
                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                          +      return null;
                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  private updateAvailableInheritanceAttributes() {
                                                                                                                                                                                                                                                                                                                                          +    this.availableInheritanceAttributes = Array.from(
                                                                                                                                                                                                                                                                                                                                          +      this.entityType.schema.entries(),
                                                                                                                                                                                                                                                                                                                                          +    )
                                                                                                                                                                                                                                                                                                                                          +      .filter(([_, schema]) => schema.dataType === EntityDatatype.dataType)
                                                                                                                                                                                                                                                                                                                                          +      .map(([id]) => id);
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  private updateCurrentInheritanceFields(localAttribute: string) {
                                                                                                                                                                                                                                                                                                                                          +    this.form.get("field").setValue(null);
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    if (!localAttribute) {
                                                                                                                                                                                                                                                                                                                                          +      this.currentInheritanceFields = undefined;
                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    const fieldSchema = this.entityType.schema.get(localAttribute);
                                                                                                                                                                                                                                                                                                                                          +    const referencedEntityType: EntityConstructor = !!fieldSchema
                                                                                                                                                                                                                                                                                                                                          +      ? this.entityRegistry.get(fieldSchema?.additional)
                                                                                                                                                                                                                                                                                                                                          +      : undefined;
                                                                                                                                                                                                                                                                                                                                          +    if (!referencedEntityType) {
                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    const availableFields = Array.from(referencedEntityType.schema.entries())
                                                                                                                                                                                                                                                                                                                                          +      .filter(([_, schema]) => !!schema.label) // only "user-facing" fields (i.e. with label)
                                                                                                                                                                                                                                                                                                                                          +      .map(([id]) => id);
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    this.currentInheritanceFields = {
                                                                                                                                                                                                                                                                                                                                          +      localAttribute,
                                                                                                                                                                                                                                                                                                                                          +      referencedEntityType,
                                                                                                                                                                                                                                                                                                                                          +      availableFields,
                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    setTimeout(() => this.inheritedFieldSelectElement.open());
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  clearDefaultValue() {
                                                                                                                                                                                                                                                                                                                                          +    this.updateForm(undefined);
                                                                                                                                                                                                                                                                                                                                          +    setTimeout(() => this.inputElement.nativeElement.blur(), 100);
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          <mat-form-field [formGroup]="form" floatLabel="always">
                                                                                                                                                                                                                                                                                                                                          +  <mat-label i18n>Default Value</mat-label>
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  <div class="flex-row gap-regular align-center">
                                                                                                                                                                                                                                                                                                                                          +    @switch (mode) {
                                                                                                                                                                                                                                                                                                                                          +      @default {
                                                                                                                                                                                                                                                                                                                                          +        <input
                                                                                                                                                                                                                                                                                                                                          +          #inputElement
                                                                                                                                                                                                                                                                                                                                          +          matInput
                                                                                                                                                                                                                                                                                                                                          +          formControlName="value"
                                                                                                                                                                                                                                                                                                                                          +          placeholder="no default value"
                                                                                                                                                                                                                                                                                                                                          +          i18n-placeholder
                                                                                                                                                                                                                                                                                                                                          +        />
                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                          +      @case ("dynamic") {
                                                                                                                                                                                                                                                                                                                                          +        <mat-select formControlName="value">
                                                                                                                                                                                                                                                                                                                                          +          <mat-option
                                                                                                                                                                                                                                                                                                                                          +            value="$now"
                                                                                                                                                                                                                                                                                                                                          +            matTooltip="Fill the current date initially, when a record is created."
                                                                                                                                                                                                                                                                                                                                          +            i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +            i18n
                                                                                                                                                                                                                                                                                                                                          +            >Current Date</mat-option
                                                                                                                                                                                                                                                                                                                                          +          >
                                                                                                                                                                                                                                                                                                                                          +          <mat-option
                                                                                                                                                                                                                                                                                                                                          +            value="$current_user"
                                                                                                                                                                                                                                                                                                                                          +            matTooltip="Fill the currently logged in user, when a record is created."
                                                                                                                                                                                                                                                                                                                                          +            i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +            i18n
                                                                                                                                                                                                                                                                                                                                          +            >Current User</mat-option
                                                                                                                                                                                                                                                                                                                                          +          >
                                                                                                                                                                                                                                                                                                                                          +        </mat-select>
                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                          +      @case ("inherited") {
                                                                                                                                                                                                                                                                                                                                          +        <mat-select formControlName="localAttribute">
                                                                                                                                                                                                                                                                                                                                          +          <div
                                                                                                                                                                                                                                                                                                                                          +            class="select-dropdown-header"
                                                                                                                                                                                                                                                                                                                                          +            matTooltip="The field of this record that defines the related record from which you want to inherit a value."
                                                                                                                                                                                                                                                                                                                                          +            i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +            i18n
                                                                                                                                                                                                                                                                                                                                          +          >
                                                                                                                                                                                                                                                                                                                                          +            Inherit from linked record:
                                                                                                                                                                                                                                                                                                                                          +          </div>
                                                                                                                                                                                                                                                                                                                                          +          @for (attr of availableInheritanceAttributes; track attr) {
                                                                                                                                                                                                                                                                                                                                          +            <mat-option [value]="attr">
                                                                                                                                                                                                                                                                                                                                          +              <app-entity-field-label
                                                                                                                                                                                                                                                                                                                                          +                [field]="attr"
                                                                                                                                                                                                                                                                                                                                          +                [entityType]="entityType"
                                                                                                                                                                                                                                                                                                                                          +              ></app-entity-field-label>
                                                                                                                                                                                                                                                                                                                                          +            </mat-option>
                                                                                                                                                                                                                                                                                                                                          +          }
                                                                                                                                                                                                                                                                                                                                          +        </mat-select>
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +        <mat-select formControlName="field" #inheritedFieldSelect>
                                                                                                                                                                                                                                                                                                                                          +          <div
                                                                                                                                                                                                                                                                                                                                          +            class="select-dropdown-header"
                                                                                                                                                                                                                                                                                                                                          +            matTooltip="The field of the linked record from which the value is copied into this field."
                                                                                                                                                                                                                                                                                                                                          +            i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +            i18n
                                                                                                                                                                                                                                                                                                                                          +          >
                                                                                                                                                                                                                                                                                                                                          +            Inherited field of linked record:
                                                                                                                                                                                                                                                                                                                                          +          </div>
                                                                                                                                                                                                                                                                                                                                          +          @for (
                                                                                                                                                                                                                                                                                                                                          +            field of currentInheritanceFields?.availableFields;
                                                                                                                                                                                                                                                                                                                                          +            track field
                                                                                                                                                                                                                                                                                                                                          +          ) {
                                                                                                                                                                                                                                                                                                                                          +            <mat-option [value]="field">
                                                                                                                                                                                                                                                                                                                                          +              <app-entity-field-label
                                                                                                                                                                                                                                                                                                                                          +                [field]="field"
                                                                                                                                                                                                                                                                                                                                          +                [entityType]="currentInheritanceFields?.referencedEntityType"
                                                                                                                                                                                                                                                                                                                                          +              ></app-entity-field-label>
                                                                                                                                                                                                                                                                                                                                          +            </mat-option>
                                                                                                                                                                                                                                                                                                                                          +          }
                                                                                                                                                                                                                                                                                                                                          +        </mat-select>
                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    <mat-button-toggle-group
                                                                                                                                                                                                                                                                                                                                          +      formControlName="mode"
                                                                                                                                                                                                                                                                                                                                          +      aria-label="default value mode"
                                                                                                                                                                                                                                                                                                                                          +      hideSingleSelectionIndicator
                                                                                                                                                                                                                                                                                                                                          +      style="flex: none"
                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                          +      <mat-button-toggle
                                                                                                                                                                                                                                                                                                                                          +        value="static"
                                                                                                                                                                                                                                                                                                                                          +        matTooltip="simple, fixed default value"
                                                                                                                                                                                                                                                                                                                                          +        i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                          +        <fa-icon icon="circle"></fa-icon>
                                                                                                                                                                                                                                                                                                                                          +      </mat-button-toggle>
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +      <mat-button-toggle
                                                                                                                                                                                                                                                                                                                                          +        value="dynamic"
                                                                                                                                                                                                                                                                                                                                          +        matTooltip="dynamic placeholder (e.g. current date or user)"
                                                                                                                                                                                                                                                                                                                                          +        i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                          +        <fa-icon icon="circle-left"></fa-icon>
                                                                                                                                                                                                                                                                                                                                          +      </mat-button-toggle>
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +      <mat-button-toggle
                                                                                                                                                                                                                                                                                                                                          +        value="inherited"
                                                                                                                                                                                                                                                                                                                                          +        matTooltip="value inherited from the value of another, linked record (requires another field in this record type to be a link to a record)"
                                                                                                                                                                                                                                                                                                                                          +        i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +        [disabled]="!(availableInheritanceAttributes?.length > 0)"
                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                          +        <fa-icon icon="circle-nodes"></fa-icon>
                                                                                                                                                                                                                                                                                                                                          +      </mat-button-toggle>
                                                                                                                                                                                                                                                                                                                                          +    </mat-button-toggle-group>
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +    <button
                                                                                                                                                                                                                                                                                                                                          +      mat-icon-button
                                                                                                                                                                                                                                                                                                                                          +      matIconSuffix
                                                                                                                                                                                                                                                                                                                                          +      matTooltip="Remove default value"
                                                                                                                                                                                                                                                                                                                                          +      i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                          +      (click)="clearDefaultValue()"
                                                                                                                                                                                                                                                                                                                                          +      color="{{ form.invalid ? 'accent' : '' }}"
                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                          +      <fa-icon icon="times"></fa-icon>
                                                                                                                                                                                                                                                                                                                                          +    </button>
                                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +  @if (form.invalid) {
                                                                                                                                                                                                                                                                                                                                          +    <mat-error i18n="error message"
                                                                                                                                                                                                                                                                                                                                          +      >Select default value or clear default value mode</mat-error
                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                          +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DemoDataGeneratingProgressDialogComponent.html b/documentation/components/DemoDataGeneratingProgressDialogComponent.html new file mode 100644 index 0000000000..37db2cc1d7 --- /dev/null +++ b/documentation/components/DemoDataGeneratingProgressDialogComponent.html @@ -0,0 +1,325 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            + src/app/core/demo-data/demo-data-generating-progress-dialog.component.ts +

                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            Loading box during demo data generation.

                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            see DemoDataModule

                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                            + * Loading box during demo data generation.
                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                            + * see {@link DemoDataModule}
                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                            +  template: `
                                                                                                                                                                                                                                                                                                                                            +    <mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                            +      <p i18n>Generating sample data for this demo ...</p>
                                                                                                                                                                                                                                                                                                                                            +      <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                            +    </mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                            +  `,
                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                            +export class DemoDataGeneratingProgressDialogComponent {}
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DialogButtonsComponent.html b/documentation/components/DialogButtonsComponent.html new file mode 100644 index 0000000000..f1be6070f4 --- /dev/null +++ b/documentation/components/DialogButtonsComponent.html @@ -0,0 +1,1037 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              + src/app/core/form-dialog/dialog-buttons/dialog-buttons.component.ts +

                                                                                                                                                                                                                                                                                                                                              + + + + +

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Outputs
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              +constructor(entityFormService: EntityFormService, dialog: MatDialogRef, alertService: AlertService, router: Router, ability: EntityAbility, unsavedChanges: UnsavedChangesService, viewContext: ViewComponentContext) +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                              entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                              dialog + MatDialogRef<any> + + No +
                                                                                                                                                                                                                                                                                                                                              alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                              router + Router + + No +
                                                                                                                                                                                                                                                                                                                                              ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                              unsavedChanges + UnsavedChangesService + + No +
                                                                                                                                                                                                                                                                                                                                              viewContext + ViewComponentContext + + No +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + entity +
                                                                                                                                                                                                                                                                                                                                              + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + form +
                                                                                                                                                                                                                                                                                                                                              + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              Outputs

                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + closeView +
                                                                                                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + + cancel + + +
                                                                                                                                                                                                                                                                                                                                              +cancel() +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + + close + + +
                                                                                                                                                                                                                                                                                                                                              +close(result?: any) +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                              result + any + + Yes +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + + onAction + + +
                                                                                                                                                                                                                                                                                                                                              +onAction(action: string) +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                              action + string + + No +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + + Async + save + + +
                                                                                                                                                                                                                                                                                                                                              + + save() +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              + + + detailsRoute + + +
                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              import {
                                                                                                                                                                                                                                                                                                                                              +  Component,
                                                                                                                                                                                                                                                                                                                                              +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                              +  Input,
                                                                                                                                                                                                                                                                                                                                              +  OnInit,
                                                                                                                                                                                                                                                                                                                                              +  Optional,
                                                                                                                                                                                                                                                                                                                                              +  Output,
                                                                                                                                                                                                                                                                                                                                              +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                              +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                              +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                              +import { MatDialogModule, MatDialogRef } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                              +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                              +import { FormGroup } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                              +import { InvalidFormFieldError } from "../../common-components/entity-form/invalid-form-field.error";
                                                                                                                                                                                                                                                                                                                                              +import { EntityFormService } from "../../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                              +import { AlertService } from "../../alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                              +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                              +import { Router, RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                              +import { EntityAbility } from "../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                              +import { UnsavedChangesService } from "../../entity-details/form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                              +import { EntityActionsMenuComponent } from "../../entity-details/entity-actions-menu/entity-actions-menu.component";
                                                                                                                                                                                                                                                                                                                                              +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                              +  selector: "app-dialog-buttons",
                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                              +    CommonModule,
                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                              +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                              +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                              +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                              +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                              +    RouterLink,
                                                                                                                                                                                                                                                                                                                                              +    EntityActionsMenuComponent,
                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./dialog-buttons.component.html",
                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./dialog-buttons.component.scss"],
                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                              +export class DialogButtonsComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                              +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                              +  @Input() form: FormGroup;
                                                                                                                                                                                                                                                                                                                                              +  detailsRoute: string;
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  @Output() closeView = new EventEmitter<any>();
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                              +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                              +    @Optional() private dialog: MatDialogRef<any>,
                                                                                                                                                                                                                                                                                                                                              +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                              +    private router: Router,
                                                                                                                                                                                                                                                                                                                                              +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                              +    private unsavedChanges: UnsavedChangesService,
                                                                                                                                                                                                                                                                                                                                              +    @Optional() protected viewContext: ViewComponentContext,
                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                              +    if (this.dialog) {
                                                                                                                                                                                                                                                                                                                                              +      this.initDialogSettings();
                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  private initDialogSettings() {
                                                                                                                                                                                                                                                                                                                                              +    this.dialog.disableClose = true;
                                                                                                                                                                                                                                                                                                                                              +    this.dialog.backdropClick().subscribe(() =>
                                                                                                                                                                                                                                                                                                                                              +      this.unsavedChanges.checkUnsavedChanges().then((confirmed) => {
                                                                                                                                                                                                                                                                                                                                              +        if (confirmed) {
                                                                                                                                                                                                                                                                                                                                              +          this.dialog.close();
                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                              +      }),
                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                              +    // This happens before the `canDeactivate` check and therefore does not warn when leaving
                                                                                                                                                                                                                                                                                                                                              +    this.dialog
                                                                                                                                                                                                                                                                                                                                              +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                              +      .subscribe(() => (this.unsavedChanges.pending = false));
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                              +    if (!this.entity.isNew) {
                                                                                                                                                                                                                                                                                                                                              +      if (this.ability.cannot("update", this.entity)) {
                                                                                                                                                                                                                                                                                                                                              +        this.form.disable();
                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                              +      this.initializeDetailsRouteIfAvailable();
                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  private initializeDetailsRouteIfAvailable() {
                                                                                                                                                                                                                                                                                                                                              +    let route = this.entity.getConstructor().route;
                                                                                                                                                                                                                                                                                                                                              +    if (
                                                                                                                                                                                                                                                                                                                                              +      route &&
                                                                                                                                                                                                                                                                                                                                              +      this.router.config.some((r) => "/" + r.path === route + "/:id")
                                                                                                                                                                                                                                                                                                                                              +    ) {
                                                                                                                                                                                                                                                                                                                                              +      this.detailsRoute = route + "/" + this.entity.getId(true);
                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  async save() {
                                                                                                                                                                                                                                                                                                                                              +    this.entityFormService
                                                                                                                                                                                                                                                                                                                                              +      .saveChanges(this.form, this.entity)
                                                                                                                                                                                                                                                                                                                                              +      .then((res) => {
                                                                                                                                                                                                                                                                                                                                              +        // Attachments are only saved once form is disabled
                                                                                                                                                                                                                                                                                                                                              +        this.form.disable();
                                                                                                                                                                                                                                                                                                                                              +        this.form.markAsPristine();
                                                                                                                                                                                                                                                                                                                                              +        this.close(res);
                                                                                                                                                                                                                                                                                                                                              +      })
                                                                                                                                                                                                                                                                                                                                              +      .catch((err) => {
                                                                                                                                                                                                                                                                                                                                              +        if (!(err instanceof InvalidFormFieldError)) {
                                                                                                                                                                                                                                                                                                                                              +          this.alertService.addDanger(err.message);
                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  cancel() {
                                                                                                                                                                                                                                                                                                                                              +    this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                              +    this.close();
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  close(result?: any) {
                                                                                                                                                                                                                                                                                                                                              +    this.dialog?.close(result);
                                                                                                                                                                                                                                                                                                                                              +    this.closeView.emit(result);
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +    this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +  onAction(action: string) {
                                                                                                                                                                                                                                                                                                                                              +    if (action === "delete") {
                                                                                                                                                                                                                                                                                                                                              +      this.close();
                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              <button
                                                                                                                                                                                                                                                                                                                                              +  mat-raised-button
                                                                                                                                                                                                                                                                                                                                              +  color="accent"
                                                                                                                                                                                                                                                                                                                                              +  [disabled]="!form.dirty"
                                                                                                                                                                                                                                                                                                                                              +  (click)="save()"
                                                                                                                                                                                                                                                                                                                                              +  angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                              +  [angularticsCategory]="entity?.getType()"
                                                                                                                                                                                                                                                                                                                                              +  angularticsAction="form_popup_save"
                                                                                                                                                                                                                                                                                                                                              +  i18n="Form save button"
                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                              +  Save
                                                                                                                                                                                                                                                                                                                                              +</button>
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +<button
                                                                                                                                                                                                                                                                                                                                              +  *ngIf="viewContext?.isDialog"
                                                                                                                                                                                                                                                                                                                                              +  mat-stroked-button
                                                                                                                                                                                                                                                                                                                                              +  (click)="cancel()"
                                                                                                                                                                                                                                                                                                                                              +  angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                              +  [angularticsCategory]="entity?.getType()"
                                                                                                                                                                                                                                                                                                                                              +  angularticsAction="form_popup_cancel"
                                                                                                                                                                                                                                                                                                                                              +  i18n="Form cancel button"
                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                              +  Cancel
                                                                                                                                                                                                                                                                                                                                              +</button>
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +<button
                                                                                                                                                                                                                                                                                                                                              +  *ngIf="detailsRoute && viewContext?.isDialog"
                                                                                                                                                                                                                                                                                                                                              +  mat-raised-button
                                                                                                                                                                                                                                                                                                                                              +  [routerLink]="detailsRoute"
                                                                                                                                                                                                                                                                                                                                              +  mat-dialog-close
                                                                                                                                                                                                                                                                                                                                              +  [disabled]="form.disabled"
                                                                                                                                                                                                                                                                                                                                              +  i18n="Form button to navigate to details page of entity"
                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                              +  Go to details
                                                                                                                                                                                                                                                                                                                                              +</button>
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +<app-entity-actions-menu [entity]="entity" (actionTriggered)="onAction($event)">
                                                                                                                                                                                                                                                                                                                                              +  <ng-content></ng-content>
                                                                                                                                                                                                                                                                                                                                              +</app-entity-actions-menu>
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              + ./dialog-buttons.component.scss +

                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              :host {
                                                                                                                                                                                                                                                                                                                                              +  display: flex;
                                                                                                                                                                                                                                                                                                                                              +  align-items: center;
                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DialogCloseComponent.html b/documentation/components/DialogCloseComponent.html new file mode 100644 index 0000000000..b7fdedf1bf --- /dev/null +++ b/documentation/components/DialogCloseComponent.html @@ -0,0 +1,444 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/dialog-close/dialog-close.component.ts +

                                                                                                                                                                                                                                                                                                                                                + + + + +

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                + AfterViewChecked +

                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                + + + + button + + +
                                                                                                                                                                                                                                                                                                                                                + Type : MatButton + +
                                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                                + + @ViewChild('button')
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                import { AfterViewChecked, Component, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                +import { MatButton, MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                +  selector: "app-dialog-close",
                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./dialog-close.component.html",
                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./dialog-close.component.scss"],
                                                                                                                                                                                                                                                                                                                                                +  imports: [FontAwesomeModule, MatButtonModule],
                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                +export class DialogCloseComponent implements AfterViewChecked {
                                                                                                                                                                                                                                                                                                                                                +  @ViewChild("button") button: MatButton;
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +  ngAfterViewChecked() {
                                                                                                                                                                                                                                                                                                                                                +    (<HTMLButtonElement>this.button._elementRef.nativeElement).blur();
                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                <button mat-icon-button class="overlay-close-button" #button>
                                                                                                                                                                                                                                                                                                                                                +  <fa-icon icon="times"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                +</button>
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                + ./dialog-close.component.scss +

                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                + * Positions the 'x' button that is shown for an overlay to
                                                                                                                                                                                                                                                                                                                                                + * the top-right of the overlay
                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                +.overlay-close-button {
                                                                                                                                                                                                                                                                                                                                                +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                +  top: 0;
                                                                                                                                                                                                                                                                                                                                                +  right: 0;
                                                                                                                                                                                                                                                                                                                                                +  border-radius: 0 4px 0 4px;
                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +:host ::ng-deep .mat-mdc-icon-button .mat-mdc-button-persistent-ripple {
                                                                                                                                                                                                                                                                                                                                                +  border-radius: 0 4px 0 4px;
                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DialogViewComponent.html b/documentation/components/DialogViewComponent.html new file mode 100644 index 0000000000..72591d0d2a --- /dev/null +++ b/documentation/components/DialogViewComponent.html @@ -0,0 +1,719 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  + src/app/core/ui/dialog-view/dialog-view.component.ts +

                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  Wrapper component for a modal/dialog view +that takes parameters from the dialog data and passes these on to normal @Input properties.

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  This allows to develop functional feature components in a way to easily reuse them for display +as a full page view or in a modal dialog. +(also see RoutedViewComponent)

                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  + AbstractViewComponent +

                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  +constructor(dialogData: DialogViewData<T>, entityConfigService: EntityConfigService, injector: Injector) +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                  dialogData + DialogViewData<T> + + No +
                                                                                                                                                                                                                                                                                                                                                  entityConfigService + EntityConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                  injector + Injector + + No +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  + + + component + + +
                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  + + + + componentInjector + + +
                                                                                                                                                                                                                                                                                                                                                  + Type : Injector | undefined + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Inherited from AbstractViewComponent +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  + + + config + + +
                                                                                                                                                                                                                                                                                                                                                  + Type : any + +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  + + + viewContext + + +
                                                                                                                                                                                                                                                                                                                                                  + Type : ViewComponentContext + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Inherited from AbstractViewComponent +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  import { Component, Inject, Injector } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                  +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                  +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                  +  MatDialogActions,
                                                                                                                                                                                                                                                                                                                                                  +  MatDialogClose,
                                                                                                                                                                                                                                                                                                                                                  +  MatDialogContent,
                                                                                                                                                                                                                                                                                                                                                  +  MatDialogTitle,
                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                  +import { EntityConfigService } from "../../entity/entity-config.service";
                                                                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                  +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                                                                                  +import { DialogCloseComponent } from "../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                  +import { CdkPortalOutlet } from "@angular/cdk/portal";
                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponentPipe } from "../../config/dynamic-components/dynamic-component.pipe";
                                                                                                                                                                                                                                                                                                                                                  +import { AbstractViewComponent } from "../abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                  + * Wrapper component for a modal/dialog view
                                                                                                                                                                                                                                                                                                                                                  + * that takes parameters from the dialog data and passes these on to normal @Input properties.
                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                  + * This allows to develop functional feature components in a way to easily reuse them for display
                                                                                                                                                                                                                                                                                                                                                  + * as a full page view or in a modal dialog.
                                                                                                                                                                                                                                                                                                                                                  + * (also see RoutedViewComponent)
                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                  +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                  +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                  +    ViewTitleComponent,
                                                                                                                                                                                                                                                                                                                                                  +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                  +    MatDialogClose,
                                                                                                                                                                                                                                                                                                                                                  +    CdkPortalOutlet,
                                                                                                                                                                                                                                                                                                                                                  +    DynamicComponentPipe,
                                                                                                                                                                                                                                                                                                                                                  +    MatDialogTitle,
                                                                                                                                                                                                                                                                                                                                                  +    MatDialogContent,
                                                                                                                                                                                                                                                                                                                                                  +    MatDialogActions,
                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./dialog-view.component.html",
                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./dialog-view.component.scss"],
                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                  +export class DialogViewComponent<T = any> extends AbstractViewComponent {
                                                                                                                                                                                                                                                                                                                                                  +  component: string;
                                                                                                                                                                                                                                                                                                                                                  +  config: any;
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                  +    @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                  +    dialogData: DialogViewData<T>,
                                                                                                                                                                                                                                                                                                                                                  +    private entityConfigService: EntityConfigService,
                                                                                                                                                                                                                                                                                                                                                  +    injector: Injector,
                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                  +    super(injector, true);
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +    this.component = dialogData.component;
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +    let viewConfig = {};
                                                                                                                                                                                                                                                                                                                                                  +    if (dialogData.entity) {
                                                                                                                                                                                                                                                                                                                                                  +      viewConfig =
                                                                                                                                                                                                                                                                                                                                                  +        this.entityConfigService.getDetailsViewConfig(
                                                                                                                                                                                                                                                                                                                                                  +          dialogData.entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                  +        )?.config ?? {};
                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +    if (dialogData.entity) {
                                                                                                                                                                                                                                                                                                                                                  +      viewConfig["entity"] = dialogData.entity;
                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +    this.config = {
                                                                                                                                                                                                                                                                                                                                                  +      ...viewConfig,
                                                                                                                                                                                                                                                                                                                                                  +      ...dialogData.config,
                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +  declare componentInjector: Injector | undefined;
                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +export interface DialogViewData<T = any> {
                                                                                                                                                                                                                                                                                                                                                  +  component: string;
                                                                                                                                                                                                                                                                                                                                                  +  config?: T;
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                  +   * (Optional) if an EntityDetails view, the full entity record to be displayed
                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                  +  entity?: Entity;
                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  <div mat-dialog-title>
                                                                                                                                                                                                                                                                                                                                                  +  <ng-container *ngTemplateOutlet="viewContext?.title?.template"></ng-container>
                                                                                                                                                                                                                                                                                                                                                  +  <div style="width: 24px"><!-- spacer for dialog close button--></div>
                                                                                                                                                                                                                                                                                                                                                  +  <app-dialog-close class="dialog-close" mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +<div class="dialog-container" mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                  +  <ng-container
                                                                                                                                                                                                                                                                                                                                                  +    *ngComponentOutlet="
                                                                                                                                                                                                                                                                                                                                                  +      component | dynamicComponent | async;
                                                                                                                                                                                                                                                                                                                                                  +      inputs: config;
                                                                                                                                                                                                                                                                                                                                                  +      injector: componentInjector
                                                                                                                                                                                                                                                                                                                                                  +    "
                                                                                                                                                                                                                                                                                                                                                  +  ></ng-container>
                                                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                  +  <ng-container
                                                                                                                                                                                                                                                                                                                                                  +    *ngTemplateOutlet="viewContext?.actions?.template"
                                                                                                                                                                                                                                                                                                                                                  +  ></ng-container>
                                                                                                                                                                                                                                                                                                                                                  +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  + ./dialog-view.component.scss +

                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +.dialog-container {
                                                                                                                                                                                                                                                                                                                                                  +  padding: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +.dialog-close {
                                                                                                                                                                                                                                                                                                                                                  +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                  +  top: -(sizes.$small);
                                                                                                                                                                                                                                                                                                                                                  +  right: 0;
                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +.mdc-dialog__title {
                                                                                                                                                                                                                                                                                                                                                  +  margin-top: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                  +.mdc-dialog__title::before {
                                                                                                                                                                                                                                                                                                                                                  +  display: none;
                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +.mdc-dialog__content {
                                                                                                                                                                                                                                                                                                                                                  +  /* allow "almost fullscreen" sized dialogs for complex views */
                                                                                                                                                                                                                                                                                                                                                  +  max-height: initial;
                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisabledWrapperComponent.html b/documentation/components/DisabledWrapperComponent.html new file mode 100644 index 0000000000..6f449d3e9c --- /dev/null +++ b/documentation/components/DisabledWrapperComponent.html @@ -0,0 +1,637 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    + src/app/core/permissions/permission-directive/disabled-wrapper.component.ts +

                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    This component is used to display a tooltip when a element is elementDisabled. +Normally, tooltips are not shown on elementDisabled elements, therefore this component creates the tooltip on a wrapping +div.

                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    + AfterViewInit +

                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    +constructor(renderer: Renderer2) +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                    renderer + Renderer2 + + No +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    + + elementDisabled +
                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    Whether the element should be disabled.

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    + + template +
                                                                                                                                                                                                                                                                                                                                                    + Type : TemplateRef<HTMLElement> + +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    A template of an HTMLElement that can be disabled. +See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled +for a list of HTML element with the disabled attribute.

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    + + text +
                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    The text which should be displayed in the tooltip

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    + + + + wrapper + + +
                                                                                                                                                                                                                                                                                                                                                    + Type : ElementRef<HTMLDivElement> + +
                                                                                                                                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                                                                                                                                    + + @ViewChild('wrapper')
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    import {
                                                                                                                                                                                                                                                                                                                                                    +  AfterViewInit,
                                                                                                                                                                                                                                                                                                                                                    +  Component,
                                                                                                                                                                                                                                                                                                                                                    +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                    +  Input,
                                                                                                                                                                                                                                                                                                                                                    +  Renderer2,
                                                                                                                                                                                                                                                                                                                                                    +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                    +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                    +import { NgTemplateOutlet } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                    + * This component is used to display a tooltip when a element is elementDisabled.
                                                                                                                                                                                                                                                                                                                                                    + * Normally, tooltips are not shown on elementDisabled elements, therefore this component creates the tooltip on a wrapping
                                                                                                                                                                                                                                                                                                                                                    + * div.
                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-disabled-wrapper",
                                                                                                                                                                                                                                                                                                                                                    +  template: ` <div
                                                                                                                                                                                                                                                                                                                                                    +    [matTooltip]="text"
                                                                                                                                                                                                                                                                                                                                                    +    [matTooltipDisabled]="!elementDisabled"
                                                                                                                                                                                                                                                                                                                                                    +    style="display: inline"
                                                                                                                                                                                                                                                                                                                                                    +    #wrapper
                                                                                                                                                                                                                                                                                                                                                    +  >
                                                                                                                                                                                                                                                                                                                                                    +    <ng-container *ngTemplateOutlet="template"></ng-container>
                                                                                                                                                                                                                                                                                                                                                    +  </div>`,
                                                                                                                                                                                                                                                                                                                                                    +  imports: [MatTooltipModule, NgTemplateOutlet],
                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                    +export class DisabledWrapperComponent implements AfterViewInit {
                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                    +   * A template of an HTMLElement that can be disabled.
                                                                                                                                                                                                                                                                                                                                                    +   * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled
                                                                                                                                                                                                                                                                                                                                                    +   * for a list of HTML element with the disabled attribute.
                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                    +  @Input() template: TemplateRef<HTMLElement>;
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                    +   * The text which should be displayed in the tooltip
                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                    +  @Input() text: string;
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                    +   * Whether the element should be disabled.
                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                    +  @Input() elementDisabled: boolean;
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +  @ViewChild("wrapper") wrapper: ElementRef<HTMLDivElement>;
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +  constructor(private renderer: Renderer2) {}
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +  ngAfterViewInit() {
                                                                                                                                                                                                                                                                                                                                                    +    if (!this.wrapper) {
                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +    const buttonElement =
                                                                                                                                                                                                                                                                                                                                                    +      this.wrapper.nativeElement.getElementsByTagName("button")[0];
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +    if (!buttonElement) {
                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +    if (this.elementDisabled) {
                                                                                                                                                                                                                                                                                                                                                    +      this.disable(buttonElement);
                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                    +      this.enable(buttonElement);
                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +  private enable(buttonElement: HTMLButtonElement) {
                                                                                                                                                                                                                                                                                                                                                    +    this.renderer.removeAttribute(buttonElement, "disabled");
                                                                                                                                                                                                                                                                                                                                                    +    this.renderer.removeClass(buttonElement, "mat-button-disabled");
                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +  private disable(buttonElement: HTMLButtonElement) {
                                                                                                                                                                                                                                                                                                                                                    +    this.renderer.addClass(buttonElement, "mat-button-disabled");
                                                                                                                                                                                                                                                                                                                                                    +    this.renderer.setAttribute(buttonElement, "disabled", "true");
                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DiscreteImportConfigComponent.html b/documentation/components/DiscreteImportConfigComponent.html new file mode 100644 index 0000000000..12d25738d9 --- /dev/null +++ b/documentation/components/DiscreteImportConfigComponent.html @@ -0,0 +1,820 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts +

                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      UI to configure import value mappings for discrete datatypes like boolean or enum.

                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                      • + Async + save +
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      +constructor(data: MappingDialogData, fb: FormBuilder, dialog: MatDialogRef, confirmation: ConfirmationDialogService, schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                      data + MappingDialogData + + No +
                                                                                                                                                                                                                                                                                                                                                      fb + FormBuilder + + No +
                                                                                                                                                                                                                                                                                                                                                      dialog + MatDialogRef<any> + + No +
                                                                                                                                                                                                                                                                                                                                                      confirmation + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                      schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      + + + Async + save + + +
                                                                                                                                                                                                                                                                                                                                                      + + save() +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      + + + component + + +
                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                      + Type : MappingDialogData + +
                                                                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                                                                      + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      + + + form + + +
                                                                                                                                                                                                                                                                                                                                                      + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      + + + schema + + +
                                                                                                                                                                                                                                                                                                                                                      + Type : EntitySchemaField + +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                      +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                      +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                      +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                      +import { FormBuilder, FormControl, FormGroup } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                      +import { ConfirmationDialogService } from "../../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                      +import { EntitySchemaService } from "../../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                      +import { MappingDialogData } from "../../../import/import-column-mapping/import-column-mapping.component";
                                                                                                                                                                                                                                                                                                                                                      +import { EntitySchemaField } from "../../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                      +import { KeyValuePipe, NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponentDirective } from "../../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                      +import { HelpButtonComponent } from "../../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                      + * UI to configure import value mappings for discrete datatypes like boolean or enum.
                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("DiscreteImportConfig")
                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-discrete-import-config",
                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./discrete-import-config.component.html",
                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./discrete-import-config.component.scss"],
                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                      +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                      +    KeyValuePipe,
                                                                                                                                                                                                                                                                                                                                                      +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                      +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                      +export class DiscreteImportConfigComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                      +  form: FormGroup;
                                                                                                                                                                                                                                                                                                                                                      +  component: string;
                                                                                                                                                                                                                                                                                                                                                      +  schema: EntitySchemaField;
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                      +    @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                      +    public data: MappingDialogData,
                                                                                                                                                                                                                                                                                                                                                      +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                      +    private dialog: MatDialogRef<any>,
                                                                                                                                                                                                                                                                                                                                                      +    private confirmation: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                      +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                      +    this.schema = this.data.entityType.schema.get(this.data.col.propertyName);
                                                                                                                                                                                                                                                                                                                                                      +    this.component = this.schemaService.getComponent(this.schema, "edit");
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +    this.form = this.fb.group(this.getFormValues(this.data.col.additional));
                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +  private getFormValues(additional: any) {
                                                                                                                                                                                                                                                                                                                                                      +    if (!additional) {
                                                                                                                                                                                                                                                                                                                                                      +      additional = {};
                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +    const formObj = {};
                                                                                                                                                                                                                                                                                                                                                      +    this.data.values
                                                                                                                                                                                                                                                                                                                                                      +      .filter((val) => !!val)
                                                                                                                                                                                                                                                                                                                                                      +      .forEach((val) => {
                                                                                                                                                                                                                                                                                                                                                      +        let selectedMapping;
                                                                                                                                                                                                                                                                                                                                                      +        if (additional.hasOwnProperty(val)) {
                                                                                                                                                                                                                                                                                                                                                      +          selectedMapping = this.schemaService.valueToEntityFormat(
                                                                                                                                                                                                                                                                                                                                                      +            additional[val],
                                                                                                                                                                                                                                                                                                                                                      +            this.schema,
                                                                                                                                                                                                                                                                                                                                                      +          );
                                                                                                                                                                                                                                                                                                                                                      +        }
                                                                                                                                                                                                                                                                                                                                                      +        formObj[val] = new FormControl(selectedMapping);
                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +    return formObj;
                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +  async save() {
                                                                                                                                                                                                                                                                                                                                                      +    const rawValues = this.getValuesInDatabaseFormat(this.form.getRawValue());
                                                                                                                                                                                                                                                                                                                                                      +    const allFilled = Object.values(rawValues).every((val) => !!val);
                                                                                                                                                                                                                                                                                                                                                      +    const confirmed =
                                                                                                                                                                                                                                                                                                                                                      +      allFilled ||
                                                                                                                                                                                                                                                                                                                                                      +      (await this.confirmation.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                      +        $localize`Ignore values?`,
                                                                                                                                                                                                                                                                                                                                                      +        $localize`Some values don't have a mapping and will not be imported. Are you sure you want to keep it like this?`,
                                                                                                                                                                                                                                                                                                                                                      +      ));
                                                                                                                                                                                                                                                                                                                                                      +    if (confirmed) {
                                                                                                                                                                                                                                                                                                                                                      +      this.data.col.additional = rawValues;
                                                                                                                                                                                                                                                                                                                                                      +      this.dialog.close();
                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                      +   * Transform object property values into their database format values to be stored.
                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                      +  private getValuesInDatabaseFormat(rawValues: any) {
                                                                                                                                                                                                                                                                                                                                                      +    for (const k in rawValues) {
                                                                                                                                                                                                                                                                                                                                                      +      rawValues[k] = this.schemaService.valueToDatabaseFormat(
                                                                                                                                                                                                                                                                                                                                                      +        rawValues[k],
                                                                                                                                                                                                                                                                                                                                                      +        this.schema,
                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +    return rawValues;
                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      <mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                      +  <table class="mapping-table">
                                                                                                                                                                                                                                                                                                                                                      +    <tr>
                                                                                                                                                                                                                                                                                                                                                      +      <th i18n="Import mapping header">Imported values</th>
                                                                                                                                                                                                                                                                                                                                                      +      <th i18n="Import mapping header">Assigned values</th>
                                                                                                                                                                                                                                                                                                                                                      +      <th>
                                                                                                                                                                                                                                                                                                                                                      +        <app-help-button
                                                                                                                                                                                                                                                                                                                                                      +          text="For each unique value from your imported data (left), select the category value from the system's data structure into which it will be transformed. The values you do not assign here will be ignored (remain empty) during import."
                                                                                                                                                                                                                                                                                                                                                      +          i18n-text="import - value mapping (enum) - help text"
                                                                                                                                                                                                                                                                                                                                                      +        ></app-help-button>
                                                                                                                                                                                                                                                                                                                                                      +      </th>
                                                                                                                                                                                                                                                                                                                                                      +    </tr>
                                                                                                                                                                                                                                                                                                                                                      +    <tr *ngFor="let ctrl of form.controls | keyvalue">
                                                                                                                                                                                                                                                                                                                                                      +      <td style="padding-right: 20px">{{ ctrl.key }}:</td>
                                                                                                                                                                                                                                                                                                                                                      +      <td>
                                                                                                                                                                                                                                                                                                                                                      +        <ng-container
                                                                                                                                                                                                                                                                                                                                                      +          [appDynamicComponent]="{
                                                                                                                                                                                                                                                                                                                                                      +            component: component,
                                                                                                                                                                                                                                                                                                                                                      +            config: {
                                                                                                                                                                                                                                                                                                                                                      +              formFieldConfig: schema,
                                                                                                                                                                                                                                                                                                                                                      +              formControl: ctrl.value,
                                                                                                                                                                                                                                                                                                                                                      +            },
                                                                                                                                                                                                                                                                                                                                                      +          }"
                                                                                                                                                                                                                                                                                                                                                      +        ></ng-container>
                                                                                                                                                                                                                                                                                                                                                      +      </td>
                                                                                                                                                                                                                                                                                                                                                      +    </tr>
                                                                                                                                                                                                                                                                                                                                                      +  </table>
                                                                                                                                                                                                                                                                                                                                                      +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                      +  <button mat-raised-button color="accent" (click)="save()" i18n>
                                                                                                                                                                                                                                                                                                                                                      +    Save & Close
                                                                                                                                                                                                                                                                                                                                                      +  </button>
                                                                                                                                                                                                                                                                                                                                                      +  <button mat-stroked-button matDialogClose i18n>Cancel</button>
                                                                                                                                                                                                                                                                                                                                                      +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      + ./discrete-import-config.component.scss +

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      .mapping-table {
                                                                                                                                                                                                                                                                                                                                                      +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                      +  max-width: 800px;
                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +.mapping-table th {
                                                                                                                                                                                                                                                                                                                                                      +  text-align: left;
                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +:host ::ng-deep mat-form-field {
                                                                                                                                                                                                                                                                                                                                                      +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                      +  max-width: 400px;
                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayAgeComponent.html b/documentation/components/DisplayAgeComponent.html new file mode 100644 index 0000000000..54964d67c4 --- /dev/null +++ b/documentation/components/DisplayAgeComponent.html @@ -0,0 +1,634 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        + src/app/core/basic-datatypes/date-with-age/display-age/display-age.component.ts +

                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        A component which displays the age of an entity with a DateOfBirth property. +The name of the property where the DateOfBirth is defined has to be passed as config. +e.g. show age of a child

                                                                                                                                                                                                                                                                                                                                                        +Example :
                                                                                                                                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                                                                                                                                        +  "id": "age",
                                                                                                                                                                                                                                                                                                                                                        +  "label": "Age",
                                                                                                                                                                                                                                                                                                                                                        +  "viewComponent": "DisplayAge",
                                                                                                                                                                                                                                                                                                                                                        +  "config": "dateOfBirth"
                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        + OnInit +

                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + + config +
                                                                                                                                                                                                                                                                                                                                                        + Type : C + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + + id +
                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + + tooltip +
                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + + value +
                                                                                                                                                                                                                                                                                                                                                        + Type : T + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + + + date + + +
                                                                                                                                                                                                                                                                                                                                                        + Type : DateWithAge + +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                        +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                        +import { DateWithAge } from "../dateWithAge";
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                        + * A component which displays the age of an entity with a DateOfBirth property.
                                                                                                                                                                                                                                                                                                                                                        + * The name of the property where the DateOfBirth is defined has to be passed as config.
                                                                                                                                                                                                                                                                                                                                                        + * e.g. show age of a child
                                                                                                                                                                                                                                                                                                                                                        + * ```json
                                                                                                                                                                                                                                                                                                                                                        + * {
                                                                                                                                                                                                                                                                                                                                                        + *   "id": "age",
                                                                                                                                                                                                                                                                                                                                                        + *   "label": "Age",
                                                                                                                                                                                                                                                                                                                                                        + *   "viewComponent": "DisplayAge",
                                                                                                                                                                                                                                                                                                                                                        + *   "config": "dateOfBirth"
                                                                                                                                                                                                                                                                                                                                                        + * }
                                                                                                                                                                                                                                                                                                                                                        + * ```
                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("DisplayAge")
                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-display-age",
                                                                                                                                                                                                                                                                                                                                                        +  template: "{{ date?.age }}",
                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                        +export class DisplayAgeComponent
                                                                                                                                                                                                                                                                                                                                                        +  extends ViewDirective<any, string>
                                                                                                                                                                                                                                                                                                                                                        +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                        +{
                                                                                                                                                                                                                                                                                                                                                        +  date: DateWithAge;
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                        +    this.date = this.entity[this.config];
                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayCalculatedValueComponent.html b/documentation/components/DisplayCalculatedValueComponent.html new file mode 100644 index 0000000000..932dd0a0ec --- /dev/null +++ b/documentation/components/DisplayCalculatedValueComponent.html @@ -0,0 +1,829 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/number/display-dynamic-percentage/display-calculated-value.component.ts +

                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Dynamically calculate a value based on values of given fields of the entity as configured.

                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + config +
                                                                                                                                                                                                                                                                                                                                                          + Type : C + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + id +
                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + tooltip +
                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + value +
                                                                                                                                                                                                                                                                                                                                                          + Type : T + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + + calculateValue + + +
                                                                                                                                                                                                                                                                                                                                                          +calculateValue() +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          dynamically calculate the value based on configured entity fields. +This is defined as a function to re-calculate on every change detection cycle as the value remains outdated otherwise.

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          + Returns : number + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + + calculationType + + +
                                                                                                                                                                                                                                                                                                                                                          + Type : CalculationType + +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + + color + + +
                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          "calculated" color for special calculation types

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                          +import { ViewDirective } from "app/core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponent } from "app/core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                          +import { DisplayPercentageComponent } from "../display-percentage/display-percentage.component";
                                                                                                                                                                                                                                                                                                                                                          +import { NgStyle } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                          + * Dynamically calculate a value based on values of given fields of the entity as configured.
                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                          +@DynamicComponent("DisplayDynamicPercentage")
                                                                                                                                                                                                                                                                                                                                                          +@DynamicComponent("DisplayCalculatedValue")
                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-display-calculated-value",
                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./display-calculated-value.component.html",
                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./display-calculated-value.component.scss"],
                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                          +  imports: [DisplayPercentageComponent, NgStyle],
                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                          +export class DisplayCalculatedValueComponent extends ViewDirective<
                                                                                                                                                                                                                                                                                                                                                          +  number,
                                                                                                                                                                                                                                                                                                                                                          +  {
                                                                                                                                                                                                                                                                                                                                                          +    calculation?: CalculationType;
                                                                                                                                                                                                                                                                                                                                                          +    decimalPlaces?: number;
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +    /**
                                                                                                                                                                                                                                                                                                                                                          +     * One or more IDs of the entity fields to use for the calculation
                                                                                                                                                                                                                                                                                                                                                          +     * (depends on calculation type)
                                                                                                                                                                                                                                                                                                                                                          +     */
                                                                                                                                                                                                                                                                                                                                                          +    valueFields?: string[];
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +    /** @deprecated for backward compatibility */
                                                                                                                                                                                                                                                                                                                                                          +    total?: string;
                                                                                                                                                                                                                                                                                                                                                          +    /** @deprecated for backward compatibility  */
                                                                                                                                                                                                                                                                                                                                                          +    actual?: string;
                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                          +> {
                                                                                                                                                                                                                                                                                                                                                          +  calculationType: CalculationType;
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                          +   * "calculated" color for special calculation types
                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                          +  color: string;
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                          +   * dynamically calculate the value based on configured entity fields.
                                                                                                                                                                                                                                                                                                                                                          +   * This is defined as a function to re-calculate on every change detection cycle as the value remains outdated otherwise.
                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                          +  calculateValue() {
                                                                                                                                                                                                                                                                                                                                                          +    if (!this.calculationType) {
                                                                                                                                                                                                                                                                                                                                                          +      this.calculationType =
                                                                                                                                                                                                                                                                                                                                                          +        this.config.calculation ?? CalculationType.Percentage;
                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +    let value: number;
                                                                                                                                                                                                                                                                                                                                                          +    switch (this.calculationType) {
                                                                                                                                                                                                                                                                                                                                                          +      case CalculationType.Percentage:
                                                                                                                                                                                                                                                                                                                                                          +        value = this._percentage();
                                                                                                                                                                                                                                                                                                                                                          +        break;
                                                                                                                                                                                                                                                                                                                                                          +      case CalculationType.BMI:
                                                                                                                                                                                                                                                                                                                                                          +        value = this._bmi();
                                                                                                                                                                                                                                                                                                                                                          +        this.color = this._bmiColor(value);
                                                                                                                                                                                                                                                                                                                                                          +        break;
                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +    return value;
                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +  private _percentage(): number {
                                                                                                                                                                                                                                                                                                                                                          +    const actual: number =
                                                                                                                                                                                                                                                                                                                                                          +      this.entity[this.config.valueFields?.[0] ?? this.config.actual];
                                                                                                                                                                                                                                                                                                                                                          +    const total: number =
                                                                                                                                                                                                                                                                                                                                                          +      this.entity[this.config.valueFields?.[1] ?? this.config.total];
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +    if (Number.isFinite(actual) && Number.isFinite(total) && total != 0) {
                                                                                                                                                                                                                                                                                                                                                          +      return (actual / total) * 100;
                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +  private _bmi(): number {
                                                                                                                                                                                                                                                                                                                                                          +    const weight: number = this.entity[this.config.valueFields[0]];
                                                                                                                                                                                                                                                                                                                                                          +    const height: number = this.entity[this.config.valueFields[1]];
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +    const bmi = weight / ((height / 100) * (height / 100));
                                                                                                                                                                                                                                                                                                                                                          +    return Math.round(bmi * 100) / 100;
                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                          +  private _bmiColor(bmi: number) {
                                                                                                                                                                                                                                                                                                                                                          +    if (Number.isNaN(bmi) || !Number.isFinite(bmi)) {
                                                                                                                                                                                                                                                                                                                                                          +      return "#DEDEDE";
                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                          +    if (bmi <= 16 || bmi >= 30) {
                                                                                                                                                                                                                                                                                                                                                          +      // critical
                                                                                                                                                                                                                                                                                                                                                          +      return "rgba(253,114,114,0.4)";
                                                                                                                                                                                                                                                                                                                                                          +    } else if (bmi >= 18 && bmi <= 25) {
                                                                                                                                                                                                                                                                                                                                                          +      // healthy
                                                                                                                                                                                                                                                                                                                                                          +      return "rgba(144,238,144,0.25)";
                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                          +      // not ideal
                                                                                                                                                                                                                                                                                                                                                          +      return "rgba(255,165,0,0.4)";
                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +export enum CalculationType {
                                                                                                                                                                                                                                                                                                                                                          +  Percentage = "percentage",
                                                                                                                                                                                                                                                                                                                                                          +  BMI = "bmi",
                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          @if (config?.calculation === "percentage") {
                                                                                                                                                                                                                                                                                                                                                          +  <app-display-percentage
                                                                                                                                                                                                                                                                                                                                                          +    [value]="calculateValue()"
                                                                                                                                                                                                                                                                                                                                                          +    [config]="config"
                                                                                                                                                                                                                                                                                                                                                          +  ></app-display-percentage>
                                                                                                                                                                                                                                                                                                                                                          +} @else {
                                                                                                                                                                                                                                                                                                                                                          +  <span [ngStyle]="{ background: color ?? 'inherit' }" class="value-box">{{
                                                                                                                                                                                                                                                                                                                                                          +    calculateValue()
                                                                                                                                                                                                                                                                                                                                                          +  }}</span>
                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          + ./display-calculated-value.component.scss +

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          .value-box {
                                                                                                                                                                                                                                                                                                                                                          +  padding: .5em;
                                                                                                                                                                                                                                                                                                                                                          +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayCheckmarkComponent.html b/documentation/components/DisplayCheckmarkComponent.html new file mode 100644 index 0000000000..ae3c7ec3af --- /dev/null +++ b/documentation/components/DisplayCheckmarkComponent.html @@ -0,0 +1,574 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            + src/app/core/basic-datatypes/boolean/display-checkmark/display-checkmark.component.ts +

                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            This component allows to display a boolean attribute of an entity. +It will display a checkmark when the attribute is true.

                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            + + config +
                                                                                                                                                                                                                                                                                                                                                            + Type : C + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            + + id +
                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            + + tooltip +
                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            + + value +
                                                                                                                                                                                                                                                                                                                                                            + Type : T + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                            +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                            +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                            + * This component allows to display a boolean attribute of an entity.
                                                                                                                                                                                                                                                                                                                                                            + * It will display a checkmark when the attribute is true.
                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                            +@DynamicComponent("DisplayCheckmark")
                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-display-tick",
                                                                                                                                                                                                                                                                                                                                                            +  template: `{{ value ? "✓" : "" }}`,
                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                            +export class DisplayCheckmarkComponent extends ViewDirective<boolean> {}
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayConfigurableEnumComponent.html b/documentation/components/DisplayConfigurableEnumComponent.html new file mode 100644 index 0000000000..96916db148 --- /dev/null +++ b/documentation/components/DisplayConfigurableEnumComponent.html @@ -0,0 +1,680 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              + src/app/core/basic-datatypes/configurable-enum/display-configurable-enum/display-configurable-enum.component.ts +

                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              This component displays a ConfigurableEnumValue as text. +If the value has a color property, it is used as the background color.

                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + + config +
                                                                                                                                                                                                                                                                                                                                                              + Type : C + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + + entity +
                                                                                                                                                                                                                                                                                                                                                              + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + + id +
                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + + tooltip +
                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + + value +
                                                                                                                                                                                                                                                                                                                                                              + Type : T + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + + + iterableValue + + +
                                                                                                                                                                                                                                                                                                                                                              + Type : ConfigurableEnumValue[] + +
                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                              +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                              +import { ConfigurableEnumValue } from "../configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                              +import { NgClass, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                              + * This component displays a {@link ConfigurableEnumValue} as text.
                                                                                                                                                                                                                                                                                                                                                              + * If the value has a `color` property, it is used as the background color.
                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("DisplayConfigurableEnum")
                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-display-configurable-enum",
                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./display-configurable-enum.component.html",
                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./display-configurable-enum.component.scss"],
                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                              +  imports: [NgForOf, NgIf, NgClass],
                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                              +export class DisplayConfigurableEnumComponent
                                                                                                                                                                                                                                                                                                                                                              +  extends ViewDirective<ConfigurableEnumValue | ConfigurableEnumValue[]>
                                                                                                                                                                                                                                                                                                                                                              +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                                                                                                                                                              +  iterableValue: ConfigurableEnumValue[] = [];
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                              +    this.initValue();
                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +  private initValue() {
                                                                                                                                                                                                                                                                                                                                                              +    if (!this.value) {
                                                                                                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +    if (Array.isArray(this.value)) {
                                                                                                                                                                                                                                                                                                                                                              +      this.iterableValue = this.value;
                                                                                                                                                                                                                                                                                                                                                              +    } else if (this.value) {
                                                                                                                                                                                                                                                                                                                                                              +      this.iterableValue = [this.value];
                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              <ng-container *ngFor="let val of iterableValue; let i = index">
                                                                                                                                                                                                                                                                                                                                                              +  <span
                                                                                                                                                                                                                                                                                                                                                              +    [style.background-color]="val.color"
                                                                                                                                                                                                                                                                                                                                                              +    [ngClass]="{ colored: val.color }"
                                                                                                                                                                                                                                                                                                                                                              +    >{{ val.label }}</span
                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                              +  <ng-container *ngIf="i !== iterableValue.length - 1">,&nbsp;</ng-container>
                                                                                                                                                                                                                                                                                                                                                              +</ng-container>
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              + ./display-configurable-enum.component.scss +

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              .colored {
                                                                                                                                                                                                                                                                                                                                                              +  padding: 5px;
                                                                                                                                                                                                                                                                                                                                                              +  border-radius: 4px;
                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayDateComponent.html b/documentation/components/DisplayDateComponent.html new file mode 100644 index 0000000000..435737b8d1 --- /dev/null +++ b/documentation/components/DisplayDateComponent.html @@ -0,0 +1,646 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                + src/app/core/basic-datatypes/date/display-date/display-date.component.ts +

                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                This component displays a date attribute using the shortDate format.

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Format of the date can be adjusted through config. +E.g. `"config": "yyyy-MM-dd

                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + + config +
                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:25 +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                formatting string for date pipe

                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + + displayAsAnonymized +
                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + + id +
                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + + value +
                                                                                                                                                                                                                                                                                                                                                                + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                + * This component displays a date attribute using the shortDate format.
                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                + * Format of the date can be adjusted through config.
                                                                                                                                                                                                                                                                                                                                                                + * E.g. `"config": "yyyy-MM-dd
                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("DisplayDate")
                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-display-date",
                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./display-date.component.html",
                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                +  imports: [DatePipe, NgIf, FontAwesomeModule, MatTooltipModule],
                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                +export class DisplayDateComponent extends ViewDirective<Date, string> {
                                                                                                                                                                                                                                                                                                                                                                +  @Input() displayAsAnonymized: boolean;
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +  /** formatting string for date pipe */
                                                                                                                                                                                                                                                                                                                                                                +  @Input() declare config: string;
                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                <ng-container
                                                                                                                                                                                                                                                                                                                                                                +  *ngIf="!(displayAsAnonymized || isPartiallyAnonymized); else anonymized"
                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                +  {{ value | date: config }}
                                                                                                                                                                                                                                                                                                                                                                +</ng-container>
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +<ng-template #anonymized>
                                                                                                                                                                                                                                                                                                                                                                +  {{ value | date: "YYYY" }}
                                                                                                                                                                                                                                                                                                                                                                +  <fa-icon
                                                                                                                                                                                                                                                                                                                                                                +    icon="warning"
                                                                                                                                                                                                                                                                                                                                                                +    matTooltip="This data has been partially anonymized."
                                                                                                                                                                                                                                                                                                                                                                +    i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                +  ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayEntityComponent.html b/documentation/components/DisplayEntityComponent.html new file mode 100644 index 0000000000..d975c49f7e --- /dev/null +++ b/documentation/components/DisplayEntityComponent.html @@ -0,0 +1,692 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/basic-datatypes/entity/display-entity/display-entity.component.ts +

                                                                                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  + OnInit +

                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + config +
                                                                                                                                                                                                                                                                                                                                                                  + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + id +
                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + value +
                                                                                                                                                                                                                                                                                                                                                                  + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + + Readonly + aggregationThreshold + + +
                                                                                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                  + Default value : 5 +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + + entityIds + + +
                                                                                                                                                                                                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                  +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                  +import { EntityBlockComponent } from "../entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                  +import { asArray } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("DisplayEntity")
                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-display-entity",
                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./display-entity.component.html",
                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./display-entity.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                  +  imports: [EntityBlockComponent],
                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                  +export class DisplayEntityComponent
                                                                                                                                                                                                                                                                                                                                                                  +  extends ViewDirective<string[] | string, string>
                                                                                                                                                                                                                                                                                                                                                                  +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                  +{
                                                                                                                                                                                                                                                                                                                                                                  +  readonly aggregationThreshold = 5;
                                                                                                                                                                                                                                                                                                                                                                  +  entityIds: string[];
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                  +    this.entityIds = this.value ? asArray(this.value) : [];
                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  @if (entityIds?.length < aggregationThreshold) {
                                                                                                                                                                                                                                                                                                                                                                  +  <!-- Display each entity -->
                                                                                                                                                                                                                                                                                                                                                                  +  @for (e of entityIds; track e) {
                                                                                                                                                                                                                                                                                                                                                                  +    <app-entity-block class="display-entity" [entityId]="e"></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                  +} @else {
                                                                                                                                                                                                                                                                                                                                                                  +  <!-- Only display summary -->
                                                                                                                                                                                                                                                                                                                                                                  +  <span i18n="Displaying the amount of involved entities|context 10 in total">
                                                                                                                                                                                                                                                                                                                                                                  +    {{ value?.length }} in total
                                                                                                                                                                                                                                                                                                                                                                  +  </span>
                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  + ./display-entity.component.scss +

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +.display-entity {
                                                                                                                                                                                                                                                                                                                                                                  +  display: inline-block;
                                                                                                                                                                                                                                                                                                                                                                  +  margin-right: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                  +  vertical-align: middle;
                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayImgComponent.html b/documentation/components/DisplayImgComponent.html new file mode 100644 index 0000000000..230c1a0646 --- /dev/null +++ b/documentation/components/DisplayImgComponent.html @@ -0,0 +1,607 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    + src/app/features/file/display-img/display-img.component.ts +

                                                                                                                                                                                                                                                                                                                                                                    + + + + +

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    +constructor(fileService: FileService) +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                    fileService + FileService + + No +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    + + defaultIcon +
                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    + + defaultImage +
                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    + + entity +
                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    + + imgProperty +
                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    + + + imgSrc + + +
                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                    +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                    +import { FileService } from "../file.service";
                                                                                                                                                                                                                                                                                                                                                                    +import { FaDynamicIconComponent } from "../../../core/common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-display-img",
                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./display-img.component.html",
                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./display-img.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                    +  imports: [FaDynamicIconComponent, NgIf],
                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                    +export class DisplayImgComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                    +  @Input() defaultImage: string;
                                                                                                                                                                                                                                                                                                                                                                    +  @Input() defaultIcon: string;
                                                                                                                                                                                                                                                                                                                                                                    +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                    +  @Input() imgProperty: string;
                                                                                                                                                                                                                                                                                                                                                                    +  imgSrc: string;
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +  constructor(private fileService: FileService) {}
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +  ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                    +    if (
                                                                                                                                                                                                                                                                                                                                                                    +      changes.hasOwnProperty("entity") ||
                                                                                                                                                                                                                                                                                                                                                                    +      changes.hasOwnProperty("property")
                                                                                                                                                                                                                                                                                                                                                                    +    ) {
                                                                                                                                                                                                                                                                                                                                                                    +      delete this.imgSrc;
                                                                                                                                                                                                                                                                                                                                                                    +      if (this.entity[this.imgProperty]) {
                                                                                                                                                                                                                                                                                                                                                                    +        this.fileService
                                                                                                                                                                                                                                                                                                                                                                    +          .loadFile(this.entity, this.imgProperty)
                                                                                                                                                                                                                                                                                                                                                                    +          .subscribe((res) => {
                                                                                                                                                                                                                                                                                                                                                                    +            // doesn't work with safeUrl
                                                                                                                                                                                                                                                                                                                                                                    +            this.imgSrc = Object.values(res)[0];
                                                                                                                                                                                                                                                                                                                                                                    +          });
                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    <img *ngIf="imgSrc" [src]="imgSrc" />
                                                                                                                                                                                                                                                                                                                                                                    +<img *ngIf="!imgSrc && defaultImage" [src]="defaultImage" />
                                                                                                                                                                                                                                                                                                                                                                    +<app-fa-dynamic-icon
                                                                                                                                                                                                                                                                                                                                                                    +  *ngIf="!imgSrc && !defaultImage && defaultIcon"
                                                                                                                                                                                                                                                                                                                                                                    +  [icon]="defaultIcon"
                                                                                                                                                                                                                                                                                                                                                                    +></app-fa-dynamic-icon>
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    + ./display-img.component.scss +

                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    /* Inherit the styles from the surrounding component. Otherwise the img is overflowing.
                                                                                                                                                                                                                                                                                                                                                                    +Remove padding and margin so they are not applied a second time. */
                                                                                                                                                                                                                                                                                                                                                                    +img {
                                                                                                                                                                                                                                                                                                                                                                    +  all: inherit;
                                                                                                                                                                                                                                                                                                                                                                    +  padding: 0;
                                                                                                                                                                                                                                                                                                                                                                    +  margin: 0;
                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayMonthComponent.html b/documentation/components/DisplayMonthComponent.html new file mode 100644 index 0000000000..ab1067c4b2 --- /dev/null +++ b/documentation/components/DisplayMonthComponent.html @@ -0,0 +1,578 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/month/display-month/display-month.component.ts +

                                                                                                                                                                                                                                                                                                                                                                      + + + +

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + + config +
                                                                                                                                                                                                                                                                                                                                                                      + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + + entity +
                                                                                                                                                                                                                                                                                                                                                                      + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + + id +
                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + + value +
                                                                                                                                                                                                                                                                                                                                                                      + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                      +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                      +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                      +import { DisplayDateComponent } from "../../date/display-date/display-date.component";
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-display-month",
                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                      +  template: `<app-display-date
                                                                                                                                                                                                                                                                                                                                                                      +    [value]="value"
                                                                                                                                                                                                                                                                                                                                                                      +    [config]="'YYYY-MM'"
                                                                                                                                                                                                                                                                                                                                                                      +    [displayAsAnonymized]="isPartiallyAnonymized"
                                                                                                                                                                                                                                                                                                                                                                      +  ></app-display-date>`,
                                                                                                                                                                                                                                                                                                                                                                      +  imports: [DatePipe, NgIf, DisplayDateComponent],
                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                      +export class DisplayMonthComponent extends ViewDirective<Date> {}
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayParticipantsCountComponent.html b/documentation/components/DisplayParticipantsCountComponent.html new file mode 100644 index 0000000000..bae754a0cc --- /dev/null +++ b/documentation/components/DisplayParticipantsCountComponent.html @@ -0,0 +1,696 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        + src/app/child-dev-project/children/display-participants-count/display-participants-count.component.ts +

                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        +constructor(_childrenService: ChildrenService) +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                        _childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + + config +
                                                                                                                                                                                                                                                                                                                                                                        + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + + id +
                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + + value +
                                                                                                                                                                                                                                                                                                                                                                        + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + + + participantRelationsCount + + +
                                                                                                                                                                                                                                                                                                                                                                        + Type : WritableSignal<number> + +
                                                                                                                                                                                                                                                                                                                                                                        + Default value : signal(null) +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        import { Component, OnChanges, signal, WritableSignal } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                        +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                        +import { ChildrenService } from "../children.service";
                                                                                                                                                                                                                                                                                                                                                                        +import { ViewDirective } from "../../../core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                        +import { ChildSchoolRelation } from "../model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                        +import { Logging } from "../../../core/logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("DisplayParticipantsCount")
                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-display-participants-count",
                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                        +  imports: [CommonModule],
                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./display-participants-count.component.html",
                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                        +export class DisplayParticipantsCountComponent
                                                                                                                                                                                                                                                                                                                                                                        +  extends ViewDirective<any>
                                                                                                                                                                                                                                                                                                                                                                        +  implements OnChanges
                                                                                                                                                                                                                                                                                                                                                                        +{
                                                                                                                                                                                                                                                                                                                                                                        +  participantRelationsCount: WritableSignal<number> = signal(null);
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +  constructor(private _childrenService: ChildrenService) {
                                                                                                                                                                                                                                                                                                                                                                        +    super();
                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +  override async ngOnChanges(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                        +    super.ngOnChanges();
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +    return this._childrenService
                                                                                                                                                                                                                                                                                                                                                                        +      .queryActiveRelationsOf(this.entity.getId())
                                                                                                                                                                                                                                                                                                                                                                        +      .then((relations: ChildSchoolRelation[]) => {
                                                                                                                                                                                                                                                                                                                                                                        +        this.participantRelationsCount.set(relations.length);
                                                                                                                                                                                                                                                                                                                                                                        +      })
                                                                                                                                                                                                                                                                                                                                                                        +      .catch((reason) => {
                                                                                                                                                                                                                                                                                                                                                                        +        Logging.error(
                                                                                                                                                                                                                                                                                                                                                                        +          "Could not calculate participantRelationsCount, error response from ChildrenService." +
                                                                                                                                                                                                                                                                                                                                                                        +            reason,
                                                                                                                                                                                                                                                                                                                                                                        +        );
                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        <p>
                                                                                                                                                                                                                                                                                                                                                                        +  {{ participantRelationsCount() }}
                                                                                                                                                                                                                                                                                                                                                                        +</p>
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayPercentageComponent.html b/documentation/components/DisplayPercentageComponent.html new file mode 100644 index 0000000000..bd1b1dd361 --- /dev/null +++ b/documentation/components/DisplayPercentageComponent.html @@ -0,0 +1,735 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/number/display-percentage/display-percentage.component.ts +

                                                                                                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          + OnInit +

                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          HostBindings
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + config +
                                                                                                                                                                                                                                                                                                                                                                          + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + id +
                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + value +
                                                                                                                                                                                                                                                                                                                                                                          + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          HostBindings

                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + + style + + +
                                                                                                                                                                                                                                                                                                                                                                          + Type : {} + +
                                                                                                                                                                                                                                                                                                                                                                          + Default value : {} +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + + numberFormat + + +
                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + + + style + + +
                                                                                                                                                                                                                                                                                                                                                                          + Type : object + +
                                                                                                                                                                                                                                                                                                                                                                          + Default value : {} +
                                                                                                                                                                                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                          + + @HostBinding('style')
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          import { Component, HostBinding, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                          +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                          +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +@DynamicComponent("DisplayPercentage")
                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-display-percentage",
                                                                                                                                                                                                                                                                                                                                                                          +  template:
                                                                                                                                                                                                                                                                                                                                                                          +    "{{ value !== undefined ? (value | number : numberFormat) + '%' : '-' }}",
                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                          +  imports: [CommonModule],
                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                          +export class DisplayPercentageComponent
                                                                                                                                                                                                                                                                                                                                                                          +  extends ViewDirective<number, { decimalPlaces?: number }>
                                                                                                                                                                                                                                                                                                                                                                          +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                          +{
                                                                                                                                                                                                                                                                                                                                                                          +  @HostBinding("style") style = {};
                                                                                                                                                                                                                                                                                                                                                                          +  numberFormat: string;
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                          +   * returns a css-compatible color value from green to red using the given
                                                                                                                                                                                                                                                                                                                                                                          +   * input value
                                                                                                                                                                                                                                                                                                                                                                          +   * @param percent The percentage from 0-100 (both inclusive). 0 will be completely red, 100 will be completely green
                                                                                                                                                                                                                                                                                                                                                                          +   * Everything between will have suitable colors (orange, yellow,...)
                                                                                                                                                                                                                                                                                                                                                                          +   * If the color is NaN, the color will be a light grey
                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                          +  private static fromPercent(percent: number): string {
                                                                                                                                                                                                                                                                                                                                                                          +    if (Number.isNaN(percent)) {
                                                                                                                                                                                                                                                                                                                                                                          +      return "rgba(130,130,130,0.4)";
                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                          +    // the hsv color-value is to be between 0 (red) and 120 (green)
                                                                                                                                                                                                                                                                                                                                                                          +    // percent is between 0-100, so we have to normalize it first
                                                                                                                                                                                                                                                                                                                                                                          +    const color = (percent / 100) * 120;
                                                                                                                                                                                                                                                                                                                                                                          +    return "hsl(" + color + ", 100%, 85%)";
                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                          +    this.numberFormat =
                                                                                                                                                                                                                                                                                                                                                                          +      "1." +
                                                                                                                                                                                                                                                                                                                                                                          +      (this.config && this.config.decimalPlaces
                                                                                                                                                                                                                                                                                                                                                                          +        ? this.config.decimalPlaces + "-" + this.config.decimalPlaces
                                                                                                                                                                                                                                                                                                                                                                          +        : "0-0");
                                                                                                                                                                                                                                                                                                                                                                          +    this.style = {
                                                                                                                                                                                                                                                                                                                                                                          +      "background-color": DisplayPercentageComponent.fromPercent(this.value),
                                                                                                                                                                                                                                                                                                                                                                          +      "border-radius": "5%",
                                                                                                                                                                                                                                                                                                                                                                          +      padding: "5px",
                                                                                                                                                                                                                                                                                                                                                                          +      width: "min-content",
                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayRecurringIntervalComponent.html b/documentation/components/DisplayRecurringIntervalComponent.html new file mode 100644 index 0000000000..72b053bead --- /dev/null +++ b/documentation/components/DisplayRecurringIntervalComponent.html @@ -0,0 +1,609 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/todos/recurring-interval/display-recurring-interval/display-recurring-interval.component.ts +

                                                                                                                                                                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + + config +
                                                                                                                                                                                                                                                                                                                                                                            + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + + id +
                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + + value +
                                                                                                                                                                                                                                                                                                                                                                            + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                            +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                            +import { ViewDirective } from "../../../../core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                            +import { generateLabelFromInterval, TimeInterval } from "../time-interval";
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +@DynamicComponent("DisplayRecurringInterval")
                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-display-recurring-interval",
                                                                                                                                                                                                                                                                                                                                                                            +  template: "{{ label }}",
                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                            +export class DisplayRecurringIntervalComponent
                                                                                                                                                                                                                                                                                                                                                                            +  extends ViewDirective<TimeInterval>
                                                                                                                                                                                                                                                                                                                                                                            +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                            +{
                                                                                                                                                                                                                                                                                                                                                                            +  label: string;
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                            +    if (this.value) {
                                                                                                                                                                                                                                                                                                                                                                            +      this.label = generateLabelFromInterval(this.value);
                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayTextComponent.html b/documentation/components/DisplayTextComponent.html new file mode 100644 index 0000000000..03c203ec45 --- /dev/null +++ b/documentation/components/DisplayTextComponent.html @@ -0,0 +1,572 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/basic-datatypes/string/display-text/display-text.component.ts +

                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              This component displays a text attribute.

                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + + config +
                                                                                                                                                                                                                                                                                                                                                                              + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + + entity +
                                                                                                                                                                                                                                                                                                                                                                              + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + + id +
                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + + value +
                                                                                                                                                                                                                                                                                                                                                                              + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                              +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                              + * This component displays a text attribute.
                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("DisplayText")
                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-display-text",
                                                                                                                                                                                                                                                                                                                                                                              +  template: `{{ value }}`,
                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                              +export class DisplayTextComponent extends ViewDirective<string> {}
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayTodoCompletionComponent.html b/documentation/components/DisplayTodoCompletionComponent.html new file mode 100644 index 0000000000..f8c456ec53 --- /dev/null +++ b/documentation/components/DisplayTodoCompletionComponent.html @@ -0,0 +1,720 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/todos/todo-completion/display-todo-completion/display-todo-completion.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                +constructor(entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + + config +
                                                                                                                                                                                                                                                                                                                                                                                + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + + id +
                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + + value +
                                                                                                                                                                                                                                                                                                                                                                                + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + + + completedBy + + +
                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                +import { TodoCompletion } from "../../model/todo-completion";
                                                                                                                                                                                                                                                                                                                                                                                +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                +import { ViewDirective } from "../../../../core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("DisplayTodoCompletion")
                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-display-todo-completion",
                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./display-todo-completion.component.html",
                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./display-todo-completion.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                +  imports: [NgIf, FontAwesomeModule, DatePipe],
                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                +export class DisplayTodoCompletionComponent
                                                                                                                                                                                                                                                                                                                                                                                +  extends ViewDirective<TodoCompletion>
                                                                                                                                                                                                                                                                                                                                                                                +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                +{
                                                                                                                                                                                                                                                                                                                                                                                +  completedBy: Entity;
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +  constructor(private entityMapper: EntityMapperService) {
                                                                                                                                                                                                                                                                                                                                                                                +    super();
                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                +    if (this.value?.completedBy) {
                                                                                                                                                                                                                                                                                                                                                                                +      const entityId = this.value.completedBy;
                                                                                                                                                                                                                                                                                                                                                                                +      const entityType = Entity.extractTypeFromId(entityId);
                                                                                                                                                                                                                                                                                                                                                                                +      this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                +        .load(entityType, entityId)
                                                                                                                                                                                                                                                                                                                                                                                +        .then((res) => (this.completedBy = res));
                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                <div *ngIf="value" class="completed-wrapper">
                                                                                                                                                                                                                                                                                                                                                                                +  <div>
                                                                                                                                                                                                                                                                                                                                                                                +    <fa-icon icon="check" class="margin-right-small"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                +    <span i18n>completed</span>
                                                                                                                                                                                                                                                                                                                                                                                +  </div>
                                                                                                                                                                                                                                                                                                                                                                                +  <div class="completed-details" i18n>
                                                                                                                                                                                                                                                                                                                                                                                +    by {{ completedBy?.toString() }} on {{ value.completedAt | date }}
                                                                                                                                                                                                                                                                                                                                                                                +  </div>
                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                + ./display-todo-completion.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +.completed-wrapper {
                                                                                                                                                                                                                                                                                                                                                                                +  color: colors.$success;
                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +.completed-details {
                                                                                                                                                                                                                                                                                                                                                                                +  color: colors.$text-secondary;
                                                                                                                                                                                                                                                                                                                                                                                +  font-size: 0.8em;
                                                                                                                                                                                                                                                                                                                                                                                +  margin-top: -0.25em;
                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/DisplayUnitComponent.html b/documentation/components/DisplayUnitComponent.html new file mode 100644 index 0000000000..45401fea2a --- /dev/null +++ b/documentation/components/DisplayUnitComponent.html @@ -0,0 +1,562 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/basic-datatypes/number/display-unit/display-unit.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + + config +
                                                                                                                                                                                                                                                                                                                                                                                  + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + + id +
                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + + value +
                                                                                                                                                                                                                                                                                                                                                                                  + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                  +import { ViewDirective } from "../../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("DisplayUnit")
                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-display-unit",
                                                                                                                                                                                                                                                                                                                                                                                  +  template: '{{ value !== undefined ? value + " " + config : "" }}',
                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                  +export class DisplayUnitComponent extends ViewDirective<string, string> {}
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditAgeComponent.html b/documentation/components/EditAgeComponent.html new file mode 100644 index 0000000000..1ea44dee62 --- /dev/null +++ b/documentation/components/EditAgeComponent.html @@ -0,0 +1,900 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/basic-datatypes/date-with-age/edit-age/edit-age.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + entity +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + + dateChanged + + +
                                                                                                                                                                                                                                                                                                                                                                                    +dateChanged(event: MatDatepickerInputEvent) +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                    event + MatDatepickerInputEvent<any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                    +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                    +  MatDatepickerInputEvent,
                                                                                                                                                                                                                                                                                                                                                                                    +  MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                                                                    +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                    +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                    +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                    +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                    +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                    +import { DateWithAge } from "../dateWithAge";
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +@DynamicComponent("EditAge")
                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-edit-age",
                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./edit-age.component.html",
                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                    +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                    +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                    +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                    +    MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                    +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                    +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                    +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                    +export class EditAgeComponent extends EditComponent<DateWithAge> {
                                                                                                                                                                                                                                                                                                                                                                                    +  dateChanged(event: MatDatepickerInputEvent<any>) {
                                                                                                                                                                                                                                                                                                                                                                                    +    if (event.value) {
                                                                                                                                                                                                                                                                                                                                                                                    +      this.formControl.setValue(new DateWithAge(event.value));
                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    <div [formGroup]="parent">
                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-form-field
                                                                                                                                                                                                                                                                                                                                                                                    +    style="width: 70%"
                                                                                                                                                                                                                                                                                                                                                                                    +    *ngIf="
                                                                                                                                                                                                                                                                                                                                                                                    +      !(entity.anonymized && formFieldConfig.anonymize === 'retain-anonymized')
                                                                                                                                                                                                                                                                                                                                                                                    +    "
                                                                                                                                                                                                                                                                                                                                                                                    +  >
                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                    +    <input
                                                                                                                                                                                                                                                                                                                                                                                    +      matInput
                                                                                                                                                                                                                                                                                                                                                                                    +      [formControlName]="formControlName"
                                                                                                                                                                                                                                                                                                                                                                                    +      [matDatepicker]="dateOfBirthDatepicker"
                                                                                                                                                                                                                                                                                                                                                                                    +      (dateChange)="dateChanged($event)"
                                                                                                                                                                                                                                                                                                                                                                                    +    />
                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-datepicker-toggle
                                                                                                                                                                                                                                                                                                                                                                                    +      matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                    +      [for]="dateOfBirthDatepicker"
                                                                                                                                                                                                                                                                                                                                                                                    +    ></mat-datepicker-toggle>
                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-datepicker #dateOfBirthDatepicker></mat-datepicker>
                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                    +      <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                    +    </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-form-field style="width: 30%">
                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-label i18n="Placeholder for the input that displays the age"
                                                                                                                                                                                                                                                                                                                                                                                    +      >Age</mat-label
                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                    +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                    +      *ngIf="formControl.enabled"
                                                                                                                                                                                                                                                                                                                                                                                    +      matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                    +      icon="question-circle"
                                                                                                                                                                                                                                                                                                                                                                                    +      i18n-matTooltip="Tooltip for the disabled age field"
                                                                                                                                                                                                                                                                                                                                                                                    +      matTooltip="This field is read-only. Edit Date of Birth to change age. Select Jan 1st if you only know the year of birth."
                                                                                                                                                                                                                                                                                                                                                                                    +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                    +    <input
                                                                                                                                                                                                                                                                                                                                                                                    +      matInput
                                                                                                                                                                                                                                                                                                                                                                                    +      [value]="formControl.value?.age?.toString()"
                                                                                                                                                                                                                                                                                                                                                                                    +      [disabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                    +    />
                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                    +      <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                    +    </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditAttendanceComponent.html b/documentation/components/EditAttendanceComponent.html new file mode 100644 index 0000000000..a91f8094a3 --- /dev/null +++ b/documentation/components/EditAttendanceComponent.html @@ -0,0 +1,1356 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      + src/app/child-dev-project/attendance/edit-attendance/edit-attendance.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                      + + + +

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      +constructor(screenWithObserver: ScreenWidthObserver) +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                      screenWithObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + entity +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : Note + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:48 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + getAttendance + + +
                                                                                                                                                                                                                                                                                                                                                                                      +getAttendance(childId: string) +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                      childId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + removeChild + + +
                                                                                                                                                                                                                                                                                                                                                                                      +removeChild(id: string) +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                      id + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + updateAttendanceValue + + +
                                                                                                                                                                                                                                                                                                                                                                                      +updateAttendanceValue(childId, property: "status" | "remarks", newValue) +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                      childId + + No +
                                                                                                                                                                                                                                                                                                                                                                                      property + "status" | "remarks" + + No +
                                                                                                                                                                                                                                                                                                                                                                                      newValue + + No +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + attendanceForm + + +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormControl<Map<string, EventAttendance>> + +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + mobile + + +
                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + showAttendance + + +
                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                      +import { EditComponent } from "../../../core/entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                      +import { EditEntityComponent } from "../../../core/basic-datatypes/entity/edit-entity/edit-entity.component";
                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                      +import { startWith } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                      +import { FormControl } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                      +import { InteractionType } from "../../notes/model/interaction-type.interface";
                                                                                                                                                                                                                                                                                                                                                                                      +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                      +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityBlockComponent } from "../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                      +import { AttendanceStatusSelectComponent } from "../attendance-status-select/attendance-status-select.component";
                                                                                                                                                                                                                                                                                                                                                                                      +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                      +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                      +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                      +import { ScreenWidthObserver } from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                      +import { Note } from "../../notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                      +import { EventAttendance } from "../model/event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                      +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("EditAttendance")
                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-edit-attendance",
                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                      +    EditEntityComponent,
                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                      +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                      +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                      +    AttendanceStatusSelectComponent,
                                                                                                                                                                                                                                                                                                                                                                                      +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                      +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                      +    MatCardModule,
                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./edit-attendance.component.html",
                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./edit-attendance.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                      +export class EditAttendanceComponent
                                                                                                                                                                                                                                                                                                                                                                                      +  extends EditComponent<string[]>
                                                                                                                                                                                                                                                                                                                                                                                      +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                      +{
                                                                                                                                                                                                                                                                                                                                                                                      +  showAttendance = false;
                                                                                                                                                                                                                                                                                                                                                                                      +  mobile = false;
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() declare entity: Note;
                                                                                                                                                                                                                                                                                                                                                                                      +  attendanceForm: FormControl<Map<string, EventAttendance>>;
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(screenWithObserver: ScreenWidthObserver) {
                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                      +    screenWithObserver
                                                                                                                                                                                                                                                                                                                                                                                      +      .platform()
                                                                                                                                                                                                                                                                                                                                                                                      +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                      +      .subscribe((isDesktop) => (this.mobile = !isDesktop));
                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +  override ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                      +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                      +    const category = this.parent.get(
                                                                                                                                                                                                                                                                                                                                                                                      +      "category",
                                                                                                                                                                                                                                                                                                                                                                                      +    ) as FormControl<InteractionType>;
                                                                                                                                                                                                                                                                                                                                                                                      +    if (category) {
                                                                                                                                                                                                                                                                                                                                                                                      +      category.valueChanges.pipe(startWith(category.value)).subscribe((val) => {
                                                                                                                                                                                                                                                                                                                                                                                      +        this.showAttendance = !!val?.isMeeting;
                                                                                                                                                                                                                                                                                                                                                                                      +        if (this.showAttendance) {
                                                                                                                                                                                                                                                                                                                                                                                      +          this.attendanceForm = new FormControl(
                                                                                                                                                                                                                                                                                                                                                                                      +            this.entity.copy()["childrenAttendance"],
                                                                                                                                                                                                                                                                                                                                                                                      +          );
                                                                                                                                                                                                                                                                                                                                                                                      +          this.parent.addControl("childrenAttendance", this.attendanceForm);
                                                                                                                                                                                                                                                                                                                                                                                      +        } else {
                                                                                                                                                                                                                                                                                                                                                                                      +          this.parent.removeControl("childrenAttendance");
                                                                                                                                                                                                                                                                                                                                                                                      +          this.attendanceForm = undefined;
                                                                                                                                                                                                                                                                                                                                                                                      +        }
                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +  getAttendance(childId: string) {
                                                                                                                                                                                                                                                                                                                                                                                      +    let attendance = this.attendanceForm.value.get(childId);
                                                                                                                                                                                                                                                                                                                                                                                      +    if (!attendance) {
                                                                                                                                                                                                                                                                                                                                                                                      +      attendance = new EventAttendance();
                                                                                                                                                                                                                                                                                                                                                                                      +      this.attendanceForm.value.set(childId, attendance);
                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                      +    return attendance;
                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +  removeChild(id: string) {
                                                                                                                                                                                                                                                                                                                                                                                      +    const children = this.formControl.value;
                                                                                                                                                                                                                                                                                                                                                                                      +    const index = children.indexOf(id);
                                                                                                                                                                                                                                                                                                                                                                                      +    children.splice(index, 1);
                                                                                                                                                                                                                                                                                                                                                                                      +    this.attendanceForm.value.delete(id);
                                                                                                                                                                                                                                                                                                                                                                                      +    this.formControl.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                      +    this.formControl.setValue([...children]);
                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +  updateAttendanceValue(childId, property: "status" | "remarks", newValue) {
                                                                                                                                                                                                                                                                                                                                                                                      +    this.formControl.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                      +    this.getAttendance(childId)[property] = newValue;
                                                                                                                                                                                                                                                                                                                                                                                      +    this.attendanceForm.setValue(this.attendanceForm.value);
                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      <app-edit-entity
                                                                                                                                                                                                                                                                                                                                                                                      +  [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                      +  [formFieldConfig]="formFieldConfig"
                                                                                                                                                                                                                                                                                                                                                                                      +  [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                      +  [showEntities]="!showAttendance"
                                                                                                                                                                                                                                                                                                                                                                                      +/>
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +<ng-container *ngIf="showAttendance">
                                                                                                                                                                                                                                                                                                                                                                                      +  <!-- If feasible, this whole setup should be replaced with a more simple setup that
                                                                                                                                                                                                                                                                                                                                                                                      +  automatically adapts to the screen size without having to rely on two different layout techniques for
                                                                                                                                                                                                                                                                                                                                                                                      +  small and big screens.
                                                                                                                                                                                                                                                                                                                                                                                      + -->
                                                                                                                                                                                                                                                                                                                                                                                      +  <div *ngIf="!mobile">
                                                                                                                                                                                                                                                                                                                                                                                      +    <!-- Desktop view: display the information as table -->
                                                                                                                                                                                                                                                                                                                                                                                      +    <table class="table">
                                                                                                                                                                                                                                                                                                                                                                                      +      <tr *ngFor="let childId of formControl.value">
                                                                                                                                                                                                                                                                                                                                                                                      +        <td>
                                                                                                                                                                                                                                                                                                                                                                                      +          <button
                                                                                                                                                                                                                                                                                                                                                                                      +            mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                      +            *ngIf="!formControl.disabled"
                                                                                                                                                                                                                                                                                                                                                                                      +            (click)="removeChild(childId)"
                                                                                                                                                                                                                                                                                                                                                                                      +          >
                                                                                                                                                                                                                                                                                                                                                                                      +            <fa-icon icon="trash"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                      +          </button>
                                                                                                                                                                                                                                                                                                                                                                                      +        </td>
                                                                                                                                                                                                                                                                                                                                                                                      +        <td>
                                                                                                                                                                                                                                                                                                                                                                                      +          <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                      +            [entityId]="childId"
                                                                                                                                                                                                                                                                                                                                                                                      +            entityType="Child"
                                                                                                                                                                                                                                                                                                                                                                                      +          ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                      +        </td>
                                                                                                                                                                                                                                                                                                                                                                                      +        <td>
                                                                                                                                                                                                                                                                                                                                                                                      +          <app-attendance-status-select
                                                                                                                                                                                                                                                                                                                                                                                      +            [value]="getAttendance(childId).status"
                                                                                                                                                                                                                                                                                                                                                                                      +            (valueChange)="updateAttendanceValue(childId, 'status', $event)"
                                                                                                                                                                                                                                                                                                                                                                                      +            [disabled]="formControl.disabled"
                                                                                                                                                                                                                                                                                                                                                                                      +          >
                                                                                                                                                                                                                                                                                                                                                                                      +          </app-attendance-status-select>
                                                                                                                                                                                                                                                                                                                                                                                      +        </td>
                                                                                                                                                                                                                                                                                                                                                                                      +        <td class="full-width">
                                                                                                                                                                                                                                                                                                                                                                                      +          <mat-form-field class="adjust-top">
                                                                                                                                                                                                                                                                                                                                                                                      +            <input
                                                                                                                                                                                                                                                                                                                                                                                      +              #inputElement
                                                                                                                                                                                                                                                                                                                                                                                      +              matInput
                                                                                                                                                                                                                                                                                                                                                                                      +              i18n-placeholder
                                                                                                                                                                                                                                                                                                                                                                                      +              placeholder="Remarks"
                                                                                                                                                                                                                                                                                                                                                                                      +              name="remarks"
                                                                                                                                                                                                                                                                                                                                                                                      +              type="text"
                                                                                                                                                                                                                                                                                                                                                                                      +              [value]="getAttendance(childId).remarks"
                                                                                                                                                                                                                                                                                                                                                                                      +              (input)="
                                                                                                                                                                                                                                                                                                                                                                                      +                updateAttendanceValue(childId, 'remarks', inputElement.value)
                                                                                                                                                                                                                                                                                                                                                                                      +              "
                                                                                                                                                                                                                                                                                                                                                                                      +              [disabled]="formControl.disabled"
                                                                                                                                                                                                                                                                                                                                                                                      +            />
                                                                                                                                                                                                                                                                                                                                                                                      +          </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                      +        </td>
                                                                                                                                                                                                                                                                                                                                                                                      +      </tr>
                                                                                                                                                                                                                                                                                                                                                                                      +    </table>
                                                                                                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +  <div *ngIf="mobile" class="attendance-blocks">
                                                                                                                                                                                                                                                                                                                                                                                      +    <!-- Mobile view / smaller screen: display the information using a flex-layout -->
                                                                                                                                                                                                                                                                                                                                                                                      +    <mat-card
                                                                                                                                                                                                                                                                                                                                                                                      +      *ngFor="let childId of formControl.value"
                                                                                                                                                                                                                                                                                                                                                                                      +      class="attendance-item mat-elevation-z1 margin-bottom-small"
                                                                                                                                                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                                                                                                                                                      +      <mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                      +        <div class="attendance-item--header margin-bottom-regular">
                                                                                                                                                                                                                                                                                                                                                                                      +          <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                      +            [entityId]="childId"
                                                                                                                                                                                                                                                                                                                                                                                      +            entityType="Child"
                                                                                                                                                                                                                                                                                                                                                                                      +          ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +          <button
                                                                                                                                                                                                                                                                                                                                                                                      +            mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                      +            *ngIf="!formControl.disabled"
                                                                                                                                                                                                                                                                                                                                                                                      +            (click)="removeChild(childId)"
                                                                                                                                                                                                                                                                                                                                                                                      +            class="mobile-remove-item"
                                                                                                                                                                                                                                                                                                                                                                                      +          >
                                                                                                                                                                                                                                                                                                                                                                                      +            <fa-icon icon="trash"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                      +          </button>
                                                                                                                                                                                                                                                                                                                                                                                      +        </div>
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +        <div class="attendance-item--content">
                                                                                                                                                                                                                                                                                                                                                                                      +          <app-attendance-status-select
                                                                                                                                                                                                                                                                                                                                                                                      +            [value]="getAttendance(childId).status"
                                                                                                                                                                                                                                                                                                                                                                                      +            (valueChange)="updateAttendanceValue(childId, 'status', $event)"
                                                                                                                                                                                                                                                                                                                                                                                      +            [disabled]="formControl.disabled"
                                                                                                                                                                                                                                                                                                                                                                                      +          >
                                                                                                                                                                                                                                                                                                                                                                                      +          </app-attendance-status-select>
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +          <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                      +            <input
                                                                                                                                                                                                                                                                                                                                                                                      +              #inputElement
                                                                                                                                                                                                                                                                                                                                                                                      +              matInput
                                                                                                                                                                                                                                                                                                                                                                                      +              i18n-placeholder
                                                                                                                                                                                                                                                                                                                                                                                      +              placeholder="Remarks"
                                                                                                                                                                                                                                                                                                                                                                                      +              name="remarks"
                                                                                                                                                                                                                                                                                                                                                                                      +              type="text"
                                                                                                                                                                                                                                                                                                                                                                                      +              [value]="getAttendance(childId).remarks"
                                                                                                                                                                                                                                                                                                                                                                                      +              (input)="
                                                                                                                                                                                                                                                                                                                                                                                      +                updateAttendanceValue(childId, 'remarks', inputElement.value)
                                                                                                                                                                                                                                                                                                                                                                                      +              "
                                                                                                                                                                                                                                                                                                                                                                                      +              [disabled]="formControl.disabled"
                                                                                                                                                                                                                                                                                                                                                                                      +            />
                                                                                                                                                                                                                                                                                                                                                                                      +          </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                      +        </div>
                                                                                                                                                                                                                                                                                                                                                                                      +      </mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                      +    </mat-card>
                                                                                                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                                                                                                      +</ng-container>
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      + ./edit-attendance.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      /* make layout of attendee items more dense and align its fields by hiding unused subscript space */
                                                                                                                                                                                                                                                                                                                                                                                      +:host ::ng-deep .table .mat-mdc-form-field-subscript-wrapper {
                                                                                                                                                                                                                                                                                                                                                                                      +  display: none;
                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +.table {
                                                                                                                                                                                                                                                                                                                                                                                      +  /* add gap of same size as the hidden subscript wrappers */
                                                                                                                                                                                                                                                                                                                                                                                      +  margin-bottom: 22px;
                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +.mobile-remove-item {
                                                                                                                                                                                                                                                                                                                                                                                      +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                      +  top: 0;
                                                                                                                                                                                                                                                                                                                                                                                      +  right: 0;
                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditBooleanComponent.html b/documentation/components/EditBooleanComponent.html new file mode 100644 index 0000000000..dd097911cf --- /dev/null +++ b/documentation/components/EditBooleanComponent.html @@ -0,0 +1,780 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/basic-datatypes/boolean/edit-boolean/edit-boolean.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        import { Component, ViewEncapsulation } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                        +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                        +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                        +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                        +import { BooleanInputComponent } from "./boolean-input/boolean-input.component";
                                                                                                                                                                                                                                                                                                                                                                                        +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("EditBoolean")
                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-edit-boolean",
                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./edit-boolean.component.html",
                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./edit-boolean.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                        +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                        +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                        +    BooleanInputComponent,
                                                                                                                                                                                                                                                                                                                                                                                        +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                        +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                        +export class EditBooleanComponent extends EditComponent<boolean> {}
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                        +  <app-boolean-input
                                                                                                                                                                                                                                                                                                                                                                                        +    [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                        +    [placeholder]="label"
                                                                                                                                                                                                                                                                                                                                                                                        +  ></app-boolean-input>
                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                        +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                        +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                        +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        + ./edit-boolean.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        app-edit-boolean .mat-mdc-form-field-infix {
                                                                                                                                                                                                                                                                                                                                                                                        +  padding-top: 12px !important;
                                                                                                                                                                                                                                                                                                                                                                                        +  padding-bottom: 0 !important;
                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditConfigurableEnumComponent.html b/documentation/components/EditConfigurableEnumComponent.html new file mode 100644 index 0000000000..c1ea2276d6 --- /dev/null +++ b/documentation/components/EditConfigurableEnumComponent.html @@ -0,0 +1,836 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/configurable-enum/edit-configurable-enum/edit-configurable-enum.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + enumId + + +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + multi + + +
                                                                                                                                                                                                                                                                                                                                                                                          + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                          +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigurableEnumValue } from "../configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                          +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                          +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                          +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigurableEnumDirective } from "../configurable-enum-directive/configurable-enum.directive";
                                                                                                                                                                                                                                                                                                                                                                                          +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                          +import { EnumDropdownComponent } from "../enum-dropdown/enum-dropdown.component";
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +@DynamicComponent("EditConfigurableEnum")
                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-edit-configurable-enum",
                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./edit-configurable-enum.component.html",
                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                          +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                          +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                          +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                          +    ConfigurableEnumDirective,
                                                                                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                          +    EnumDropdownComponent,
                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                          +export class EditConfigurableEnumComponent
                                                                                                                                                                                                                                                                                                                                                                                          +  extends EditComponent<ConfigurableEnumValue>
                                                                                                                                                                                                                                                                                                                                                                                          +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                          +{
                                                                                                                                                                                                                                                                                                                                                                                          +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                          +  multi = false;
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +  override ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                          +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                          +    this.multi = this.formFieldConfig.isArray;
                                                                                                                                                                                                                                                                                                                                                                                          +    this.enumId = this.formFieldConfig.additional;
                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          <app-enum-dropdown
                                                                                                                                                                                                                                                                                                                                                                                          +  [form]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                          +  [label]="label"
                                                                                                                                                                                                                                                                                                                                                                                          +  [enumId]="enumId"
                                                                                                                                                                                                                                                                                                                                                                                          +  [multi]="multi"
                                                                                                                                                                                                                                                                                                                                                                                          +>
                                                                                                                                                                                                                                                                                                                                                                                          +</app-enum-dropdown>
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditDateComponent.html b/documentation/components/EditDateComponent.html new file mode 100644 index 0000000000..37131967fc --- /dev/null +++ b/documentation/components/EditDateComponent.html @@ -0,0 +1,784 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/basic-datatypes/date/edit-date/edit-date.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                            + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                            +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                            +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                            +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                            +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                            +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                            +import { MatDatepickerModule } from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                                                                            +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                            +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                            +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +@DynamicComponent("EditDate")
                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-edit-date",
                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./edit-date.component.html",
                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                            +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                            +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                            +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                            +    MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                            +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                            +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                            +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                            +export class EditDateComponent extends EditComponent<Date> {}
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            <mat-form-field [formGroup]="parent">
                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                            +  <input
                                                                                                                                                                                                                                                                                                                                                                                            +    matInput
                                                                                                                                                                                                                                                                                                                                                                                            +    [formControlName]="formControlName"
                                                                                                                                                                                                                                                                                                                                                                                            +    [matDatepicker]="datepickerComp"
                                                                                                                                                                                                                                                                                                                                                                                            +  />
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +  <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                            +    *ngIf="isPartiallyAnonymized"
                                                                                                                                                                                                                                                                                                                                                                                            +    matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                            +    icon="warning"
                                                                                                                                                                                                                                                                                                                                                                                            +    matTooltip="This data has been partially anonymized."
                                                                                                                                                                                                                                                                                                                                                                                            +    i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                            +  ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-datepicker-toggle
                                                                                                                                                                                                                                                                                                                                                                                            +    matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                            +    [for]="datepickerComp"
                                                                                                                                                                                                                                                                                                                                                                                            +  ></mat-datepicker-toggle>
                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-datepicker #datepickerComp></mat-datepicker>
                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                            +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                            +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                            +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditDescriptionOnlyComponent.html b/documentation/components/EditDescriptionOnlyComponent.html new file mode 100644 index 0000000000..c36ec1c79b --- /dev/null +++ b/documentation/components/EditDescriptionOnlyComponent.html @@ -0,0 +1,388 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/common-components/description-only/edit-description-only/edit-description-only.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                              + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                              +import { FormFieldConfig } from "../../entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("EditDescriptionOnly")
                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-edit-description-only",
                                                                                                                                                                                                                                                                                                                                                                                              +  template: "<div class='container'>{{formFieldConfig?.label}}</div>",
                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./edit-description-only.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                              +export class EditDescriptionOnlyComponent {
                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() formFieldConfig: FormFieldConfig;
                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              + ./edit-description-only.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +.container {
                                                                                                                                                                                                                                                                                                                                                                                              +  margin-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditEntityComponent.html b/documentation/components/EditEntityComponent.html new file mode 100644 index 0000000000..1f114df4e9 --- /dev/null +++ b/documentation/components/EditEntityComponent.html @@ -0,0 +1,899 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/basic-datatypes/entity/edit-entity/edit-entity.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                A form field to select among the entities of the given type(s). +Can be configured as single or multi select.

                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + entityName +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + showEntities +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + multi + + +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + placeholder + + +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySelectComponent } from "../../../common-components/entity-select/entity-select.component";
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                + * A form field to select among the entities of the given type(s).
                                                                                                                                                                                                                                                                                                                                                                                                + * Can be configured as single or multi select.
                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("EditEntity")
                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-edit-entity",
                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./edit-entity.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [EntitySelectComponent],
                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                +export class EditEntityComponent<T extends string[] | string = string[]>
                                                                                                                                                                                                                                                                                                                                                                                                +  extends EditComponent<T>
                                                                                                                                                                                                                                                                                                                                                                                                +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                +{
                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() showEntities = true;
                                                                                                                                                                                                                                                                                                                                                                                                +  placeholder: string;
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() entityName: string;
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +  multi: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +  override ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +    this.entityName = this.entityName ?? this.formFieldConfig.additional;
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +    this.multi = this.formFieldConfig.isArray;
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +    this.placeholder = $localize`:Placeholder for input to add entities|context Add User(s):Add ${this.label}`;
                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                <app-entity-select
                                                                                                                                                                                                                                                                                                                                                                                                +  [entityType]="entityName"
                                                                                                                                                                                                                                                                                                                                                                                                +  [label]="label"
                                                                                                                                                                                                                                                                                                                                                                                                +  [placeholder]="placeholder"
                                                                                                                                                                                                                                                                                                                                                                                                +  [showEntities]="showEntities"
                                                                                                                                                                                                                                                                                                                                                                                                +  [multi]="multi"
                                                                                                                                                                                                                                                                                                                                                                                                +  [form]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                                                +</app-entity-select>
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditFileComponent.html b/documentation/components/EditFileComponent.html new file mode 100644 index 0000000000..733d46bc42 --- /dev/null +++ b/documentation/components/EditFileComponent.html @@ -0,0 +1,1530 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/file/edit-file/edit-file.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  This component should be used as a editComponent when a property should store files. +It allows to show, upload and remove files.

                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(fileService: FileService, alertService: AlertService, entityMapper: EntityMapperService, navigator: Navigator) +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                  fileService + FileService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                  alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                  entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                  navigator + Navigator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + delete + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +delete() +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + deleteExistingFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + deleteExistingFile() +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + formClicked + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +formClicked() +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + onFileSelected + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + onFileSelected(file: File) +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                  file + File + + No +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + resetFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + resetFile() +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + saveNewFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + saveNewFile(file: File) +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                  file + File + + No +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + showFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +showFile() +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + fileUploadInput + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : ElementRef<HTMLInputElement> + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                  + + @ViewChild('fileUpload')
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + initialValue + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  import {
                                                                                                                                                                                                                                                                                                                                                                                                  +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                  +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                  +  Inject,
                                                                                                                                                                                                                                                                                                                                                                                                  +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                  +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { EditComponent } from "../../../core/entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { AlertService } from "../../../core/alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { Logging } from "../../../core/logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { FileService } from "../file.service";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { distinctUntilChanged, filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { NgClass, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { ErrorHintComponent } from "../../../core/common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { NotAvailableOfflineError } from "../../../core/session/not-available-offline.error";
                                                                                                                                                                                                                                                                                                                                                                                                  +import { NAVIGATOR_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                  + * This component should be used as a `editComponent` when a property should store files.
                                                                                                                                                                                                                                                                                                                                                                                                  + * It allows to show, upload and remove files.
                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("EditFile")
                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-edit-file",
                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./edit-file.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./edit-file.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                  +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                  +    NgClass,
                                                                                                                                                                                                                                                                                                                                                                                                  +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                  +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                  +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                  +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                  +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                  +export class EditFileComponent extends EditComponent<string> implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                  +  @ViewChild("fileUpload") fileUploadInput: ElementRef<HTMLInputElement>;
                                                                                                                                                                                                                                                                                                                                                                                                  +  private selectedFile: File;
                                                                                                                                                                                                                                                                                                                                                                                                  +  private removeClicked = false;
                                                                                                                                                                                                                                                                                                                                                                                                  +  initialValue: string;
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                  +    protected fileService: FileService,
                                                                                                                                                                                                                                                                                                                                                                                                  +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                  +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                  +    @Inject(NAVIGATOR_TOKEN) protected navigator: Navigator,
                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                  +    super();
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  override ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                  +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.initialValue = this.formControl.value;
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.formControl.statusChanges
                                                                                                                                                                                                                                                                                                                                                                                                  +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                  +        distinctUntilChanged(),
                                                                                                                                                                                                                                                                                                                                                                                                  +        filter((change) => change === "DISABLED"),
                                                                                                                                                                                                                                                                                                                                                                                                  +      )
                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                  +        if (
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.selectedFile &&
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.selectedFile.name === this.formControl.value
                                                                                                                                                                                                                                                                                                                                                                                                  +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.saveNewFile(this.selectedFile);
                                                                                                                                                                                                                                                                                                                                                                                                  +        } else if (
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.removeClicked &&
                                                                                                                                                                                                                                                                                                                                                                                                  +          !this.formControl.value &&
                                                                                                                                                                                                                                                                                                                                                                                                  +          !!this.initialValue
                                                                                                                                                                                                                                                                                                                                                                                                  +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.deleteExistingFile();
                                                                                                                                                                                                                                                                                                                                                                                                  +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.resetFile();
                                                                                                                                                                                                                                                                                                                                                                                                  +        }
                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  async onFileSelected(file: File) {
                                                                                                                                                                                                                                                                                                                                                                                                  +    // directly reset input so subsequent selections with the same name also trigger the change event
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.fileUploadInput.nativeElement.value = "";
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedFile = file;
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.formControl.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.formControl.setValue(file.name);
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  protected saveNewFile(file: File) {
                                                                                                                                                                                                                                                                                                                                                                                                  +    // The maximum file size is set to 5 MB
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.fileService
                                                                                                                                                                                                                                                                                                                                                                                                  +      .uploadFile(file, this.entity, this.formControlName)
                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                  +        error: (err) => this.handleError(err),
                                                                                                                                                                                                                                                                                                                                                                                                  +        complete: () => {
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.initialValue = this.formControl.value;
                                                                                                                                                                                                                                                                                                                                                                                                  +          this.selectedFile = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                  +        },
                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  private handleError(err) {
                                                                                                                                                                                                                                                                                                                                                                                                  +    let errorMessage: string;
                                                                                                                                                                                                                                                                                                                                                                                                  +    if (err?.status === 413) {
                                                                                                                                                                                                                                                                                                                                                                                                  +      errorMessage = $localize`:File Upload Error Message:File too large. Usually files up to 5 MB are supported.`;
                                                                                                                                                                                                                                                                                                                                                                                                  +    } else if (err instanceof NotAvailableOfflineError) {
                                                                                                                                                                                                                                                                                                                                                                                                  +      errorMessage = $localize`:File Upload Error Message:Changes to file attachments are not available offline.`;
                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                  +      Logging.error("Failed to update file: " + JSON.stringify(err));
                                                                                                                                                                                                                                                                                                                                                                                                  +      errorMessage = $localize`:File Upload Error Message:Failed to update file attachment. Please try again.`;
                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.alertService.addDanger(errorMessage);
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.revertEntityChanges();
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  private async revertEntityChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                  +    // ensure we have latest _rev of entity
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.entity = await this.entityMapper.load(
                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entity.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +    // Reset entity to how it was before
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.entity[this.formControlName] = this.initialValue;
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.formControl.setValue(this.initialValue);
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.entityMapper.save(this.entity);
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.resetFile();
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  formClicked() {
                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.initialValue && this.formControl.value === this.initialValue) {
                                                                                                                                                                                                                                                                                                                                                                                                  +      this.showFile();
                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                  +      this.fileUploadInput.nativeElement.click();
                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  showFile() {
                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.initialValue && this.formControl.value === this.initialValue) {
                                                                                                                                                                                                                                                                                                                                                                                                  +      this.fileService.showFile(this.entity, this.formControlName);
                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  delete() {
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.formControl.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.formControl.setValue(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedFile = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                  +    // remove is only necessary if an initial value was set
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.removeClicked = true;
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  protected deleteExistingFile() {
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.fileService.removeFile(this.entity, this.formControlName).subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                  +      error: (err) => this.handleError(err),
                                                                                                                                                                                                                                                                                                                                                                                                  +      complete: () => {
                                                                                                                                                                                                                                                                                                                                                                                                  +        this.alertService.addInfo(
                                                                                                                                                                                                                                                                                                                                                                                                  +          $localize`:Message for user:File "${this.initialValue}" deleted`,
                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                  +        this.initialValue = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                  +        this.removeClicked = false;
                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  protected resetFile() {
                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedFile = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  <input
                                                                                                                                                                                                                                                                                                                                                                                                  +  type="file"
                                                                                                                                                                                                                                                                                                                                                                                                  +  style="display: none"
                                                                                                                                                                                                                                                                                                                                                                                                  +  (change)="onFileSelected($event.target['files'][0])"
                                                                                                                                                                                                                                                                                                                                                                                                  +  #fileUpload
                                                                                                                                                                                                                                                                                                                                                                                                  +/>
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +<mat-form-field
                                                                                                                                                                                                                                                                                                                                                                                                  +  [ngClass]="{ clickable: formControl.value }"
                                                                                                                                                                                                                                                                                                                                                                                                  +  (click)="navigator.onLine ? formClicked() : null"
                                                                                                                                                                                                                                                                                                                                                                                                  +>
                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                  +  <input
                                                                                                                                                                                                                                                                                                                                                                                                  +    matInput
                                                                                                                                                                                                                                                                                                                                                                                                  +    readonly
                                                                                                                                                                                                                                                                                                                                                                                                  +    class="filename"
                                                                                                                                                                                                                                                                                                                                                                                                  +    [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                                  +    i18n-placeholder="placeholder for file-input"
                                                                                                                                                                                                                                                                                                                                                                                                  +    placeholder="No file selected"
                                                                                                                                                                                                                                                                                                                                                                                                  +    i18n-matTooltip="Tooltip show file"
                                                                                                                                                                                                                                                                                                                                                                                                  +    matTooltip="Show file"
                                                                                                                                                                                                                                                                                                                                                                                                  +    [matTooltipDisabled]="!(initialValue && formControl.value === initialValue)"
                                                                                                                                                                                                                                                                                                                                                                                                  +  />
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                  +    *ngIf="formControl.value && formControl.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                  +    type="button"
                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                  +    matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                  +    (click)="delete(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                  +    i18n-mattooltip="Tooltip remove file"
                                                                                                                                                                                                                                                                                                                                                                                                  +    matTooltip="Remove file"
                                                                                                                                                                                                                                                                                                                                                                                                  +    [disabled]="!navigator.onLine"
                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                  +    <fa-icon icon="xmark"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                  +    *ngIf="formControl.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                  +    type="button"
                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                  +    matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                  +    (click)="fileUpload.click(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                  +    i18n-matTooltip="Tooltip upload file button"
                                                                                                                                                                                                                                                                                                                                                                                                  +    matTooltip="Upload file"
                                                                                                                                                                                                                                                                                                                                                                                                  +    [disabled]="!navigator.onLine"
                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                  +    <fa-icon icon="upload"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  @if (!navigator.onLine && formControl.enabled) {
                                                                                                                                                                                                                                                                                                                                                                                                  +    <mat-hint i18n>Changes to files are not possible offline.</mat-hint>
                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                  +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                  +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                  +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  + ./edit-file.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  /* let click events on disabled input be handled by parent element (because browsers completely eat them up otherwise)
                                                                                                                                                                                                                                                                                                                                                                                                  + https://stackoverflow.com/a/32925830/1473411  */
                                                                                                                                                                                                                                                                                                                                                                                                  +input[disabled] {
                                                                                                                                                                                                                                                                                                                                                                                                  +  pointer-events: none;
                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +.clickable,
                                                                                                                                                                                                                                                                                                                                                                                                  +.clickable * {
                                                                                                                                                                                                                                                                                                                                                                                                  +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +.filename {
                                                                                                                                                                                                                                                                                                                                                                                                  +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditLocationComponent.html b/documentation/components/EditLocationComponent.html new file mode 100644 index 0000000000..823297f1a6 --- /dev/null +++ b/documentation/components/EditLocationComponent.html @@ -0,0 +1,791 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/features/location/edit-location/edit-location.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Wrapper of LocationInput for use as an EditComponent. +(this should become obsolete after we refactor all EditComponents to be implemented as FormControls)

                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                    +import { EditComponent } from "../../../core/entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                    +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                    +import { LocationInputComponent } from "../location-input/location-input.component";
                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatError, MatFormField, MatLabel } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                    +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                    +import { ErrorHintComponent } from "../../../core/common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                    + * Wrapper of LocationInput for use as an EditComponent.
                                                                                                                                                                                                                                                                                                                                                                                                    + * (this should become obsolete after we refactor all EditComponents to be implemented as FormControls)
                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                    +@DynamicComponent("EditLocation")
                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-edit-location",
                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./edit-location.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                    +    LocationInputComponent,
                                                                                                                                                                                                                                                                                                                                                                                                    +    MatFormField,
                                                                                                                                                                                                                                                                                                                                                                                                    +    MatLabel,
                                                                                                                                                                                                                                                                                                                                                                                                    +    MatError,
                                                                                                                                                                                                                                                                                                                                                                                                    +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                    +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./edit-location.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                    +export class EditLocationComponent extends EditComponent<GeoLocation> {}
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    <mat-form-field [formGroup]="parent">
                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +  <app-location-input
                                                                                                                                                                                                                                                                                                                                                                                                    +    [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                                    +    [placeholder]="label"
                                                                                                                                                                                                                                                                                                                                                                                                    +  ></app-location-input>
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                    +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                    +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    + ./edit-location.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditLongTextComponent.html b/documentation/components/EditLongTextComponent.html new file mode 100644 index 0000000000..909cd8a38c --- /dev/null +++ b/documentation/components/EditLongTextComponent.html @@ -0,0 +1,759 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/string/edit-long-text/edit-long-text.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                      + + + +

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                      +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                      +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                      +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("EditLongText")
                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-edit-long-text",
                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./edit-long-text.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                      +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                      +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                      +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                      +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                      +export class EditLongTextComponent extends EditComponent<string> {}
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      <mat-form-field [formGroup]="parent">
                                                                                                                                                                                                                                                                                                                                                                                                      +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                      +  <textarea
                                                                                                                                                                                                                                                                                                                                                                                                      +    matInput
                                                                                                                                                                                                                                                                                                                                                                                                      +    [formControlName]="formControlName"
                                                                                                                                                                                                                                                                                                                                                                                                      +    [title]="label"
                                                                                                                                                                                                                                                                                                                                                                                                      +    rows="4"
                                                                                                                                                                                                                                                                                                                                                                                                      +  ></textarea>
                                                                                                                                                                                                                                                                                                                                                                                                      +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                      +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                      +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                      +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditMonthComponent.html b/documentation/components/EditMonthComponent.html new file mode 100644 index 0000000000..bb9fcb8e50 --- /dev/null +++ b/documentation/components/EditMonthComponent.html @@ -0,0 +1,960 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/basic-datatypes/month/edit-month/edit-month.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + setMonthAndYear + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +setMonthAndYear(date: Moment, datepicker: MatDatepicker) +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                        date + Moment + + No +
                                                                                                                                                                                                                                                                                                                                                                                                        datepicker + MatDatepicker<Moment> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, ViewEncapsulation } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                        +  MatDatepicker,
                                                                                                                                                                                                                                                                                                                                                                                                        +  MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                        +  DateAdapter,
                                                                                                                                                                                                                                                                                                                                                                                                        +  MAT_DATE_FORMATS,
                                                                                                                                                                                                                                                                                                                                                                                                        +  MAT_DATE_LOCALE,
                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { Moment } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                        +  MAT_MOMENT_DATE_ADAPTER_OPTIONS,
                                                                                                                                                                                                                                                                                                                                                                                                        +  MomentDateAdapter,
                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/material-moment-adapter";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +export const MY_FORMATS = {
                                                                                                                                                                                                                                                                                                                                                                                                        +  parse: {
                                                                                                                                                                                                                                                                                                                                                                                                        +    dateInput: "YYYY-MM",
                                                                                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                                                                                        +  display: {
                                                                                                                                                                                                                                                                                                                                                                                                        +    dateInput: "YYYY-MM",
                                                                                                                                                                                                                                                                                                                                                                                                        +    monthYearLabel: "YYYY MMM",
                                                                                                                                                                                                                                                                                                                                                                                                        +    dateA11yLabel: "LL",
                                                                                                                                                                                                                                                                                                                                                                                                        +    monthYearA11yLabel: "YYYY MMMM",
                                                                                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                                                                                        +};
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-edit-month",
                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                        +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +    MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./edit-month.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./edit-month.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                        +  providers: [
                                                                                                                                                                                                                                                                                                                                                                                                        +    { provide: MAT_DATE_FORMATS, useValue: MY_FORMATS },
                                                                                                                                                                                                                                                                                                                                                                                                        +    {
                                                                                                                                                                                                                                                                                                                                                                                                        +      provide: DateAdapter,
                                                                                                                                                                                                                                                                                                                                                                                                        +      useClass: MomentDateAdapter,
                                                                                                                                                                                                                                                                                                                                                                                                        +      deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],
                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                        +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                        +export class EditMonthComponent extends EditComponent<Date> {
                                                                                                                                                                                                                                                                                                                                                                                                        +  setMonthAndYear(date: Moment, datepicker: MatDatepicker<Moment>) {
                                                                                                                                                                                                                                                                                                                                                                                                        +    this.formControl.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                                        +    this.formControl.setValue(date.toDate());
                                                                                                                                                                                                                                                                                                                                                                                                        +    datepicker.close();
                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                        +  <input
                                                                                                                                                                                                                                                                                                                                                                                                        +    matInput
                                                                                                                                                                                                                                                                                                                                                                                                        +    [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                                        +    [matDatepicker]="datepickerComp"
                                                                                                                                                                                                                                                                                                                                                                                                        +  />
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +  <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                        +    *ngIf="isPartiallyAnonymized"
                                                                                                                                                                                                                                                                                                                                                                                                        +    matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                        +    icon="warning"
                                                                                                                                                                                                                                                                                                                                                                                                        +    matTooltip="This data has been partially anonymized."
                                                                                                                                                                                                                                                                                                                                                                                                        +    i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                        +  ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-datepicker-toggle
                                                                                                                                                                                                                                                                                                                                                                                                        +    matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                        +    [for]="datepickerComp"
                                                                                                                                                                                                                                                                                                                                                                                                        +  ></mat-datepicker-toggle>
                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-datepicker
                                                                                                                                                                                                                                                                                                                                                                                                        +    #datepickerComp
                                                                                                                                                                                                                                                                                                                                                                                                        +    startView="multi-year"
                                                                                                                                                                                                                                                                                                                                                                                                        +    (monthSelected)="setMonthAndYear($event, datepickerComp)"
                                                                                                                                                                                                                                                                                                                                                                                                        +    panelClass="month-picker"
                                                                                                                                                                                                                                                                                                                                                                                                        +  ></mat-datepicker>
                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                        +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                        +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                        +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        + ./edit-month.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        .month-picker .mat-calendar-period-button {
                                                                                                                                                                                                                                                                                                                                                                                                        +  pointer-events: none;
                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +.month-picker .mat-calendar-arrow {
                                                                                                                                                                                                                                                                                                                                                                                                        +  display: none;
                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditNumberComponent.html b/documentation/components/EditNumberComponent.html new file mode 100644 index 0000000000..8f5a6666a2 --- /dev/null +++ b/documentation/components/EditNumberComponent.html @@ -0,0 +1,779 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/number/edit-number/edit-number.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                          +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                          +import { CustomNumberValidators } from "../../../../utils/custom-number-validators";
                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                          +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                          +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +@DynamicComponent("EditNumber")
                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-edit-number",
                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./edit-number.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                          +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                          +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                          +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                          +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                          +export class EditNumberComponent
                                                                                                                                                                                                                                                                                                                                                                                                          +  extends EditComponent<number>
                                                                                                                                                                                                                                                                                                                                                                                                          +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                          +{
                                                                                                                                                                                                                                                                                                                                                                                                          +  override ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                          +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                          +    const newValidators = [CustomNumberValidators.isNumber];
                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.formControl.validator) {
                                                                                                                                                                                                                                                                                                                                                                                                          +      newValidators.push(this.formControl.validator);
                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                          +    this.formControl.setValidators(newValidators);
                                                                                                                                                                                                                                                                                                                                                                                                          +    this.formControl.updateValueAndValidity();
                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          <mat-form-field [formGroup]="parent">
                                                                                                                                                                                                                                                                                                                                                                                                          +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                          +  <input
                                                                                                                                                                                                                                                                                                                                                                                                          +    matInput
                                                                                                                                                                                                                                                                                                                                                                                                          +    type="number"
                                                                                                                                                                                                                                                                                                                                                                                                          +    [formControlName]="formControlName"
                                                                                                                                                                                                                                                                                                                                                                                                          +    [title]="label"
                                                                                                                                                                                                                                                                                                                                                                                                          +  />
                                                                                                                                                                                                                                                                                                                                                                                                          +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                          +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                          +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                          +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditPhotoComponent.html b/documentation/components/EditPhotoComponent.html new file mode 100644 index 0000000000..88a562a898 --- /dev/null +++ b/documentation/components/EditPhotoComponent.html @@ -0,0 +1,1583 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/file/edit-photo/edit-photo.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            + EditFileComponent +

                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(fileService: FileService, alertService: AlertService, entityMapper: EntityMapperService, dialog: MatDialog, navigator: Navigator) +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                            fileService + FileService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                            alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                            dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                            navigator + Navigator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + delete + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + delete() +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + + deleteExistingFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + deleteExistingFile() +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + Async + onFileSelected + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + onFileSelected(file: File) +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                            file + File + + No +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + openPopup + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +openPopup() +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + + resetFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + resetFile() +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + formClicked + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +formClicked() +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + saveNewFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + saveNewFile(file: File) +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                            file + File + + No +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + showFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +showFile() +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + imgPath + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : SafeUrl + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : this.initialImg +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + fileUploadInput + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ElementRef<HTMLInputElement> + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                            + + @ViewChild('fileUpload')
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + initialValue + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditFileComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { EditFileComponent } from "../edit-file/edit-file.component";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { SafeUrl } from "@angular/platform-browser";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { FileService } from "../file.service";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { AlertService } from "../../../core/alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { resizeImage } from "../file-utils";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImagePopupComponent } from "./image-popup/image-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { NAVIGATOR_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatHint } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +@DynamicComponent("EditPhoto")
                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-edit-photo",
                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./edit-photo.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./edit-photo.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                            +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                            +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                            +    MatHint,
                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                            +export class EditPhotoComponent extends EditFileComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                            +  private readonly defaultImage = "assets/child.png";
                                                                                                                                                                                                                                                                                                                                                                                                            +  private compression = 480;
                                                                                                                                                                                                                                                                                                                                                                                                            +  private initialImg: SafeUrl = this.defaultImage;
                                                                                                                                                                                                                                                                                                                                                                                                            +  imgPath: SafeUrl = this.initialImg;
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                            +    fileService: FileService,
                                                                                                                                                                                                                                                                                                                                                                                                            +    alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                            +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                            +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                            +    @Inject(NAVIGATOR_TOKEN) navigator: Navigator,
                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                            +    super(fileService, alertService, entityMapper, navigator);
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  override async onFileSelected(file: File): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                            +    const cvs = await resizeImage(file, this.compression);
                                                                                                                                                                                                                                                                                                                                                                                                            +    this.imgPath = cvs.toDataURL();
                                                                                                                                                                                                                                                                                                                                                                                                            +    const blob = await new Promise<Blob>((res) => cvs.toBlob(res));
                                                                                                                                                                                                                                                                                                                                                                                                            +    const reducedFile = new File([blob], file.name, {
                                                                                                                                                                                                                                                                                                                                                                                                            +      type: file.type,
                                                                                                                                                                                                                                                                                                                                                                                                            +      lastModified: file.lastModified,
                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                            +    return super.onFileSelected(reducedFile);
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  override ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                            +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                            +    this.compression = this.additional ?? this.compression;
                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.formControl.value) {
                                                                                                                                                                                                                                                                                                                                                                                                            +      this.fileService
                                                                                                                                                                                                                                                                                                                                                                                                            +        .loadFile(this.entity, this.formControlName)
                                                                                                                                                                                                                                                                                                                                                                                                            +        .subscribe((res) => {
                                                                                                                                                                                                                                                                                                                                                                                                            +          this.imgPath = res;
                                                                                                                                                                                                                                                                                                                                                                                                            +          this.initialImg = res;
                                                                                                                                                                                                                                                                                                                                                                                                            +        });
                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  override delete() {
                                                                                                                                                                                                                                                                                                                                                                                                            +    this.resetPreview(this.defaultImage);
                                                                                                                                                                                                                                                                                                                                                                                                            +    super.delete();
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  protected override resetFile() {
                                                                                                                                                                                                                                                                                                                                                                                                            +    this.resetPreview(this.initialImg);
                                                                                                                                                                                                                                                                                                                                                                                                            +    super.resetFile();
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  private resetPreview(resetImage: SafeUrl) {
                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.imgPath !== this.initialImg) {
                                                                                                                                                                                                                                                                                                                                                                                                            +      URL.revokeObjectURL(this.imgPath as string);
                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                            +    this.imgPath = resetImage;
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  protected override deleteExistingFile() {
                                                                                                                                                                                                                                                                                                                                                                                                            +    URL.revokeObjectURL(this.initialImg as string);
                                                                                                                                                                                                                                                                                                                                                                                                            +    this.initialImg = this.defaultImage;
                                                                                                                                                                                                                                                                                                                                                                                                            +    super.deleteExistingFile();
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  openPopup() {
                                                                                                                                                                                                                                                                                                                                                                                                            +    this.dialog.open(ImagePopupComponent, { data: { url: this.imgPath } });
                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            <img [src]="imgPath" alt="Image" class="image" (click)="openPopup()" />
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +<div
                                                                                                                                                                                                                                                                                                                                                                                                            +  class="img-controls"
                                                                                                                                                                                                                                                                                                                                                                                                            +  [matTooltipDisabled]="!(formControl.enabled && !navigator.onLine)"
                                                                                                                                                                                                                                                                                                                                                                                                            +  matTooltip="Changes to files are not possible offline."
                                                                                                                                                                                                                                                                                                                                                                                                            +  i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                                                                                                                                            +  <label class="img-label">{{ label }}</label>
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  <button
                                                                                                                                                                                                                                                                                                                                                                                                            +    *ngIf="formControl.value && formControl.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                            +    type="button"
                                                                                                                                                                                                                                                                                                                                                                                                            +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                            +    (click)="delete()"
                                                                                                                                                                                                                                                                                                                                                                                                            +    i18n-mattooltip="Tooltip remove file"
                                                                                                                                                                                                                                                                                                                                                                                                            +    matTooltip="Remove file"
                                                                                                                                                                                                                                                                                                                                                                                                            +    [disabled]="!navigator.onLine"
                                                                                                                                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                                                                                                                                            +    <fa-icon icon="xmark"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                            +  <button
                                                                                                                                                                                                                                                                                                                                                                                                            +    *ngIf="formControl.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                            +    type="button"
                                                                                                                                                                                                                                                                                                                                                                                                            +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                            +    (click)="fileUpload.click()"
                                                                                                                                                                                                                                                                                                                                                                                                            +    i18n-matTooltip="Tooltip upload file button"
                                                                                                                                                                                                                                                                                                                                                                                                            +    matTooltip="Upload file"
                                                                                                                                                                                                                                                                                                                                                                                                            +    [disabled]="!navigator.onLine"
                                                                                                                                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                                                                                                                                            +    <fa-icon icon="upload"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +  <input
                                                                                                                                                                                                                                                                                                                                                                                                            +    type="file"
                                                                                                                                                                                                                                                                                                                                                                                                            +    style="display: none"
                                                                                                                                                                                                                                                                                                                                                                                                            +    (change)="onFileSelected($event.target['files'][0])"
                                                                                                                                                                                                                                                                                                                                                                                                            +    accept="image/*"
                                                                                                                                                                                                                                                                                                                                                                                                            +    #fileUpload
                                                                                                                                                                                                                                                                                                                                                                                                            +  />
                                                                                                                                                                                                                                                                                                                                                                                                            +</div>
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            + ./edit-photo.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            :host {
                                                                                                                                                                                                                                                                                                                                                                                                            +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                            +  flex-direction: column;
                                                                                                                                                                                                                                                                                                                                                                                                            +  align-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +.image {
                                                                                                                                                                                                                                                                                                                                                                                                            +  width: 150px;
                                                                                                                                                                                                                                                                                                                                                                                                            +  height: 150px;
                                                                                                                                                                                                                                                                                                                                                                                                            +  border-radius: 50%;
                                                                                                                                                                                                                                                                                                                                                                                                            +  object-fit: cover;
                                                                                                                                                                                                                                                                                                                                                                                                            +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                            +  background: lightgrey;
                                                                                                                                                                                                                                                                                                                                                                                                            +  display: block;
                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +.img-controls {
                                                                                                                                                                                                                                                                                                                                                                                                            +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                            +  align-items: flex-end;
                                                                                                                                                                                                                                                                                                                                                                                                            +  height: 48px;
                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                            +.img-label {
                                                                                                                                                                                                                                                                                                                                                                                                            +  margin: auto;
                                                                                                                                                                                                                                                                                                                                                                                                            +  color: rgba(0, 0, 0, 0.6);
                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditProgressDashboardComponent.html b/documentation/components/EditProgressDashboardComponent.html new file mode 100644 index 0000000000..1e672037c7 --- /dev/null +++ b/documentation/components/EditProgressDashboardComponent.html @@ -0,0 +1,1132 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/dashboard-widgets/progress-dashboard-widget/edit-progress-dashboard/edit-progress-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(data: ProgressDashboardConfig, fb: FormBuilder) +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                              data + ProgressDashboardConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                              fb + FormBuilder + + No +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + addPart + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +addPart() +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + createPartForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +createPartForm(part: ProgressDashboardPart) +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                              part + ProgressDashboardPart + + No +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + currentLessThanTarget + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +currentLessThanTarget(control: TypedFormGroup<ProgressDashboardPart>) +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                              control + TypedFormGroup<ProgressDashboardPart> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : ValidationErrors | null + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + removePart + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +removePart(index: number) +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                              index + number + + No +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + Readonly + currentErrorStateMatcher + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Type : ErrorStateMatcher + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : { + isErrorState: (control: FormControl | null) => !control?.parent?.valid, + } +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              This marks the control as invalid when the whole form has an error

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + outputData + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + parts + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Type : FormArray + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + title + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + Type : FormControl + +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                              +  ProgressDashboardConfig,
                                                                                                                                                                                                                                                                                                                                                                                                              +  ProgressDashboardPart,
                                                                                                                                                                                                                                                                                                                                                                                                              +} from "../progress-dashboard/progress-dashboard-config";
                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                              +  FormArray,
                                                                                                                                                                                                                                                                                                                                                                                                              +  FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                              +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                              +  FormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                              +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +  ValidationErrors,
                                                                                                                                                                                                                                                                                                                                                                                                              +  Validators,
                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { ErrorStateMatcher } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { DialogCloseComponent } from "../../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                              +import { TypedFormGroup } from "../../../../core/common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +export interface EditProgressDashboardComponentData {
                                                                                                                                                                                                                                                                                                                                                                                                              +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                              +  parts: ProgressDashboardPart[];
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-edit-progress-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./edit-progress-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./edit-progress-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                              +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                              +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                              +export class EditProgressDashboardComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                              +   * This marks the control as invalid when the whole form has an error
                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                              +  readonly currentErrorStateMatcher: ErrorStateMatcher = {
                                                                                                                                                                                                                                                                                                                                                                                                              +    isErrorState: (control: FormControl | null) => !control?.parent?.valid,
                                                                                                                                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  title: FormControl;
                                                                                                                                                                                                                                                                                                                                                                                                              +  parts: FormArray;
                                                                                                                                                                                                                                                                                                                                                                                                              +  outputData: FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                              +    @Inject(MAT_DIALOG_DATA) private data: ProgressDashboardConfig,
                                                                                                                                                                                                                                                                                                                                                                                                              +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                              +    this.title = new FormControl(this.data.title, [Validators.required]);
                                                                                                                                                                                                                                                                                                                                                                                                              +    this.parts = this.fb.array(
                                                                                                                                                                                                                                                                                                                                                                                                              +      this.data.parts.map((part) => this.createPartForm(part)),
                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                              +    this.outputData = new FormGroup({
                                                                                                                                                                                                                                                                                                                                                                                                              +      title: this.title,
                                                                                                                                                                                                                                                                                                                                                                                                              +      parts: this.parts,
                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  createPartForm(part: ProgressDashboardPart) {
                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.fb.group(
                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                              +        label: this.fb.control(part.label, [Validators.required]),
                                                                                                                                                                                                                                                                                                                                                                                                              +        currentValue: this.fb.control(part.currentValue, [
                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.required,
                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.min(0),
                                                                                                                                                                                                                                                                                                                                                                                                              +        ]),
                                                                                                                                                                                                                                                                                                                                                                                                              +        targetValue: this.fb.control(part.targetValue, [
                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.required,
                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.min(0),
                                                                                                                                                                                                                                                                                                                                                                                                              +        ]),
                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                              +        validators: [this.currentLessThanTarget],
                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  currentLessThanTarget(
                                                                                                                                                                                                                                                                                                                                                                                                              +    control: TypedFormGroup<ProgressDashboardPart>,
                                                                                                                                                                                                                                                                                                                                                                                                              +  ): ValidationErrors | null {
                                                                                                                                                                                                                                                                                                                                                                                                              +    const current = control.get("currentValue");
                                                                                                                                                                                                                                                                                                                                                                                                              +    const target = control.get("targetValue");
                                                                                                                                                                                                                                                                                                                                                                                                              +    if (current.value > target.value) {
                                                                                                                                                                                                                                                                                                                                                                                                              +      return {
                                                                                                                                                                                                                                                                                                                                                                                                              +        currentGtTarget: true,
                                                                                                                                                                                                                                                                                                                                                                                                              +      };
                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                              +      return null;
                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  addPart() {
                                                                                                                                                                                                                                                                                                                                                                                                              +    const newPart: ProgressDashboardPart = {
                                                                                                                                                                                                                                                                                                                                                                                                              +      label: $localize`:Part of a whole:Part`,
                                                                                                                                                                                                                                                                                                                                                                                                              +      currentValue: 1,
                                                                                                                                                                                                                                                                                                                                                                                                              +      targetValue: 10,
                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                              +    this.parts.push(this.createPartForm(newPart));
                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  removePart(index: number) {
                                                                                                                                                                                                                                                                                                                                                                                                              +    this.parts.removeAt(index);
                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              <div mat-dialog-title style="display: flex">
                                                                                                                                                                                                                                                                                                                                                                                                              +  <mat-form-field class="title-field margin-top-small">
                                                                                                                                                                                                                                                                                                                                                                                                              +    <input
                                                                                                                                                                                                                                                                                                                                                                                                              +      [formControl]="title"
                                                                                                                                                                                                                                                                                                                                                                                                              +      matInput
                                                                                                                                                                                                                                                                                                                                                                                                              +      type="text"
                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n-placeholder="
                                                                                                                                                                                                                                                                                                                                                                                                              +        Title Progress|Edit the progress of one or multiple tasks
                                                                                                                                                                                                                                                                                                                                                                                                              +      "
                                                                                                                                                                                                                                                                                                                                                                                                              +      placeholder="Title"
                                                                                                                                                                                                                                                                                                                                                                                                              +    />
                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-error *ngIf="title.hasError('required')" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                              +      This field is required
                                                                                                                                                                                                                                                                                                                                                                                                              +    </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                              +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +<mat-dialog-content class="dialog-content">
                                                                                                                                                                                                                                                                                                                                                                                                              +  <div
                                                                                                                                                                                                                                                                                                                                                                                                              +    *ngFor="let control of parts.controls; let index = index"
                                                                                                                                                                                                                                                                                                                                                                                                              +    class="entry-wrapper mat-elevation-z1"
                                                                                                                                                                                                                                                                                                                                                                                                              +    [formGroup]="$any(control)"
                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-form-field class="header-field">
                                                                                                                                                                                                                                                                                                                                                                                                              +      <input
                                                                                                                                                                                                                                                                                                                                                                                                              +        formControlName="label"
                                                                                                                                                                                                                                                                                                                                                                                                              +        matInput
                                                                                                                                                                                                                                                                                                                                                                                                              +        type="text"
                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n-placeholder="Process Label|The label of a process or task"
                                                                                                                                                                                                                                                                                                                                                                                                              +        placeholder="Task"
                                                                                                                                                                                                                                                                                                                                                                                                              +      />
                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-error *ngIf="control.hasError('required', 'label')" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                              +        This field is required
                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                              +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +    <button mat-icon-button color="accent" (click)="removePart(index)">
                                                                                                                                                                                                                                                                                                                                                                                                              +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                              +        class="button-icon"
                                                                                                                                                                                                                                                                                                                                                                                                              +        aria-label="remove element"
                                                                                                                                                                                                                                                                                                                                                                                                              +        icon="trash"
                                                                                                                                                                                                                                                                                                                                                                                                              +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-form-field class="current-field">
                                                                                                                                                                                                                                                                                                                                                                                                              +      <input
                                                                                                                                                                                                                                                                                                                                                                                                              +        formControlName="currentValue"
                                                                                                                                                                                                                                                                                                                                                                                                              +        matInput
                                                                                                                                                                                                                                                                                                                                                                                                              +        type="number"
                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n-placeholder="
                                                                                                                                                                                                                                                                                                                                                                                                              +          Current process|The Current value of a process or task
                                                                                                                                                                                                                                                                                                                                                                                                              +        "
                                                                                                                                                                                                                                                                                                                                                                                                              +        placeholder="Current"
                                                                                                                                                                                                                                                                                                                                                                                                              +        [errorStateMatcher]="currentErrorStateMatcher"
                                                                                                                                                                                                                                                                                                                                                                                                              +      />
                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-error *ngIf="control.hasError('required', 'currentValue')" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                              +        This field is required
                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-error *ngIf="control.hasError('min', 'currentValue')" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                              +        Must be greater than 0
                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-error
                                                                                                                                                                                                                                                                                                                                                                                                              +        *ngIf="control.hasError('currentGtTarget')"
                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n="
                                                                                                                                                                                                                                                                                                                                                                                                              +          The number entered in this form is less than another field but should
                                                                                                                                                                                                                                                                                                                                                                                                              +          not be
                                                                                                                                                                                                                                                                                                                                                                                                              +        "
                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                              +        Must not be greater than target
                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                              +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-form-field class="target-field">
                                                                                                                                                                                                                                                                                                                                                                                                              +      <input
                                                                                                                                                                                                                                                                                                                                                                                                              +        formControlName="targetValue"
                                                                                                                                                                                                                                                                                                                                                                                                              +        matInput
                                                                                                                                                                                                                                                                                                                                                                                                              +        type="number"
                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n-placeholder="Target process|The target amount of a process"
                                                                                                                                                                                                                                                                                                                                                                                                              +        placeholder="Target"
                                                                                                                                                                                                                                                                                                                                                                                                              +      />
                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-error
                                                                                                                                                                                                                                                                                                                                                                                                              +        *ngIf="control.hasError('required', 'targetValue')"
                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n="A field entered in a form is required and wasn't provided"
                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                              +        This field is required
                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-error
                                                                                                                                                                                                                                                                                                                                                                                                              +        *ngIf="control.hasError('min', 'targetValue')"
                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n="A field entered in a form must be greater than 0"
                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                              +        Must be greater than 0
                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                              +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +  <div>
                                                                                                                                                                                                                                                                                                                                                                                                              +    <button mat-button color="accent" (click)="addPart()">
                                                                                                                                                                                                                                                                                                                                                                                                              +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                              +        class="button-icon margin-sides-small"
                                                                                                                                                                                                                                                                                                                                                                                                              +        aria-label="add element"
                                                                                                                                                                                                                                                                                                                                                                                                              +        icon="plus-circle"
                                                                                                                                                                                                                                                                                                                                                                                                              +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                              +      <span i18n="Add a task to the progress dashboard list">
                                                                                                                                                                                                                                                                                                                                                                                                              +        Add New Task
                                                                                                                                                                                                                                                                                                                                                                                                              +      </span>
                                                                                                                                                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                              +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                              +    color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                              +    [mat-dialog-close]="outputData.value"
                                                                                                                                                                                                                                                                                                                                                                                                              +    [disabled]="outputData.invalid"
                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                              +    <span
                                                                                                                                                                                                                                                                                                                                                                                                              +      matTooltip="Fix the errors to save the form"
                                                                                                                                                                                                                                                                                                                                                                                                              +      [matTooltipDisabled]="outputData.valid"
                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n-matTooltip="Shown when there are errors that prevent saving"
                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n
                                                                                                                                                                                                                                                                                                                                                                                                              +      >Save</span
                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                              +  <button mat-stroked-button mat-dialog-close i18n>Cancel</button>
                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              + ./edit-progress-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.entry-wrapper {
                                                                                                                                                                                                                                                                                                                                                                                                              +  display: grid;
                                                                                                                                                                                                                                                                                                                                                                                                              +  grid-template-columns: repeat(2, 1fr) 64px;
                                                                                                                                                                                                                                                                                                                                                                                                              +  grid-template-rows: repeat(2, 1fr);
                                                                                                                                                                                                                                                                                                                                                                                                              +  grid-gap: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                              +  grid-template-areas:
                                                                                                                                                                                                                                                                                                                                                                                                              +    "header header trash"
                                                                                                                                                                                                                                                                                                                                                                                                              +    "current target trash";
                                                                                                                                                                                                                                                                                                                                                                                                              +  padding: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.entry-wrapper:not(:last-child) {
                                                                                                                                                                                                                                                                                                                                                                                                              +  margin-bottom: sizes.$large;
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.entry-wrapper:last-child {
                                                                                                                                                                                                                                                                                                                                                                                                              +  margin-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.title-field {
                                                                                                                                                                                                                                                                                                                                                                                                              +  input {
                                                                                                                                                                                                                                                                                                                                                                                                              +    font-size: 32px;
                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                              +  width: 90%;
                                                                                                                                                                                                                                                                                                                                                                                                              +  min-width: 0;
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.header-field {
                                                                                                                                                                                                                                                                                                                                                                                                              +  grid-area: header;
                                                                                                                                                                                                                                                                                                                                                                                                              +  min-width: 0;
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.current-field {
                                                                                                                                                                                                                                                                                                                                                                                                              +  grid-area: current;
                                                                                                                                                                                                                                                                                                                                                                                                              +  min-width: 0;
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.target-field {
                                                                                                                                                                                                                                                                                                                                                                                                              +  grid-area: target;
                                                                                                                                                                                                                                                                                                                                                                                                              +  min-width: 0;
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +.dialog-content {
                                                                                                                                                                                                                                                                                                                                                                                                              +  @media (max-height: 800px) {
                                                                                                                                                                                                                                                                                                                                                                                                              +    height: 40vh;
                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditRecurringIntervalComponent.html b/documentation/components/EditRecurringIntervalComponent.html new file mode 100644 index 0000000000..f30091bda6 --- /dev/null +++ b/documentation/components/EditRecurringIntervalComponent.html @@ -0,0 +1,1157 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/todos/recurring-interval/edit-recurring-interval/edit-recurring-interval.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Form field to edit a time interval for repetitions.

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                The schema or config accepts pre-defined options for the dropdown as additional.

                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(matDialog: MatDialog) +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                matDialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + openCustomIntervalSelection + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +openCustomIntervalSelection(event: MatOptionSelectionChange<TimeInterval>) +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                event + MatOptionSelectionChange<TimeInterval> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + resetSelection + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +resetSelection() +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + compareOptionFun + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + predefinedIntervals + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [ + { + label: $localize`:default interval select option:weekly`, + interval: { amount: 1, unit: "week" }, + }, + { + label: $localize`:default interval select option:monthly`, + interval: { amount: 1, unit: "month" }, + }, + ] +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { EditComponent } from "../../../../core/entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { generateLabelFromInterval, TimeInterval } from "../time-interval";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { CustomIntervalComponent } from "../custom-interval/custom-interval.component";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatOptionSelectionChange } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                +import { ErrorHintComponent } from "../../../../core/common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                + * Form field to edit a time interval for repetitions.
                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                + * The schema or config accepts pre-defined options for the dropdown as `additional`.
                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("EditRecurringInterval")
                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-edit-recurring-interval",
                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./edit-recurring-interval.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./edit-recurring-interval.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                +export class EditRecurringIntervalComponent
                                                                                                                                                                                                                                                                                                                                                                                                                +  extends EditComponent<any>
                                                                                                                                                                                                                                                                                                                                                                                                                +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                +{
                                                                                                                                                                                                                                                                                                                                                                                                                +  predefinedIntervals: { label: string; interval: TimeInterval }[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                +    {
                                                                                                                                                                                                                                                                                                                                                                                                                +      label: $localize`:default interval select option:weekly`,
                                                                                                                                                                                                                                                                                                                                                                                                                +      interval: { amount: 1, unit: "week" },
                                                                                                                                                                                                                                                                                                                                                                                                                +    },
                                                                                                                                                                                                                                                                                                                                                                                                                +    {
                                                                                                                                                                                                                                                                                                                                                                                                                +      label: $localize`:default interval select option:monthly`,
                                                                                                                                                                                                                                                                                                                                                                                                                +      interval: { amount: 1, unit: "month" },
                                                                                                                                                                                                                                                                                                                                                                                                                +    },
                                                                                                                                                                                                                                                                                                                                                                                                                +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  compareOptionFun = (a: TimeInterval, b: TimeInterval) =>
                                                                                                                                                                                                                                                                                                                                                                                                                +    JSON.stringify(a) === JSON.stringify(b);
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(private matDialog: MatDialog) {
                                                                                                                                                                                                                                                                                                                                                                                                                +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  override ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                                +    this.predefinedIntervals = this.additional ?? this.predefinedIntervals;
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +    // re-create active custom interval if necessary
                                                                                                                                                                                                                                                                                                                                                                                                                +    this.addCustomInterval(this.formControl.value);
                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  resetSelection() {
                                                                                                                                                                                                                                                                                                                                                                                                                +    this.formControl.setValue(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  openCustomIntervalSelection(event: MatOptionSelectionChange<TimeInterval>) {
                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!event.isUserInput) {
                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +    const previousSelectedInterval = this.formControl.value;
                                                                                                                                                                                                                                                                                                                                                                                                                +    this.matDialog
                                                                                                                                                                                                                                                                                                                                                                                                                +      .open(CustomIntervalComponent)
                                                                                                                                                                                                                                                                                                                                                                                                                +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                +      .subscribe((result: TimeInterval) => {
                                                                                                                                                                                                                                                                                                                                                                                                                +        if (result === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                +          // keep unchanged, i.e. revert to previous selection
                                                                                                                                                                                                                                                                                                                                                                                                                +          this.formControl.setValue(previousSelectedInterval);
                                                                                                                                                                                                                                                                                                                                                                                                                +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                +          this.addCustomInterval(result);
                                                                                                                                                                                                                                                                                                                                                                                                                +          this.formControl.setValue(result);
                                                                                                                                                                                                                                                                                                                                                                                                                +          this.formControl.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  private addCustomInterval(interval: TimeInterval) {
                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!interval) {
                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +    const selectedOptionValue = this.predefinedIntervals.find((o) =>
                                                                                                                                                                                                                                                                                                                                                                                                                +      this.compareOptionFun(interval, o.interval),
                                                                                                                                                                                                                                                                                                                                                                                                                +    )?.interval;
                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!selectedOptionValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                +      this.predefinedIntervals.push({
                                                                                                                                                                                                                                                                                                                                                                                                                +        label: generateLabelFromInterval(interval),
                                                                                                                                                                                                                                                                                                                                                                                                                +        interval: interval,
                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                <mat-form-field [formGroup]="parent">
                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                +    <fa-icon icon="repeat"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                +    {{ label }}
                                                                                                                                                                                                                                                                                                                                                                                                                +  </mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-select
                                                                                                                                                                                                                                                                                                                                                                                                                +    [formControlName]="formControlName"
                                                                                                                                                                                                                                                                                                                                                                                                                +    [compareWith]="compareOptionFun"
                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-option *ngFor="let o of predefinedIntervals" [value]="o.interval">
                                                                                                                                                                                                                                                                                                                                                                                                                +      {{ o.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                +    </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                +      (onSelectionChange)="openCustomIntervalSelection($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                +      i18n="recurring interval option"
                                                                                                                                                                                                                                                                                                                                                                                                                +      class="special-option"
                                                                                                                                                                                                                                                                                                                                                                                                                +    >
                                                                                                                                                                                                                                                                                                                                                                                                                +      <fa-icon icon="tools" [fixedWidth]="true"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                +      define other interval
                                                                                                                                                                                                                                                                                                                                                                                                                +    </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                +      [value]="undefined"
                                                                                                                                                                                                                                                                                                                                                                                                                +      (onSelectionChange)="resetSelection()"
                                                                                                                                                                                                                                                                                                                                                                                                                +      i18n="recurring interval option"
                                                                                                                                                                                                                                                                                                                                                                                                                +      class="special-option"
                                                                                                                                                                                                                                                                                                                                                                                                                +    >
                                                                                                                                                                                                                                                                                                                                                                                                                +      <fa-icon icon="xmark" [fixedWidth]="true"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                +      does not repeat
                                                                                                                                                                                                                                                                                                                                                                                                                +    </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                +  </mat-select>
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                + ./edit-recurring-interval.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                .special-option {
                                                                                                                                                                                                                                                                                                                                                                                                                +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +.suffix-action {
                                                                                                                                                                                                                                                                                                                                                                                                                +  display: inline;
                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +.tooltip-suffix {
                                                                                                                                                                                                                                                                                                                                                                                                                +  margin: 4px;
                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditTextComponent.html b/documentation/components/EditTextComponent.html new file mode 100644 index 0000000000..206c678585 --- /dev/null +++ b/documentation/components/EditTextComponent.html @@ -0,0 +1,772 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/basic-datatypes/string/edit-text/edit-text.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:52 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EditComponent } from "../../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                                  +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("EditText")
                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-edit-text",
                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./edit-text.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./edit-text.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                  +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                  +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                  +export class EditTextComponent extends EditComponent<string> {}
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                  +  <input [formControl]="formControl" matInput [title]="label" type="text" />
                                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                  +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                  +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                  +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  + ./edit-text.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EditTextWithAutocompleteComponent.html b/documentation/components/EditTextWithAutocompleteComponent.html new file mode 100644 index 0000000000..414edd9186 --- /dev/null +++ b/documentation/components/EditTextWithAutocompleteComponent.html @@ -0,0 +1,1544 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/common-components/edit-text-with-autocomplete/edit-text-with-autocomplete.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    This component creates a normal text input with autocomplete. +Compared to the EditEntityComponent this does not just assign the ID to the form control +but instead completely overwrites the form with the values taken from the selected entity. +This is especially useful when instead of creating a new entity, an existing one can also be selected (and extended).

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    When a value is already present the autocomplete is disabled, and it works like a normal text input.

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    E.g.

                                                                                                                                                                                                                                                                                                                                                                                                                    +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    "id": "title",
                                                                                                                                                                                                                                                                                                                                                                                                                    +    "editComponent": "EditTextWithAutocomplete",
                                                                                                                                                                                                                                                                                                                                                                                                                    +    "additional": {
                                                                                                                                                                                                                                                                                                                                                                                                                    +      "entityType": "RecurringActivity",
                                                                                                                                                                                                                                                                                                                                                                                                                    +      "relevantProperty": "linkedGroups",
                                                                                                                                                                                                                                                                                                                                                                                                                    +      "relevantValue": "some-id",
                                                                                                                                                                                                                                                                                                                                                                                                                    +    },
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    + EditComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(entityMapperService: EntityMapperService, confirmationDialog: ConfirmationDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                    confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:36 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:26 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:21 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:31 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:16 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + keyup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +keyup() +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + resetForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + resetForm() +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + selectEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + selectEntity(selected: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                    selected + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + updateAutocomplete + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +updateAutocomplete() +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + addedFormControls + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:66 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    Config passed using component

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + autocompleteDisabled + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + autocompleteEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : new BehaviorSubject(this.entities) +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + currentValues + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + lastValue + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + originalValues + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Optional + selectedEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:55 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:41 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from EditComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in EditComponent:46 +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EditComponent } from "../../entity/default-datatype/edit-component";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormControl, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfirmationDialogService } from "../confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatAutocompleteModule } from "@angular/material/autocomplete";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityBlockComponent } from "../../basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ErrorHintComponent } from "../error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                    + * This component creates a normal text input with autocomplete.
                                                                                                                                                                                                                                                                                                                                                                                                                    + * Compared to the {@link EditEntityComponent} this does not just assign the ID to the form control
                                                                                                                                                                                                                                                                                                                                                                                                                    + * but instead completely overwrites the form with the values taken from the selected entity.
                                                                                                                                                                                                                                                                                                                                                                                                                    + * This is especially useful when instead of creating a new entity, an existing one can also be selected (and extended).
                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                    + * When a value is already present the autocomplete is disabled, and it works like a normal text input.
                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                    + * E.g.
                                                                                                                                                                                                                                                                                                                                                                                                                    + * ```json
                                                                                                                                                                                                                                                                                                                                                                                                                    + * {
                                                                                                                                                                                                                                                                                                                                                                                                                    + *     "id": "title",
                                                                                                                                                                                                                                                                                                                                                                                                                    + *     "editComponent": "EditTextWithAutocomplete",
                                                                                                                                                                                                                                                                                                                                                                                                                    + *     "additional": {
                                                                                                                                                                                                                                                                                                                                                                                                                    + *       "entityType": "RecurringActivity",
                                                                                                                                                                                                                                                                                                                                                                                                                    + *       "relevantProperty": "linkedGroups",
                                                                                                                                                                                                                                                                                                                                                                                                                    + *       "relevantValue": "some-id",
                                                                                                                                                                                                                                                                                                                                                                                                                    + *     },
                                                                                                                                                                                                                                                                                                                                                                                                                    + *   }
                                                                                                                                                                                                                                                                                                                                                                                                                    + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                    +@DynamicComponent("EditTextWithAutocomplete")
                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-edit-text-with-autocomplete",
                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./edit-text-with-autocomplete.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./edit-text-with-autocomplete.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatAutocompleteModule,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                    +export class EditTextWithAutocompleteComponent
                                                                                                                                                                                                                                                                                                                                                                                                                    +  extends EditComponent<string>
                                                                                                                                                                                                                                                                                                                                                                                                                    +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                    +{
                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Config passed using component
                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                    +  declare additional: {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    /**
                                                                                                                                                                                                                                                                                                                                                                                                                    +     * The entity type for which autofill should be created.
                                                                                                                                                                                                                                                                                                                                                                                                                    +     * This should be the same type as for which the form was created.
                                                                                                                                                                                                                                                                                                                                                                                                                    +     */
                                                                                                                                                                                                                                                                                                                                                                                                                    +    entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                    +    /**
                                                                                                                                                                                                                                                                                                                                                                                                                    +     * (optional) a property which should be filled with certain value, if an entity is selected.
                                                                                                                                                                                                                                                                                                                                                                                                                    +     */
                                                                                                                                                                                                                                                                                                                                                                                                                    +    relevantProperty?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                    +    /**
                                                                                                                                                                                                                                                                                                                                                                                                                    +     * (optional) required if `relevantProperty` is set.
                                                                                                                                                                                                                                                                                                                                                                                                                    +     * The value to be filled in `selectedEntity[relevantProperty]`.
                                                                                                                                                                                                                                                                                                                                                                                                                    +     */
                                                                                                                                                                                                                                                                                                                                                                                                                    +    relevantValue?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                    +  };
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  entities: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                    +  autocompleteEntities = new BehaviorSubject(this.entities);
                                                                                                                                                                                                                                                                                                                                                                                                                    +  selectedEntity?: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                    +  currentValues;
                                                                                                                                                                                                                                                                                                                                                                                                                    +  originalValues;
                                                                                                                                                                                                                                                                                                                                                                                                                    +  autocompleteDisabled = true;
                                                                                                                                                                                                                                                                                                                                                                                                                    +  lastValue = "";
                                                                                                                                                                                                                                                                                                                                                                                                                    +  addedFormControls = [];
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  keyup() {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.lastValue = this.formControl.value;
                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.updateAutocomplete();
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  updateAutocomplete() {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    let val = this.formControl.value;
                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                    +      !this.autocompleteDisabled &&
                                                                                                                                                                                                                                                                                                                                                                                                                    +      val !== this.currentValues[this.formControlName]
                                                                                                                                                                                                                                                                                                                                                                                                                    +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +      let filteredEntities = this.entities;
                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (val) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +        filteredEntities = this.entities.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                    +          (entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                    +            entity !== this.selectedEntity &&
                                                                                                                                                                                                                                                                                                                                                                                                                    +            entity.toString().toLowerCase().includes(val.toLowerCase()),
                                                                                                                                                                                                                                                                                                                                                                                                                    +        );
                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.autocompleteEntities.next(filteredEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  override async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this.formControl.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +      // adding new entry - enable autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                    +      const entityType = this.additional.entityType;
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.entities = await this.entityMapperService.loadType(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.entities.sort((e1, e2) =>
                                                                                                                                                                                                                                                                                                                                                                                                                    +        e1.toString().localeCompare(e2.toString()),
                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.autocompleteDisabled = false;
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.currentValues = this.parent.getRawValue();
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.originalValues = this.currentValues;
                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  async selectEntity(selected: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (await this.userConfirmsOverwriteIfNecessary(selected)) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.selectedEntity = selected;
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.addRelevantValueToRelevantProperty(this.selectedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.setAllFormValues(this.selectedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.currentValues = this.parent.getRawValue();
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.autocompleteEntities.next([]);
                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.formControl.setValue(this.lastValue);
                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async userConfirmsOverwriteIfNecessary(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                    +      !this.valuesChanged() ||
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Discard the changes made:Discard changes`,
                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`Do you want to discard the changes made to '${entity}'?`,
                                                                                                                                                                                                                                                                                                                                                                                                                    +      )
                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  private valuesChanged() {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    return Object.entries(this.currentValues).some(
                                                                                                                                                                                                                                                                                                                                                                                                                    +      ([prop, value]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                    +        prop !== this.formControlName &&
                                                                                                                                                                                                                                                                                                                                                                                                                    +        value !== this.parent.controls[prop].value,
                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  private addRelevantValueToRelevantProperty(selected: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.additional.relevantProperty &&
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.additional.relevantValue &&
                                                                                                                                                                                                                                                                                                                                                                                                                    +      !selected[this.additional.relevantProperty].includes(
                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.additional.relevantValue,
                                                                                                                                                                                                                                                                                                                                                                                                                    +      )
                                                                                                                                                                                                                                                                                                                                                                                                                    +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +      selected[this.additional.relevantProperty].push(
                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.additional.relevantValue,
                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  private setAllFormValues(selected: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    Object.keys(selected)
                                                                                                                                                                                                                                                                                                                                                                                                                    +      .filter((key) => selected.getSchema().has(key))
                                                                                                                                                                                                                                                                                                                                                                                                                    +      .forEach((key) => {
                                                                                                                                                                                                                                                                                                                                                                                                                    +        if (this.parent.controls.hasOwnProperty(key)) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +          this.parent.controls[key].setValue(this.selectedEntity[key]);
                                                                                                                                                                                                                                                                                                                                                                                                                    +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                    +          // adding missing controls so saving does not lose any data
                                                                                                                                                                                                                                                                                                                                                                                                                    +          this.parent.addControl(key, new FormControl(selected[key]));
                                                                                                                                                                                                                                                                                                                                                                                                                    +          this.addedFormControls.push(key);
                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +  async resetForm() {
                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (await this.userConfirmsOverwriteIfNecessary(this.selectedEntity)) {
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.addedFormControls.forEach((control) =>
                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.parent.removeControl(control),
                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.addedFormControls = [];
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.formControl.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.parent.patchValue(this.originalValues);
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.selectedEntity = null;
                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.currentValues = this.originalValues;
                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    <mat-form-field [formGroup]="parent" class="form-field-with-tooltip-suffix">
                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                    +  <input
                                                                                                                                                                                                                                                                                                                                                                                                                    +    matInput
                                                                                                                                                                                                                                                                                                                                                                                                                    +    [readonly]="!!selectedEntity"
                                                                                                                                                                                                                                                                                                                                                                                                                    +    [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                                                    +    [matAutocomplete]="autoSuggestions"
                                                                                                                                                                                                                                                                                                                                                                                                                    +    [matAutocompleteDisabled]="autocompleteDisabled"
                                                                                                                                                                                                                                                                                                                                                                                                                    +    (keyup)="keyup()"
                                                                                                                                                                                                                                                                                                                                                                                                                    +    (focusin)="updateAutocomplete()"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  />
                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-autocomplete #autoSuggestions="matAutocomplete">
                                                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                    +      *ngFor="let entity of autocompleteEntities | async"
                                                                                                                                                                                                                                                                                                                                                                                                                    +      [value]="entity[formControlName]"
                                                                                                                                                                                                                                                                                                                                                                                                                    +      (onSelectionChange)="$event.source.selected ? selectEntity(entity) : null"
                                                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                                                    +      <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                    +        [entityToDisplay]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                    +        [linkDisabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                    +      ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                    +    </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-autocomplete>
                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-hint *ngIf="!autocompleteDisabled">
                                                                                                                                                                                                                                                                                                                                                                                                                    +    <span *ngIf="!selectedEntity" i18n>Creating new record.</span>
                                                                                                                                                                                                                                                                                                                                                                                                                    +    <span *ngIf="selectedEntity" i18n>Editing existing record.</span>
                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                    +    <app-error-hint [form]="formControl"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                    +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +<fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                    +  *ngIf="!autocompleteDisabled && !selectedEntity"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  (click)="tooltipElement.show()"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  #tooltipElement="matTooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  icon="cogs"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  i18n-matTooltip="Tooltip help text"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  matTooltip="You can create a new or load an existing record. Start to type an existing name and then select it from the dropdown to edit the existing record. Type any new text to create a new record."
                                                                                                                                                                                                                                                                                                                                                                                                                    +  class="tooltip-suffix"
                                                                                                                                                                                                                                                                                                                                                                                                                    +></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +<fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                    +  *ngIf="!autocompleteDisabled && !!selectedEntity"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  (click)="resetForm()"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  icon="circle-xmark"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  i18n-matTooltip="Tooltip for button to reset form"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  matTooltip="Unload existing record and reset form."
                                                                                                                                                                                                                                                                                                                                                                                                                    +  class="tooltip-suffix"
                                                                                                                                                                                                                                                                                                                                                                                                                    +  style="cursor: pointer"
                                                                                                                                                                                                                                                                                                                                                                                                                    +></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    + ./edit-text-with-autocomplete.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    .form-field-with-tooltip-suffix {
                                                                                                                                                                                                                                                                                                                                                                                                                    +  width: calc(95% - 24px);
                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +.tooltip-suffix {
                                                                                                                                                                                                                                                                                                                                                                                                                    +  margin-left: 4px;
                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntitiesTableComponent.html b/documentation/components/EntitiesTableComponent.html new file mode 100644 index 0000000000..c3d29a3bbf --- /dev/null +++ b/documentation/components/EntitiesTableComponent.html @@ -0,0 +1,3422 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/common-components/entities-table/entities-table.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      A simple display component (no logic and transformations) to display a table of entities.

                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(entityFormService: EntityFormService, formDialog: FormDialogService, router: Router, filterService: FilterService, schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : "popup" | "navigate" | "none" + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "popup" +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + columnsToDisplay +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Manually define the columns to be shown.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + customColumns +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Additional or overwritten field configurations for columns

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + editable +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      INLINE EDIT +User can switch a row into edit mode to change and save field values directly from within the table

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + filter +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Adds a filter for the displayed data. +Only data, that passes the filter will be shown in the table.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + filterFreetext +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + getBackgroundColor +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : (rec: T) => rec.getColor() +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      function returns the background color for each row

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + newRecordFactory +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      factory method to create a new instance of the displayed Entity type +used when the user adds a new entity to the list.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + records +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + selectable +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      BULK SELECT +User can use checkboxes to select multiple rows, so that parent components can execute bulk actions on them.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + selectedRecords +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      FILTER ARCHIVED RECORDS +User can hide / show inactive records through a toggle

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + sortBy +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      how to sort data by default during initialization

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + entityClick +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Emits the entity being clicked in the table - or the newly created entity from the "create" button.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + filteredRecordsChange +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      output the currently displayed records, whenever filters for the user change

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + selectedRecordsChange +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EventEmitter<T[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      outputs an event containing an array of currently selected records (checkmarked by the user) +Checkboxes to select rows are only displayed if you set "selectable" also.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + showInactiveChange +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + addActiveInactiveFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +addActiveInactiveFilter(filter: DataFilter<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      filter + DataFilter<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + isAllSelected + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +isAllSelected() +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + isIndeterminate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +isIndeterminate() +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + onRowClick + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +onRowClick(row: TableRow<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Show one record's details in a modal dialog (if configured).

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                      row + TableRow<T> + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                      The entity whose details should be displayed.

                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + onRowMouseDown + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +onRowMouseDown(event: MouseEvent, row: TableRow<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      event + MouseEvent + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      row + TableRow<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + onRowSelect + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +onRowSelect(event: MatCheckboxChange, row: TableRow<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      event + MatCheckboxChange + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      row + TableRow<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + selectAllRows + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +selectAllRows(event: MatCheckboxChange) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      event + MatCheckboxChange + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + selectRow + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +selectRow(row: TableRow<T>, checked: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      row + TableRow<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      checked + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + showEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +showEntity(entity: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      entity + T + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _columns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _customColumns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _editable + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _entityType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _filter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : {} +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _records + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _selectable + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _showInactive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _sortBy + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Readonly + ACTIONCOLUMN_EDIT + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "__edit" +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Readonly + ACTIONCOLUMN_SELECT + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "__select" +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + idForSavingPagination + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + recordsDataSource + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : MatTableDataSource<TableRow<T>> + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      data displayed in the template's table

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + records +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setrecords(value: T[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + T[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + customColumns +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setcustomColumns(value: ColumnConfig[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Additional or overwritten field configurations for columns

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + ColumnConfig[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + columnsToDisplay +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setcolumnsToDisplay(value: string[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Manually define the columns to be shown.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + string[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setentityType(value: EntityConstructor<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + EntityConstructor<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + sortBy +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setsortBy(value: Sort) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      how to sort data by default during initialization

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + Sort + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + sort +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setsort(sort: MatSort) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      sort + MatSort + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + filter +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setfilter(value: DataFilter<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      Adds a filter for the displayed data. +Only data, that passes the filter will be shown in the table.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + DataFilter<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + filterFreetext +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setfilterFreetext(value: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + selectable +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setselectable(v: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      BULK SELECT +User can use checkboxes to select multiple rows, so that parent components can execute bulk actions on them.

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      v + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + editable +
                                                                                                                                                                                                                                                                                                                                                                                                                      + seteditable(v: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      INLINE EDIT +User can switch a row into edit mode to change and save field values directly from within the table

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      v + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                      + setshowInactive(value: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      FILTER ARCHIVED RECORDS +User can hide / show inactive records through a toggle

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                      value + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      import {
                                                                                                                                                                                                                                                                                                                                                                                                                      +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFieldEditComponent } from "../entity-field-edit/entity-field-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFieldLabelComponent } from "../entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFieldViewComponent } from "../entity-field-view/entity-field-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ListPaginatorComponent } from "./list-paginator/list-paginator.component";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatCheckboxChange,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatSort,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatSortModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  Sort,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  SortDirection,
                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTableDataSource, MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                      +  ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  toFormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "../entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                      +  EntityFormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "../entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { tableSort } from "./table-sort/table-sort";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { UntilDestroy } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { entityFilterPredicate } from "../../filter/filter-generator/filter-predicate";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FormDialogService } from "../../form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FilterService } from "../../filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DataFilter } from "../../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityInlineEditActionsComponent } from "./entity-inline-edit-actions/entity-inline-edit-actions.component";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityCreateButtonComponent } from "../entity-create-button/entity-create-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DateDatatype } from "../../basic-datatypes/date/date.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityDatatype } from "../../basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                      + * A simple display component (no logic and transformations) to display a table of entities.
                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                      +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-entities-table",
                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                      +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityFieldEditComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityFieldViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    ListPaginatorComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatSortModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityInlineEditActionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityCreateButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./entities-table.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrl: "./entities-table.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EntitiesTableComponent<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set records(value: T[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._records = value;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.updateFilteredData();
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.isLoading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  private lastSelectedIndex: number = null;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  private lastSelection: boolean = null;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _records: T[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** data displayed in the template's table */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  recordsDataSource: MatTableDataSource<TableRow<T>>;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  isLoading: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Additional or overwritten field configurations for columns
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set customColumns(value: ColumnConfig[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._customColumns = (value ?? []).map((c) =>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this._entityType
                                                                                                                                                                                                                                                                                                                                                                                                                      +        ? this.entityFormService.extendFormFieldConfig(c, this._entityType)
                                                                                                                                                                                                                                                                                                                                                                                                                      +        : toFormFieldConfig(c),
                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const entityColumns = this._entityType?.schema
                                                                                                                                                                                                                                                                                                                                                                                                                      +      ? [...this._entityType.schema.entries()].map(
                                                                                                                                                                                                                                                                                                                                                                                                                      +          ([id, field]) => ({ ...field, id }) as FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                      +        )
                                                                                                                                                                                                                                                                                                                                                                                                                      +      : [];
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._columns = [
                                                                                                                                                                                                                                                                                                                                                                                                                      +      ...entityColumns.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                      +        // if there is a customColumn for a field from entity config, don't add the base schema field
                                                                                                                                                                                                                                                                                                                                                                                                                      +        (c) => !this._customColumns.some((customCol) => customCol.id === c.id),
                                                                                                                                                                                                                                                                                                                                                                                                                      +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                      +      ...this._customColumns,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._columns.forEach((c) => this.disableSortingHeaderForAdvancedFields(c));
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.columnsToDisplay) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.columnsToDisplay = this._customColumns
                                                                                                                                                                                                                                                                                                                                                                                                                      +        .filter((c) => !c.hideFromTable)
                                                                                                                                                                                                                                                                                                                                                                                                                      +        .map((c) => c.id);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.idForSavingPagination = this._customColumns
                                                                                                                                                                                                                                                                                                                                                                                                                      +      .map((col) => col.id)
                                                                                                                                                                                                                                                                                                                                                                                                                      +      .join("");
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _customColumns: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _columns: FormFieldConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Manually define the columns to be shown.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set columnsToDisplay(value: string[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!value || value.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      value = (this._customColumns ?? this._columns).map((c) => c.id);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    value = value.filter((c) => !c.startsWith("__")); // remove internal action columns
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const cols = [];
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this._selectable) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      cols.push(this.ACTIONCOLUMN_SELECT);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this._editable) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      cols.push(this.ACTIONCOLUMN_EDIT);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    cols.push(...value);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._columnsToDisplay = cols;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.sortIsInferred) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.sortBy = this.inferDefaultSort();
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.sortIsInferred = true;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _columnsToDisplay: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set entityType(value: EntityConstructor<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._entityType = value;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.customColumns = this._customColumns;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _entityType: EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** how to sort data by default during initialization */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set sortBy(value: Sort) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._sortBy = value;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.sortIsInferred = false;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _sortBy: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @ViewChild(MatSort, { static: false }) set sort(sort: MatSort) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.recordsDataSource.sort = sort;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  private sortIsInferred: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Adds a filter for the displayed data.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Only data, that passes the filter will be shown in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set filter(value: DataFilter<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._filter = value ?? {};
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.updateFilteredData();
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _filter: DataFilter<T> = {};
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** output the currently displayed records, whenever filters for the user change */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Output() filteredRecordsChange = new EventEmitter<T[]>(true);
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  private updateFilteredData() {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.addActiveInactiveFilter(this._filter);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const filterPredicate = this.filterService.getFilterPredicate(this._filter);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const filteredData = this._records.filter(filterPredicate);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.recordsDataSource.data = filteredData.map((record) => ({ record }));
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.filteredRecordsChange.emit(filteredData);
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set filterFreetext(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.recordsDataSource.filter = value;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** function returns the background color for each row*/
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() getBackgroundColor?: (rec: T) => string = (rec: T) => rec.getColor();
                                                                                                                                                                                                                                                                                                                                                                                                                      +  idForSavingPagination: string;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() clickMode: "popup" | "navigate" | "none" = "popup";
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Emits the entity being clicked in the table - or the newly created entity from the "create" button.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Output() entityClick = new EventEmitter<T>();
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * BULK SELECT
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * User can use checkboxes to select multiple rows, so that parent components can execute bulk actions on them.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set selectable(v: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._selectable = v;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.columnsToDisplay = this._columnsToDisplay;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _selectable: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  readonly ACTIONCOLUMN_SELECT = "__select";
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * outputs an event containing an array of currently selected records (checkmarked by the user)
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Checkboxes to select rows are only displayed if you set "selectable" also.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Output() selectedRecordsChange: EventEmitter<T[]> = new EventEmitter<T[]>();
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() selectedRecords: T[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  selectRow(row: TableRow<T>, checked: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (checked) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.selectedRecords.push(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      const index = this.selectedRecords.indexOf(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (index > -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.selectedRecords.splice(index, 1);
                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.selectedRecordsChange.emit(this.selectedRecords);
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * INLINE EDIT
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * User can switch a row into edit mode to change and save field values directly from within the table
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set editable(v: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._editable = v;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.columnsToDisplay = this._columnsToDisplay;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _editable: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  readonly ACTIONCOLUMN_EDIT = "__edit";
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * factory method to create a new instance of the displayed Entity type
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * used when the user adds a new entity to the list.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() newRecordFactory: () => T;
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Show one record's details in a modal dialog (if configured).
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param row The entity whose details should be displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  onRowClick(row: TableRow<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (row.formGroup && !row.formGroup.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this._selectable) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.selectRow(row, !this.selectedRecords?.includes(row.record));
                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.showEntity(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entityClick.emit(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  onRowMouseDown(event: MouseEvent, row: TableRow<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this._selectable) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.onRowClick(row);
                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    // Find the index of the row in the sorted and filtered data
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const sortedData = this.recordsDataSource.sortData(
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.recordsDataSource.data,
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.recordsDataSource.sort,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const currentIndex = sortedData.indexOf(row);
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const isCheckboxClick =
                                                                                                                                                                                                                                                                                                                                                                                                                      +      event.target instanceof HTMLInputElement &&
                                                                                                                                                                                                                                                                                                                                                                                                                      +      event.target.type === "checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (event.shiftKey && this.lastSelectedIndex !== null) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      const start = Math.min(this.lastSelectedIndex, currentIndex);
                                                                                                                                                                                                                                                                                                                                                                                                                      +      const end = Math.max(this.lastSelectedIndex, currentIndex);
                                                                                                                                                                                                                                                                                                                                                                                                                      +      const shouldCheck =
                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.lastSelection !== null
                                                                                                                                                                                                                                                                                                                                                                                                                      +          ? !this.lastSelection
                                                                                                                                                                                                                                                                                                                                                                                                                      +          : !this.selectedRecords.includes(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +      for (let i = start; i <= end; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +        const rowToSelect = sortedData[i];
                                                                                                                                                                                                                                                                                                                                                                                                                      +        const isSelected = this.selectedRecords.includes(rowToSelect.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +        if (shouldCheck && !isSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +          this.selectedRecords.push(rowToSelect.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +        } else if (!shouldCheck && isSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +          this.selectedRecords = this.selectedRecords.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                      +            (record) => record !== rowToSelect.record,
                                                                                                                                                                                                                                                                                                                                                                                                                      +          );
                                                                                                                                                                                                                                                                                                                                                                                                                      +        }
                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.selectedRecordsChange.emit(this.selectedRecords);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      const isSelected = this.selectedRecords.includes(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.selectRow(row, !isSelected);
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.lastSelectedIndex = currentIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.lastSelection = isSelected;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (isCheckboxClick) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.onRowClick(row);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  onRowSelect(event: MatCheckboxChange, row: TableRow<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.selectRow(row, event.checked);
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  selectAllRows(event: MatCheckboxChange) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (event.checked) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.selectedRecords = this.recordsDataSource.data.map(
                                                                                                                                                                                                                                                                                                                                                                                                                      +        (row) => row.record,
                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.selectedRecords = [];
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.selectedRecordsChange.emit(this.selectedRecords);
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  isAllSelected() {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.selectedRecords.length === this.recordsDataSource.data.length;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  isIndeterminate() {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.selectedRecords.length > 0 && !this.isAllSelected();
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  showEntity(entity: T) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    switch (this.clickMode) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      case "popup":
                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.formDialog.openFormPopup(entity, this._customColumns);
                                                                                                                                                                                                                                                                                                                                                                                                                      +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                      +      case "navigate":
                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.router.navigate([
                                                                                                                                                                                                                                                                                                                                                                                                                      +          entity.getConstructor().route,
                                                                                                                                                                                                                                                                                                                                                                                                                      +          entity.isNew ? "new" : entity.getId(true),
                                                                                                                                                                                                                                                                                                                                                                                                                      +        ]);
                                                                                                                                                                                                                                                                                                                                                                                                                      +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    private filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                      +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.recordsDataSource = this.createDataSource();
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  private createDataSource() {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const dataSource = new MatTableDataSource<TableRow<T>>();
                                                                                                                                                                                                                                                                                                                                                                                                                      +    dataSource.sortData = (data, sort) =>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      tableSort(data, {
                                                                                                                                                                                                                                                                                                                                                                                                                      +        active: sort.active as keyof Entity | "",
                                                                                                                                                                                                                                                                                                                                                                                                                      +        direction: sort.direction,
                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                      +    dataSource.filterPredicate = (data, filter) =>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      entityFilterPredicate(data.record, filter);
                                                                                                                                                                                                                                                                                                                                                                                                                      +    return dataSource;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  private inferDefaultSort(): Sort {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    // initial sorting by first column, ensure that not the 'action' column is used
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const sortBy = (this._columnsToDisplay ?? []).filter(
                                                                                                                                                                                                                                                                                                                                                                                                                      +      (c) => !c.startsWith("__"),
                                                                                                                                                                                                                                                                                                                                                                                                                      +    )[0];
                                                                                                                                                                                                                                                                                                                                                                                                                      +    const sortByColumn = this._columns.find((c) => c.id === sortBy);
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    let sortDirection: SortDirection = "asc";
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                      +      sortByColumn?.viewComponent === "DisplayDate" ||
                                                                                                                                                                                                                                                                                                                                                                                                                      +      sortByColumn?.viewComponent === "DisplayMonth" ||
                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.schemaService.getDatatypeOrDefault(sortByColumn?.dataType) instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                      +        DateDatatype
                                                                                                                                                                                                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      // flip default sort order for dates (latest first)
                                                                                                                                                                                                                                                                                                                                                                                                                      +      sortDirection = "desc";
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    return sortBy ? { active: sortBy, direction: sortDirection } : undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Advanced fields like entity references cannot be sorted sensibly yet - disable sort for them.
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param c
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  private disableSortingHeaderForAdvancedFields(c: FormFieldConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    // if no dataType is defined, these are dynamic, display-only components
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (c.isArray || c.dataType === EntityDatatype.dataType || !c.dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      c.noSorting = true;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * FILTER ARCHIVED RECORDS
                                                                                                                                                                                                                                                                                                                                                                                                                      +   * User can hide / show inactive records through a toggle
                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set showInactive(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (value === this._showInactive) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._showInactive = value;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.updateFilteredData();
                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.showInactiveChange.emit(value);
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  _showInactive: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Output() showInactiveChange = new EventEmitter<boolean>();
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  addActiveInactiveFilter(filter: DataFilter<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this._showInactive) {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      delete filter["isActive"];
                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                      +      filter["isActive"] = true;
                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                      + * Wrapper to keep additional form data for each row of an entity, required for inline editing.
                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface TableRow<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                      +  record: T;
                                                                                                                                                                                                                                                                                                                                                                                                                      +  formGroup?: EntityFormGroup<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      <div *ngIf="isLoading" class="process-spinner">
                                                                                                                                                                                                                                                                                                                                                                                                                      +  <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                      +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +<div [hidden]="isLoading" class="table-container">
                                                                                                                                                                                                                                                                                                                                                                                                                      +  <table
                                                                                                                                                                                                                                                                                                                                                                                                                      +    mat-table
                                                                                                                                                                                                                                                                                                                                                                                                                      +    [dataSource]="recordsDataSource"
                                                                                                                                                                                                                                                                                                                                                                                                                      +    matSort
                                                                                                                                                                                                                                                                                                                                                                                                                      +    [matSortActive]="_sortBy?.active"
                                                                                                                                                                                                                                                                                                                                                                                                                      +    [matSortDirection]="_sortBy?.direction"
                                                                                                                                                                                                                                                                                                                                                                                                                      +    class="full-width table"
                                                                                                                                                                                                                                                                                                                                                                                                                      +  >
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <ng-container *ngFor="let col of _columns" [matColumnDef]="col.id">
                                                                                                                                                                                                                                                                                                                                                                                                                      +      <th
                                                                                                                                                                                                                                                                                                                                                                                                                      +        mat-header-cell
                                                                                                                                                                                                                                                                                                                                                                                                                      +        mat-sort-header
                                                                                                                                                                                                                                                                                                                                                                                                                      +        *matHeaderCellDef
                                                                                                                                                                                                                                                                                                                                                                                                                      +        [disabled]="col.noSorting"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                                                                                                                                                                                                      +        <app-entity-field-label
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [field]="col"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [entityType]="_entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                      +        ></app-entity-field-label>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      </th>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +      <td mat-cell *matCellDef="let row">
                                                                                                                                                                                                                                                                                                                                                                                                                      +        <app-entity-field-edit
                                                                                                                                                                                                                                                                                                                                                                                                                      +          *ngIf="row.formGroup?.enabled; else viewField"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [field]="col"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [entity]="row.record"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [form]="row.formGroup"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [compactMode]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                      +        ></app-entity-field-edit>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +        <ng-template #viewField>
                                                                                                                                                                                                                                                                                                                                                                                                                      +          <app-entity-field-view
                                                                                                                                                                                                                                                                                                                                                                                                                      +            [field]="col"
                                                                                                                                                                                                                                                                                                                                                                                                                      +            [entity]="row.record"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          ></app-entity-field-view>
                                                                                                                                                                                                                                                                                                                                                                                                                      +        </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                      +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <!--
                                                                                                                                                                                                                                                                                                                                                                                                                      +      BULK SELECT
                                                                                                                                                                                                                                                                                                                                                                                                                      +    -->
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <ng-container [matColumnDef]="ACTIONCOLUMN_SELECT">
                                                                                                                                                                                                                                                                                                                                                                                                                      +      <th mat-header-cell *matHeaderCellDef style="width: 0">
                                                                                                                                                                                                                                                                                                                                                                                                                      +        <mat-checkbox
                                                                                                                                                                                                                                                                                                                                                                                                                      +          (change)="selectAllRows($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [checked]="isAllSelected()"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [indeterminate]="isIndeterminate()"
                                                                                                                                                                                                                                                                                                                                                                                                                      +        ></mat-checkbox>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      </th>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +      <td mat-cell *matCellDef="let row">
                                                                                                                                                                                                                                                                                                                                                                                                                      +        <mat-checkbox
                                                                                                                                                                                                                                                                                                                                                                                                                      +          (change)="onRowSelect($event, row)"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [checked]="selectedRecords?.includes(row.record)"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          (click)="$event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                                      +        ></mat-checkbox>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                      +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <!--
                                                                                                                                                                                                                                                                                                                                                                                                                      +      INLINE EDIT ACTIONS
                                                                                                                                                                                                                                                                                                                                                                                                                      +    -->
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <ng-container [matColumnDef]="ACTIONCOLUMN_EDIT">
                                                                                                                                                                                                                                                                                                                                                                                                                      +      <th mat-header-cell *matHeaderCellDef class="remove-padding-left">
                                                                                                                                                                                                                                                                                                                                                                                                                      +        <app-entity-create-button
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [entityType]="_entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [newRecordFactory]="newRecordFactory"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          (entityCreate)="showEntity($event); entityClick.emit($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                      +          [iconOnly]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                      +        ></app-entity-create-button>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      </th>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +      <td mat-cell *matCellDef="let row">
                                                                                                                                                                                                                                                                                                                                                                                                                      +        <app-entity-inline-edit-actions [row]="row">
                                                                                                                                                                                                                                                                                                                                                                                                                      +        </app-entity-inline-edit-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                      +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                      +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <tr mat-header-row *matHeaderRowDef="_columnsToDisplay"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <tr
                                                                                                                                                                                                                                                                                                                                                                                                                      +      mat-row
                                                                                                                                                                                                                                                                                                                                                                                                                      +      *matRowDef="let row; columns: _columnsToDisplay"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      [class.inactive-row]="!row.record.isActive"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      [style.background-color]="getBackgroundColor?.(row.record)"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      class="table-row"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      (mousedown)="onRowMouseDown($event, row)"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      style="cursor: pointer"
                                                                                                                                                                                                                                                                                                                                                                                                                      +    ></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                      +  </table>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  <!--
                                                                                                                                                                                                                                                                                                                                                                                                                      +    PAGINATION
                                                                                                                                                                                                                                                                                                                                                                                                                      +  -->
                                                                                                                                                                                                                                                                                                                                                                                                                      +  <app-list-paginator
                                                                                                                                                                                                                                                                                                                                                                                                                      +    class="table-footer"
                                                                                                                                                                                                                                                                                                                                                                                                                      +    [dataSource]="recordsDataSource"
                                                                                                                                                                                                                                                                                                                                                                                                                      +    [idForSavingPagination]="idForSavingPagination"
                                                                                                                                                                                                                                                                                                                                                                                                                      +  ></app-list-paginator>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +  <!--
                                                                                                                                                                                                                                                                                                                                                                                                                      +    SHOW ARCHIVED TOGGLE
                                                                                                                                                                                                                                                                                                                                                                                                                      +  -->
                                                                                                                                                                                                                                                                                                                                                                                                                      +  <div class="table-footer filter-inactive-toggle">
                                                                                                                                                                                                                                                                                                                                                                                                                      +    <mat-slide-toggle
                                                                                                                                                                                                                                                                                                                                                                                                                      +      [checked]="_showInactive"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      (change)="showInactive = $event.checked"
                                                                                                                                                                                                                                                                                                                                                                                                                      +      i18n="slider|also show entries that are archived"
                                                                                                                                                                                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                                                                                                                                                                                      +      Include archived records
                                                                                                                                                                                                                                                                                                                                                                                                                      +    </mat-slide-toggle>
                                                                                                                                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                      +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityActionsMenuComponent.html b/documentation/components/EntityActionsMenuComponent.html new file mode 100644 index 0000000000..d35eef0eb4 --- /dev/null +++ b/documentation/components/EntityActionsMenuComponent.html @@ -0,0 +1,870 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/entity-details/entity-actions-menu/entity-actions-menu.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(entityActionsMenuService: EntityActionsMenuService, viewContext: ViewComponentContext) +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                        entityActionsMenuService + EntityActionsMenuService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                        viewContext + ViewComponentContext + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + navigateOnDelete +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        whether the "delete" action will trigger a navigation back to the parent list. +This is useful when the entity is deleted from a fullscreen detail view but not for an overlay.

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + showExpanded +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Whether some buttons should be displayed directly, outside the three-dot menu in dialog views.

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + actionTriggered +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + executeAction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + executeAction(action: EntityAction) +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                        action + EntityAction + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + + actions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EntityAction[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        The actions being displayed as menu items.

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  Optional,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityActionsMenuService } from "./entity-actions-menu.service";
                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityAction } from "./entity-action.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-entity-actions-menu",
                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./entity-actions-menu.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./entity-actions-menu.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                        +export class EntityActionsMenuComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                        +   * whether the "delete" action will trigger a navigation back to the parent list.
                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This is useful when the entity is deleted from a fullscreen detail view but not for an overlay.
                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() navigateOnDelete: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Output() actionTriggered = new EventEmitter<string>();
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The actions being displayed as menu items.
                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                        +  actions: EntityAction[];
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Whether some buttons should be displayed directly, outside the three-dot menu in dialog views.
                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() showExpanded?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityActionsMenuService: EntityActionsMenuService,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    @Optional() protected viewContext: ViewComponentContext,
                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (changes.entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.filterAvailableActions();
                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  private filterAvailableActions() {
                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.actions = this.entityActionsMenuService
                                                                                                                                                                                                                                                                                                                                                                                                                        +      .getActions()
                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((action) => {
                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (!this.entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +          return false;
                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +        switch (action.action) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +          case "archive":
                                                                                                                                                                                                                                                                                                                                                                                                                        +            return this.entity.isActive && !this.entity.anonymized;
                                                                                                                                                                                                                                                                                                                                                                                                                        +          case "anonymize":
                                                                                                                                                                                                                                                                                                                                                                                                                        +            return (
                                                                                                                                                                                                                                                                                                                                                                                                                        +              !this.entity.anonymized && this.entity.getConstructor().hasPII
                                                                                                                                                                                                                                                                                                                                                                                                                        +            );
                                                                                                                                                                                                                                                                                                                                                                                                                        +          default:
                                                                                                                                                                                                                                                                                                                                                                                                                        +            return true;
                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  async executeAction(action: EntityAction) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +    const result = await action.execute(
                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.navigateOnDelete && !this.viewContext?.isDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (result) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.actionTriggered.emit(action.action);
                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                        +    setTimeout(() => this.filterAvailableActions());
                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        @if (!entity?.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +  <!-- inline display of primary actions -->
                                                                                                                                                                                                                                                                                                                                                                                                                        +  @for (a of actions; track a.action) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +    @if (showExpanded && viewContext?.isDialog && a.primaryAction) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                        +        mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                        +        (click)="executeAction(a)"
                                                                                                                                                                                                                                                                                                                                                                                                                        +        *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                        +          operation: a.permission,
                                                                                                                                                                                                                                                                                                                                                                                                                        +          entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                        +        }"
                                                                                                                                                                                                                                                                                                                                                                                                                        +        angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                        +        [angularticsCategory]="entity?.getType()"
                                                                                                                                                                                                                                                                                                                                                                                                                        +        [angularticsAction]="'entity_' + a.action"
                                                                                                                                                                                                                                                                                                                                                                                                                        +        [matTooltip]="a.tooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                        +        <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                        +          class="standard-icon-with-text color-accent"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          [icon]="a.icon"
                                                                                                                                                                                                                                                                                                                                                                                                                        +        ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                        +        <span>{{ a.label }}</span>
                                                                                                                                                                                                                                                                                                                                                                                                                        +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  <!-- context menu -->
                                                                                                                                                                                                                                                                                                                                                                                                                        +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                        +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                        +    color="primary"
                                                                                                                                                                                                                                                                                                                                                                                                                        +    style="margin-top: -8px; margin-bottom: -8px"
                                                                                                                                                                                                                                                                                                                                                                                                                        +    [matMenuTriggerFor]="additional"
                                                                                                                                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                                                                                                                                        +    <fa-icon icon="ellipsis-v" class="standard-icon"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                        +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +  <!-- context menu -->
                                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-menu #additional>
                                                                                                                                                                                                                                                                                                                                                                                                                        +    <!-- standard actions -->
                                                                                                                                                                                                                                                                                                                                                                                                                        +    @for (a of actions; track a.action) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +      @if (!a.primaryAction || !showExpanded || !viewContext?.isDialog) {
                                                                                                                                                                                                                                                                                                                                                                                                                        +        <button
                                                                                                                                                                                                                                                                                                                                                                                                                        +          mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                        +          (click)="executeAction(a)"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                        +            operation: a.permission,
                                                                                                                                                                                                                                                                                                                                                                                                                        +            entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                        +          }"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          [angularticsCategory]="entity?.getType()"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          [angularticsAction]="'entity_' + a.action"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          [matTooltip]="a.tooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          matTooltipPosition="before"
                                                                                                                                                                                                                                                                                                                                                                                                                        +        >
                                                                                                                                                                                                                                                                                                                                                                                                                        +          <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                        +            class="standard-icon-with-text color-accent"
                                                                                                                                                                                                                                                                                                                                                                                                                        +            [icon]="a.icon"
                                                                                                                                                                                                                                                                                                                                                                                                                        +          ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                        +          <span>{{ a.label }}</span>
                                                                                                                                                                                                                                                                                                                                                                                                                        +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +    <!-- additional actions -->
                                                                                                                                                                                                                                                                                                                                                                                                                        +    <ng-content></ng-content>
                                                                                                                                                                                                                                                                                                                                                                                                                        +  </mat-menu>
                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        + ./entity-actions-menu.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        :host {
                                                                                                                                                                                                                                                                                                                                                                                                                        +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                        +  align-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityArchivedInfoComponent.html b/documentation/components/EntityArchivedInfoComponent.html new file mode 100644 index 0000000000..6ab3d71864 --- /dev/null +++ b/documentation/components/EntityArchivedInfoComponent.html @@ -0,0 +1,562 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/entity-details/entity-archived-info/entity-archived-info.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          Informs users that the entity is inactive (or anonymized) and provides options to change the status.

                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(entityActionsService: EntityActionsService) +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                          entityActionsService + EntityActionsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Public + entityActionsService + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EntityActionsService + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                          +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityActionsService } from "../../entity/entity-actions/entity-actions.service";
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                          + * Informs users that the entity is inactive (or anonymized) and provides options to change the status.
                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-entity-archived-info",
                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [CommonModule, MatCardModule, MatButtonModule, FontAwesomeModule],
                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./entity-archived-info.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./entity-archived-info.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                          +export class EntityArchivedInfoComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(public entityActionsService: EntityActionsService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          <mat-card appearance="outlined" class="card" *ngIf="entity && !entity.isActive">
                                                                                                                                                                                                                                                                                                                                                                                                                          +  <mat-card-header class="card-header">
                                                                                                                                                                                                                                                                                                                                                                                                                          +    <div mat-card-avatar class="card-icon">
                                                                                                                                                                                                                                                                                                                                                                                                                          +      <fa-icon icon="info-circle" size="lg"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                          +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                          +    <mat-card-title *ngIf="!entity.anonymized" i18n>Archived</mat-card-title>
                                                                                                                                                                                                                                                                                                                                                                                                                          +    <mat-card-title *ngIf="entity.anonymized" i18n
                                                                                                                                                                                                                                                                                                                                                                                                                          +      >Anonymized & Archived</mat-card-title
                                                                                                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                                                                                                          +  </mat-card-header>
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +  <mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                          +    <p *ngIf="entity.anonymized" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                          +      This record has been anonymized. Details containing personal information
                                                                                                                                                                                                                                                                                                                                                                                                                          +      have been deleted and cannot be restored. For statistical reporting, this
                                                                                                                                                                                                                                                                                                                                                                                                                          +      basic record has been kept.
                                                                                                                                                                                                                                                                                                                                                                                                                          +    </p>
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +    <p i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                          +      This record is archived and will be hidden from lists and select options
                                                                                                                                                                                                                                                                                                                                                                                                                          +      by default.
                                                                                                                                                                                                                                                                                                                                                                                                                          +    </p>
                                                                                                                                                                                                                                                                                                                                                                                                                          +  </mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +  <mat-card-actions *ngIf="!entity.anonymized">
                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                          +      mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                          +      color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                          +      (click)="entityActionsService.undoArchive(entity)"
                                                                                                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                                                                                                          +      Reactivate
                                                                                                                                                                                                                                                                                                                                                                                                                          +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                          +  </mat-card-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                          +</mat-card>
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          + ./entity-archived-info.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +.card {
                                                                                                                                                                                                                                                                                                                                                                                                                          +  background-color: colors.$grey-transparent;
                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +.card-header {
                                                                                                                                                                                                                                                                                                                                                                                                                          +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                          +  align-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +.card-icon {
                                                                                                                                                                                                                                                                                                                                                                                                                          +  justify-content: center;
                                                                                                                                                                                                                                                                                                                                                                                                                          +  align-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                          +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                          +  margin: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityBlockComponent.html b/documentation/components/EntityBlockComponent.html new file mode 100644 index 0000000000..c282eb4198 --- /dev/null +++ b/documentation/components/EntityBlockComponent.html @@ -0,0 +1,784 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/basic-datatypes/entity/entity-block/entity-block.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Display an inline block representing an entity.

                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(entityMapper: EntityMapperService, router: Router) +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                            router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + entityId +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            If entityToDisplay is not set, entityId with prefix required to load the entity +If entityToDisplay is set, this input is ignored

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + entityToDisplay +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + linkDisabled +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + showDetailsPage + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +showDetailsPage() +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + entityBlockComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + entityIcon + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgClass, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DynamicComponentDirective } from "../../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Logging } from "../../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FaDynamicIconComponent } from "../../../common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                            + * Display an inline block representing an entity.
                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-entity-block",
                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./entity-block.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./entity-block.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [NgClass, NgIf, DynamicComponentDirective, FaDynamicIconComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                            +export class EntityBlockComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entityToDisplay: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() linkDisabled = false;
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If `entityToDisplay` is not set, `entityId` with prefix required to load the entity
                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If `entityToDisplay` is set, this input is ignored
                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entityId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityBlockComponent: string;
                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityIcon: string;
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                            +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!this.entityToDisplay) {
                                                                                                                                                                                                                                                                                                                                                                                                                            +      await this.loadEntity();
                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.initDisplayDetails();
                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async loadEntity() {
                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!this.entityId) {
                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityToDisplay = await this.entityMapper.load(
                                                                                                                                                                                                                                                                                                                                                                                                                            +        Entity.extractTypeFromId(this.entityId),
                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entityId,
                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                            +    } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                            +      // this may be caused by restrictive permissions and therefore shouldn't be treated as a technical issue
                                                                                                                                                                                                                                                                                                                                                                                                                            +      Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                            +        "[DISPLAY_ENTITY] Could not find entity.",
                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entityId,
                                                                                                                                                                                                                                                                                                                                                                                                                            +        e,
                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +  private initDisplayDetails() {
                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!this.entityToDisplay) {
                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +    const entityType = this.entityToDisplay.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityBlockComponent = entityType.blockComponent;
                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityIcon = entityType.icon;
                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +  showDetailsPage() {
                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.linkDisabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.router.navigate([
                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityToDisplay.getConstructor().route,
                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityToDisplay.getId(true),
                                                                                                                                                                                                                                                                                                                                                                                                                            +    ]);
                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            <span
                                                                                                                                                                                                                                                                                                                                                                                                                            +  class="block-height truncate-text"
                                                                                                                                                                                                                                                                                                                                                                                                                            +  [ngClass]="{
                                                                                                                                                                                                                                                                                                                                                                                                                            +    clickable: !linkDisabled,
                                                                                                                                                                                                                                                                                                                                                                                                                            +    '.inactive': !entityToDisplay?.isActive,
                                                                                                                                                                                                                                                                                                                                                                                                                            +  }"
                                                                                                                                                                                                                                                                                                                                                                                                                            +  (click)="showDetailsPage()"
                                                                                                                                                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                                                                                                                                                            +  @if (entityBlockComponent) {
                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                            +      [appDynamicComponent]="{
                                                                                                                                                                                                                                                                                                                                                                                                                            +        component: entityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                            +        config: {
                                                                                                                                                                                                                                                                                                                                                                                                                            +          entity: entityToDisplay,
                                                                                                                                                                                                                                                                                                                                                                                                                            +          linkDisabled: linkDisabled,
                                                                                                                                                                                                                                                                                                                                                                                                                            +          tooltipDisabled: true,
                                                                                                                                                                                                                                                                                                                                                                                                                            +        },
                                                                                                                                                                                                                                                                                                                                                                                                                            +      }"
                                                                                                                                                                                                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                            +  } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                            +    <app-fa-dynamic-icon
                                                                                                                                                                                                                                                                                                                                                                                                                            +      *ngIf="entityIcon"
                                                                                                                                                                                                                                                                                                                                                                                                                            +      [icon]="entityIcon"
                                                                                                                                                                                                                                                                                                                                                                                                                            +      class="margin-right-small"
                                                                                                                                                                                                                                                                                                                                                                                                                            +    ></app-fa-dynamic-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +    {{ entityToDisplay?.toString() }}
                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                            +</span>
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            + ./entity-block.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                            +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +.clickable {
                                                                                                                                                                                                                                                                                                                                                                                                                            +  pointer-events: all;
                                                                                                                                                                                                                                                                                                                                                                                                                            +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                            +.clickable:hover {
                                                                                                                                                                                                                                                                                                                                                                                                                            +  text-decoration: underline;
                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +.block-height {
                                                                                                                                                                                                                                                                                                                                                                                                                            +  line-height: sizes.$icon-block;
                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +.inactive {
                                                                                                                                                                                                                                                                                                                                                                                                                            +  color: colors.$inactive;
                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityCountDashboardComponent.html b/documentation/components/EntityCountDashboardComponent.html new file mode 100644 index 0000000000..02bffdb775 --- /dev/null +++ b/documentation/components/EntityCountDashboardComponent.html @@ -0,0 +1,1138 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              + DashboardWidget +

                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              + EntityCountDashboardConfig + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(entityMapper: EntityMapperService, router: Router, entities: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                              router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                              entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Entity name which should be grouped

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + groupBy +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "center" +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              The property of the Child entities to group counts by.

                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Default is "center".

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + + getRequiredEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + getRequiredEntities(config: EntityCountDashboardConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from DashboardWidget +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in DashboardWidget:47 +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                              config + EntityCountDashboardConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + goToChildrenList + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +goToChildrenList(filterId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                              filterId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + entityGroupCounts + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + entityIcon + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : IconName + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + groupedByEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              if the groupBy field is an entity reference this holds the related entity type, +so that the entity block will be displayed instead of an id string, +otherwise undefined, to display simply the group label.

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + totalEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                              + setentityType(value: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              Entity name which should be grouped

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                              value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfigurableEnumValue } from "../../../../core/basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                              +  Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                              +  EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { IconName } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { groupBy } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityDatatype } from "../../../../core/basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +interface EntityCountDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                              +  entity?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                              +  groupBy?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("ChildrenCountDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("EntityCountDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-entity-count-dashboard-widget",
                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./entity-count-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./entity-count-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                              +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                              +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                              +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                              +export class EntityCountDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                              +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                              +  implements EntityCountDashboardConfig, OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                                                                                                                                                                                                                              +  static override getRequiredEntities(config: EntityCountDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    return config?.entity || "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Entity name which should be grouped
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() set entityType(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this._entity = this.entities.get(value);
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  private _entity: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The property of the Child entities to group counts by.
                                                                                                                                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Default is "center".
                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() groupBy = "center";
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * if the groupBy field is an entity reference this holds the related entity type,
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * so that the entity block will be displayed instead of an id string,
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * otherwise undefined, to display simply the group label.
                                                                                                                                                                                                                                                                                                                                                                                                                              +   * */
                                                                                                                                                                                                                                                                                                                                                                                                                              +  groupedByEntity: string;
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  totalEntities: number;
                                                                                                                                                                                                                                                                                                                                                                                                                              +  entityGroupCounts: { label: string; value: number; id: string }[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                              +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                              +  entityIcon: IconName;
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                              +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this._entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.entityType = "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +    const groupByType = this._entity.schema.get(this.groupBy);
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.groupedByEntity =
                                                                                                                                                                                                                                                                                                                                                                                                                              +      groupByType.dataType === EntityDatatype.dataType
                                                                                                                                                                                                                                                                                                                                                                                                                              +        ? groupByType.additional
                                                                                                                                                                                                                                                                                                                                                                                                                              +        : undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +    const entities = await this.entityMapper.loadType(this._entity);
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.updateCounts(entities.filter((e) => e.isActive));
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.label = this._entity.labelPlural;
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.entityIcon = this._entity.icon;
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  goToChildrenList(filterId: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    const params = {};
                                                                                                                                                                                                                                                                                                                                                                                                                              +    params[this.groupBy] = filterId;
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.router.navigate([this._entity.route], { queryParams: params });
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  private updateCounts(entities: Entity[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.totalEntities = entities.length;
                                                                                                                                                                                                                                                                                                                                                                                                                              +    const groups = groupBy(entities, this.groupBy as keyof Entity);
                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.entityGroupCounts = groups.map(([group, entities]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                              +      const label = extractHumanReadableLabel(group);
                                                                                                                                                                                                                                                                                                                                                                                                                              +      return {
                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: label,
                                                                                                                                                                                                                                                                                                                                                                                                                              +        value: entities.length,
                                                                                                                                                                                                                                                                                                                                                                                                                              +        id: group?.["id"] || label,
                                                                                                                                                                                                                                                                                                                                                                                                                              +      };
                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                              + * Get a human-readable string from the given value as a label.
                                                                                                                                                                                                                                                                                                                                                                                                                              + * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                              +function extractHumanReadableLabel(
                                                                                                                                                                                                                                                                                                                                                                                                                              +  value: string | ConfigurableEnumValue | any,
                                                                                                                                                                                                                                                                                                                                                                                                                              +): string {
                                                                                                                                                                                                                                                                                                                                                                                                                              +  if (value === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    return "";
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +  if (typeof value === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +  if (value?.label) {
                                                                                                                                                                                                                                                                                                                                                                                                                              +    return value.label;
                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +  return String(value);
                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                                                                                                                                                              +  [icon]="entityIcon"
                                                                                                                                                                                                                                                                                                                                                                                                                              +  theme="child"
                                                                                                                                                                                                                                                                                                                                                                                                                              +  [title]="totalEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                              +  [subtitle]="label"
                                                                                                                                                                                                                                                                                                                                                                                                                              +  [entries]="entityGroupCounts"
                                                                                                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div class="table-wrapper">
                                                                                                                                                                                                                                                                                                                                                                                                                              +    <table
                                                                                                                                                                                                                                                                                                                                                                                                                              +      mat-table
                                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n-aria-label="Label for children count dashboard"
                                                                                                                                                                                                                                                                                                                                                                                                                              +      aria-label="Table showing disaggregation of the beneficiaries"
                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                              +      <ng-container matColumnDef="label">
                                                                                                                                                                                                                                                                                                                                                                                                                              +        <td *matCellDef="let group">
                                                                                                                                                                                                                                                                                                                                                                                                                              +          <span *ngIf="!groupedByEntity">{{ group.label }}</span>
                                                                                                                                                                                                                                                                                                                                                                                                                              +          <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                              +            *ngIf="groupedByEntity"
                                                                                                                                                                                                                                                                                                                                                                                                                              +            [entityId]="group.id"
                                                                                                                                                                                                                                                                                                                                                                                                                              +          ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                              +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                              +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                              +      <ng-container matColumnDef="value">
                                                                                                                                                                                                                                                                                                                                                                                                                              +        <td *matCellDef="let group" class="text-align-end">
                                                                                                                                                                                                                                                                                                                                                                                                                              +          {{ group.value }}
                                                                                                                                                                                                                                                                                                                                                                                                                              +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                              +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                              +      <ng-container matColumnDef="link">
                                                                                                                                                                                                                                                                                                                                                                                                                              +        <td *matCellDef class="text-align-end">
                                                                                                                                                                                                                                                                                                                                                                                                                              +          <fa-icon icon="external-link-square-alt"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                              +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                              +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +      <tr hidden>
                                                                                                                                                                                                                                                                                                                                                                                                                              +        <th
                                                                                                                                                                                                                                                                                                                                                                                                                              +          scope="col"
                                                                                                                                                                                                                                                                                                                                                                                                                              +          i18n="The center that a partiipant belongs to, e.g. a city"
                                                                                                                                                                                                                                                                                                                                                                                                                              +        >
                                                                                                                                                                                                                                                                                                                                                                                                                              +          Center
                                                                                                                                                                                                                                                                                                                                                                                                                              +        </th>
                                                                                                                                                                                                                                                                                                                                                                                                                              +        <th scope="col" i18n="The amount of children that study at one school">
                                                                                                                                                                                                                                                                                                                                                                                                                              +          Count of children
                                                                                                                                                                                                                                                                                                                                                                                                                              +        </th>
                                                                                                                                                                                                                                                                                                                                                                                                                              +        <th scope="col" i18n="A link that takes a user to a center">Link</th>
                                                                                                                                                                                                                                                                                                                                                                                                                              +      </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                              +      <tr
                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-row
                                                                                                                                                                                                                                                                                                                                                                                                                              +        *matRowDef="let row; let i = index; columns: ['label', 'value', 'link']"
                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="goToChildrenList(row.id)"
                                                                                                                                                                                                                                                                                                                                                                                                                              +        class="pointer"
                                                                                                                                                                                                                                                                                                                                                                                                                              +        angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                              +        angularticsCategory="Navigation"
                                                                                                                                                                                                                                                                                                                                                                                                                              +        angularticsAction="dashboard_children_count_school_link"
                                                                                                                                                                                                                                                                                                                                                                                                                              +        [angularticsLabel]="'list-entry-' + i"
                                                                                                                                                                                                                                                                                                                                                                                                                              +      ></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                              +    </table>
                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                              +</app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              + ./entity-count-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              @use "../../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityCreateButtonComponent.html b/documentation/components/EntityCreateButtonComponent.html new file mode 100644 index 0000000000..224860d050 --- /dev/null +++ b/documentation/components/EntityCreateButtonComponent.html @@ -0,0 +1,628 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/entity-create-button/entity-create-button.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + iconOnly +
                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Whether only an icon button without text should be displayed. +Default is false

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + newRecordFactory +
                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Optional factory method to create a new entity instance with some default values. +If not provided, the simple entityType constructor is used.

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + entityCreate +
                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Emits a new entity instance when the user clicks the button.

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + + create + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +create() +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                Create a new entity. +The entity is only written to the database when the user saves this record which is newly added in edit mode.

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Angulartics2OnModule } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-entity-create-button",
                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                +    Angulartics2OnModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./entity-create-button.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrl: "./entity-create-button.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                +export class EntityCreateButtonComponent<T extends Entity = Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() entityType: EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Optional factory method to create a new entity instance with some default values.
                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If not provided, the simple entityType constructor is used.
                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() newRecordFactory?: () => T;
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Emits a new entity instance when the user clicks the button.
                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() entityCreate = new EventEmitter<T>();
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Whether only an icon button without text should be displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Default is false
                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() iconOnly: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Create a new entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The entity is only written to the database when the user saves this record which is newly added in edit mode.
                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                +  create() {
                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newRecord = this.newRecordFactory
                                                                                                                                                                                                                                                                                                                                                                                                                                +      ? this.newRecordFactory()
                                                                                                                                                                                                                                                                                                                                                                                                                                +      : new this.entityType();
                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.entityCreate.emit(newRecord);
                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                <button
                                                                                                                                                                                                                                                                                                                                                                                                                                +  mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                +  color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  [class.standard-add-button]="!iconOnly"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  [class.table-action-button]="iconOnly"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  (click)="create()"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  angularticsCategory="UserAction"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  [angularticsCategory]="entityType.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  angularticsAction="list_add_entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                +    operation: 'create',
                                                                                                                                                                                                                                                                                                                                                                                                                                +  }"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  matTooltip="Create a new {{ entityType.label }} record"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                                                                                +  <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                +    aria-label="add element"
                                                                                                                                                                                                                                                                                                                                                                                                                                +    icon="plus-circle"
                                                                                                                                                                                                                                                                                                                                                                                                                                +    [class.standard-icon-with-text]="!iconOnly"
                                                                                                                                                                                                                                                                                                                                                                                                                                +    [class.icon-only]="iconOnly"
                                                                                                                                                                                                                                                                                                                                                                                                                                +  ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                +  <span *ngIf="!iconOnly" i18n>Add New</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityDetailsComponent.html b/documentation/components/EntityDetailsComponent.html new file mode 100644 index 0000000000..7f07843daf --- /dev/null +++ b/documentation/components/EntityDetailsComponent.html @@ -0,0 +1,912 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-details/entity-details/entity-details.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  This component can be used to display an entity in more detail. +It groups subcomponents in panels. +Any component that is registered (has the DynamicComponent decorator) can be used as a subcomponent. +The subcomponents will be provided with the Entity object and the creating new status, as well as its static config.

                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + AbstractEntityDetailsComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + panels +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Panel[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  The configuration for the panels on this details page.

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + Async + loadEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + loadEntity() +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + subscribeToEntityChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + subscribeToEntityChanges() +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + entityConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Panel, PanelComponent, PanelConfig } from "../EntityDetailsConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Angulartics2OnModule } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { TabStateModule } from "../../../utils/tab-state/tab-state.module";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { CommonModule, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityActionsMenuComponent } from "../entity-actions-menu/entity-actions-menu.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityArchivedInfoComponent } from "../entity-archived-info/entity-archived-info.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { UntilDestroy } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AbilityModule } from "@casl/angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AbstractEntityDetailsComponent } from "../abstract-entity-details/abstract-entity-details.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ViewActionsComponent } from "../../common-components/view-actions/view-actions.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This component can be used to display an entity in more detail.
                                                                                                                                                                                                                                                                                                                                                                                                                                  + * It groups subcomponents in panels.
                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Any component that is registered (has the `DynamicComponent` decorator) can be used as a subcomponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The subcomponents will be provided with the Entity object and the creating new status, as well as its static config.
                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                  +@RouteTarget("EntityDetails")
                                                                                                                                                                                                                                                                                                                                                                                                                                  +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-entity-details",
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./entity-details.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./entity-details.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    Angulartics2OnModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTabsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    TabStateModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ViewTitleComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    EntityActionsMenuComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    EntityArchivedInfoComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    RouterLink,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    AbilityModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ViewActionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class EntityDetailsComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  extends AbstractEntityDetailsComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  implements OnChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                  +{
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The configuration for the panels on this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() panels: Panel[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override async ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await super.ngOnChanges(changes);
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (changes.id || changes.entity || changes.panels) {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.initPanels();
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private initPanels() {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.panels = this.panels.map((p) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      title: p.title,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      components: p.components.map((c) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        title: c.title,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        component: c.component,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        config: this.getPanelConfig(c),
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      })),
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }));
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private getPanelConfig(c: PanelComponent): PanelConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let panelConfig: PanelConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      entity: this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      creatingNew: this.entity.isNew,
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (typeof c.config === "object" && !Array.isArray(c.config)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      panelConfig = { ...c.config, ...panelConfig };
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      panelConfig.config = c.config;
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return panelConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  <!-- Header: title + actions -->
                                                                                                                                                                                                                                                                                                                                                                                                                                  +<app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @if (!entity?.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    {{ entity?.toString() }}
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <span i18n="Title when adding a new entity">
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      Adding new {{ this.entityConstructor?.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                  +</app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +<app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <app-entity-actions-menu
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [navigateOnDelete]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [showExpanded]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [routerLink]="['/admin/entity', entity?.getType()]"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [queryParams]="{ mode: 'details' }"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      queryParamsHandling="merge"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      *ngIf="'update' | ablePure: 'Config' | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        class="standard-icon-with-text color-accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        icon="tools"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <span i18n>Edit Data Structure</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </app-entity-actions-menu>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +</app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +<app-entity-archived-info [entity]="entity"></app-entity-archived-info>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +<!-- Content: tabbed components -->
                                                                                                                                                                                                                                                                                                                                                                                                                                  +<mat-tab-group appTabStateMemo [preserveContent]="true">
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-tab
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    *ngFor="let panelConfig of panels"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [disabled]="entity?.isNew || unsavedChanges.pending"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <ng-template mat-tab-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <span
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [matTooltipDisabled]="!entity?.isNew"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        matTooltip="Save the new record to create it before accessing other details"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        i18n-matTooltip="
                                                                                                                                                                                                                                                                                                                                                                                                                                  +          Tooltip explaining disabled sections when creating new entity
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        "
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        {{ panelConfig.title }}
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <ng-template matTabContent>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <div *ngIf="isLoading" class="process-spinner">
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <div
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        *ngFor="let componentConfig of panelConfig.components; let j = index"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        class="padding-top-large"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <h3 *ngIf="componentConfig.title && componentConfig.title !== ''">
                                                                                                                                                                                                                                                                                                                                                                                                                                  +          {{ componentConfig.title }}
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        </h3>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <ng-template
                                                                                                                                                                                                                                                                                                                                                                                                                                  +          *ngIf="componentConfig.config?.entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +          [appDynamicComponent]="componentConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ></ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <br *ngIf="j < panelConfig.components.length - 1" />
                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </mat-tab>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +</mat-tab-group>
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./entity-details.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  :host {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  display: block;
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  height: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +.mat-mdc-tab-group {
                                                                                                                                                                                                                                                                                                                                                                                                                                  +  height: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityFieldEditComponent.html b/documentation/components/EntityFieldEditComponent.html new file mode 100644 index 0000000000..87314f9805 --- /dev/null +++ b/documentation/components/EntityFieldEditComponent.html @@ -0,0 +1,692 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/common-components/entity-field-edit/entity-field-edit.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Generic component to display one entity property field's editComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Dynamically extends field details from entity schema and +loads the relevant, specific EditComponent implementation.

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    For viewComponent of a field, see EntityFieldViewComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(entityFormService: EntityFormService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                    entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + compactMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    Whether to display the field in a limited space, hiding details like the help description button.

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + field +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ColumnConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    field id or full config

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + form +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : EntityForm<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + _field + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    full field config extended from schema (used internally and for template)

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { HelpButtonComponent } from "../help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "../entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ColumnConfig, FormFieldConfig } from "../entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityFieldViewComponent } from "../entity-field-view/entity-field-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { InheritedValueButtonComponent } from "../../default-values/inherited-value-button/inherited-value-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Generic component to display one entity property field's editComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Dynamically extends field details from entity schema and
                                                                                                                                                                                                                                                                                                                                                                                                                                    + * loads the relevant, specific EditComponent implementation.
                                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                                    + * For viewComponent of a field, see EntityFieldViewComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-entity-field-edit",
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./entity-field-edit.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./entity-field-edit.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    EntityFieldViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    InheritedValueButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class EntityFieldEditComponent<T extends Entity = Entity>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  implements OnChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                    +{
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** field id or full config */
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() field: ColumnConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** full field config extended from schema (used internally and for template) */
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  _field: FormFieldConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() entity: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() form: EntityForm<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Whether to display the field in a limited space, hiding details like the help description button.
                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() compactMode: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(private entityFormService: EntityFormService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (changes.field || changes.entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.updateField();
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private updateField() {
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this.entity?.getConstructor()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this._field = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this._field = this.entityFormService.extendFormFieldConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.field,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  *ngIf="_field && form && _field.editComponent; else displayComponent"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  class="flex-row"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <div class="flex-grow">
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [appDynamicComponent]="{
                                                                                                                                                                                                                                                                                                                                                                                                                                    +        component: _field.editComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +        config: {
                                                                                                                                                                                                                                                                                                                                                                                                                                    +          formFieldConfig: _field,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +          formControl: form?.formGroup.get(_field.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                    +          entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                    +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <app-help-button
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    *ngIf="!compactMode"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [text]="_field.description"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ></app-help-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <app-inherited-value-button
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [field]="_field"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ></app-inherited-value-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +<ng-template #displayComponent>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <app-entity-field-view
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [field]="_field"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ></app-entity-field-view>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./entity-field-edit.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityFieldLabelComponent.html b/documentation/components/EntityFieldLabelComponent.html new file mode 100644 index 0000000000..5cc2472dc5 --- /dev/null +++ b/documentation/components/EntityFieldLabelComponent.html @@ -0,0 +1,620 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/common-components/entity-field-label/entity-field-label.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Generic component to display the label of one form field of an entity +without having to handle overwriting the field config with potentially missing schema field details.

                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(entityFormService: EntityFormService, entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                      entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                      entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityConstructor | string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      entity type to look up the schema details for the given field

                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + field +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ColumnConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      field id or full config

                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _entityType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + _field + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      full field config extended from schema (used internally and for template)

                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ColumnConfig, FormFieldConfig } from "../entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFormService } from "../entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Generic component to display the label of one form field of an entity
                                                                                                                                                                                                                                                                                                                                                                                                                                      + * without having to handle overwriting the field config with potentially missing schema field details.
                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-entity-field-label",
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./entity-field-label.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [MatTooltipModule, NgIf],
                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EntityFieldLabelComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** field id or full config */
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() field: ColumnConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** full field config extended from schema (used internally and for template) */
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  _field: FormFieldConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** entity type to look up the schema details for the given field */
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() entityType: EntityConstructor | string;
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  _entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (changes.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this._entityType =
                                                                                                                                                                                                                                                                                                                                                                                                                                      +        typeof this.entityType === "string"
                                                                                                                                                                                                                                                                                                                                                                                                                                      +          ? this.entityRegistry.get(this.entityType)
                                                                                                                                                                                                                                                                                                                                                                                                                                      +          : this.entityType;
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (changes.field || changes.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.updateField();
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private updateField() {
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this._field = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._field = this.entityFormService.extendFormFieldConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.field,
                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this._entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      <span *ngIf="_field" [matTooltip]="_field.description">
                                                                                                                                                                                                                                                                                                                                                                                                                                      +  {{ _field?.label ?? _field?.id }}
                                                                                                                                                                                                                                                                                                                                                                                                                                      +</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityFieldViewComponent.html b/documentation/components/EntityFieldViewComponent.html new file mode 100644 index 0000000000..816080dae1 --- /dev/null +++ b/documentation/components/EntityFieldViewComponent.html @@ -0,0 +1,639 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/common-components/entity-field-view/entity-field-view.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Generic component to display one entity property field's viewComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Dynamically extends field details from entity schema and +loads the relevant, specific EditComponent implementation.

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        For editComponent form field, see EntityFieldEditComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(entityFormService: EntityFormService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                        entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : E + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + field +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : ColumnConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        field id or full config

                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + showLabel +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : "inline" | "above" | "none" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "none" +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + _field + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        full field config extended from schema (used internally and for template)

                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ColumnConfig, FormFieldConfig } from "../entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityFormService } from "../entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { PillComponent } from "../pill/pill.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Generic component to display one entity property field's viewComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Dynamically extends field details from entity schema and
                                                                                                                                                                                                                                                                                                                                                                                                                                        + * loads the relevant, specific EditComponent implementation.
                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                        + * For editComponent form field, see EntityFieldEditComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-entity-field-view",
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./entity-field-view.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./entity-field-view.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [NgIf, DynamicComponentDirective, PillComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class EntityFieldViewComponent<E extends Entity = Entity>
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  implements OnChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                        +{
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() entity: E;
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** field id or full config */
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() field: ColumnConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** full field config extended from schema (used internally and for template) */
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  _field: FormFieldConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() showLabel: "inline" | "above" | "none" = "none";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(private entityFormService: EntityFormService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (changes.field || changes.entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.updateField();
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private updateField() {
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!this.entity?.getConstructor()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this._field = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this._field = this.entityFormService.extendFormFieldConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.field,
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        <div *ngIf="_field">
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div *ngIf="showLabel === 'above'" class="label">
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    {{ _field.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <span *ngIf="showLabel === 'inline'">{{ _field.label }}:&nbsp;</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    *ngIf="_field.viewComponent"
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    [appDynamicComponent]="{
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      component: _field.viewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      config: {
                                                                                                                                                                                                                                                                                                                                                                                                                                        +        value: entity[_field.id],
                                                                                                                                                                                                                                                                                                                                                                                                                                        +        id: _field.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                        +        entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                        +        config: _field.additional,
                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }"
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./entity-field-view.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +.label {
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  font-size: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                        +  color: colors.$muted;
                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityFieldsMenuComponent.html b/documentation/components/EntityFieldsMenuComponent.html new file mode 100644 index 0000000000..b61be665fd --- /dev/null +++ b/documentation/components/EntityFieldsMenuComponent.html @@ -0,0 +1,846 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/common-components/entity-fields-menu/entity-fields-menu.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(entityFormService: EntityFormService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                          entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + activeFields +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + availableFields +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + icon +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : IconProp + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "eye" +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + activeFieldsChange +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + toggleFieldSelection + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +toggleFieldSelection(field: FormFieldConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                          field + FormFieldConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + _availableFields + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + availableFields +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + setavailableFields(value: ColumnConfig[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                          value + ColumnConfig[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          import {
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Optional,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { IconProp } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityFieldLabelComponent } from "../entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  toFormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "../entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityFormService } from "../entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-entity-fields-menu",
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./entity-fields-menu.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrl: "./entity-fields-menu.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class EntityFieldsMenuComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() icon: IconProp = "eye";
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() set availableFields(value: ColumnConfig[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this._availableFields = value
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((field) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.entityFormService && this.entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                          +          ? this.entityFormService.extendFormFieldConfig(field, this.entityType)
                                                                                                                                                                                                                                                                                                                                                                                                                                          +          : toFormFieldConfig(field),
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((field) => field.label)
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // filter duplicates:
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (item, pos, arr) => arr.findIndex((x) => x.id === item.id) === pos,
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  _availableFields: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() activeFields: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() activeFieldsChange = new EventEmitter<string[]>();
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(@Optional() private entityFormService: EntityFormService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  toggleFieldSelection(field: FormFieldConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.activeFields.includes(field.id)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.activeFields = this.activeFields.filter((f) => f !== field.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.activeFields = [...this.activeFields, field.id];
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.activeFieldsChange.emit(this.activeFields);
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  [matMenuTriggerFor]="list"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  matTooltip="Add or remove visible fields"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  class="square-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <fa-icon [icon]="icon" transform="shrink-4"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +<mat-menu #list>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    *ngFor="let field of _availableFields"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (click)="toggleFieldSelection(field)"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      class="standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [icon]="activeFields.includes(field.id) ? 'toggle-on' : 'toggle-off'"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <app-entity-field-label
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [field]="field"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [entityType]="entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ></app-entity-field-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +</mat-menu>
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityFormComponent.html b/documentation/components/EntityFormComponent.html new file mode 100644 index 0000000000..6490a5bbde --- /dev/null +++ b/documentation/components/EntityFormComponent.html @@ -0,0 +1,784 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/common-components/entity-form/entity-form/entity-form.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            A general purpose form component for displaying and editing entities. +It uses the FormFieldConfig interface for building the form fields but missing information are also fetched from +the entity's schema definitions. Properties with sufficient schema information can be displayed by only providing +the name of this property (and not an FormFieldConfig object).

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            This component can be used directly or in a popup. +Inside the entity details component use the FormComponent which is registered as dynamic component.

                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(entityMapper: EntityMapperService, confirmationDialog: ConfirmationDialogService, ability: EntityAbility) +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                            confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                            ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            The entity which should be displayed and edited

                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + fieldGroups +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + form +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EntityForm<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + gridLayout +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            Whether the component should use a grid layout or just rows

                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            import {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ViewEncapsulation,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityForm } from "../entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ConfirmationDialogService } from "../../confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgClass, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Subscription } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityFieldEditComponent } from "../../entity-field-edit/entity-field-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FieldGroup } from "../../../entity-details/form/field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityAbility } from "../../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                            + * A general purpose form component for displaying and editing entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                            + * It uses the FormFieldConfig interface for building the form fields but missing information are also fetched from
                                                                                                                                                                                                                                                                                                                                                                                                                                            + * the entity's schema definitions. Properties with sufficient schema information can be displayed by only providing
                                                                                                                                                                                                                                                                                                                                                                                                                                            + * the name of this property (and not an FormFieldConfig object).
                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This component can be used directly or in a popup.
                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Inside the entity details component use the FormComponent which is registered as dynamic component.
                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-entity-form",
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./entity-form.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./entity-form.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  // Use no encapsulation because we want to change the value of children (the mat-form-fields that are
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  // dynamically created)
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [NgForOf, NgIf, NgClass, EntityFieldEditComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class EntityFormComponent<T extends Entity = Entity>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  implements OnChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                            +{
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The entity which should be displayed and edited
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entity: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() form: EntityForm<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Whether the component should use a grid layout or just rows
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() gridLayout = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private initialFormValues: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private changesSubscription: Subscription;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.fieldGroups) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.fieldGroups = this.filterFieldGroupsByPermissions(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.fieldGroups,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (changes.entity && this.entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.changesSubscription?.unsubscribe();
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.changesSubscription = this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        .receiveUpdates(this.entity.getConstructor())
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filter(({ entity }) => entity.getId() === this.entity.getId()),
                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filter(({ type }) => type !== "remove"),
                                                                                                                                                                                                                                                                                                                                                                                                                                            +          untilDestroyed(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        .subscribe(({ entity }) => this.applyChanges(entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (changes.form && this.form) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.initialFormValues = this.form.formGroup.getRawValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.disableForLockedEntity();
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async applyChanges(externallyUpdatedEntity: T) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.formIsUpToDate(externallyUpdatedEntity)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Object.assign(this.entity, externallyUpdatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const userEditedFields = Object.entries(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.form.formGroup.getRawValue(),
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ).filter(([key]) => this.form.formGroup.controls[key].dirty);
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let userEditsWithoutConflicts = userEditedFields.filter(([key]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // no conflict with updated values
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityEqualsFormValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        externallyUpdatedEntity[key],
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.initialFormValues[key],
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      userEditsWithoutConflicts.length !== userEditedFields.length &&
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      !(await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        $localize`Load changes?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        $localize`Local changes are in conflict with updated values synced from the server. Do you want the local changes to be overwritten with the latest values?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ))
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // user "resolved" conflicts by confirming to overwrite
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      userEditsWithoutConflicts = userEditedFields;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // apply update to all pristine (not user-edited) fields and update base entity (to avoid conflicts when saving)
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Object.assign(this.entity, externallyUpdatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Object.assign(this.initialFormValues, externallyUpdatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.form.formGroup.reset(externallyUpdatedEntity as any);
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // re-apply user-edited fields
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    userEditsWithoutConflicts.forEach(([key, value]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.form.formGroup.get(key).setValue(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.form.formGroup.get(key).markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private formIsUpToDate(entity: T): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return Object.entries(this.form.formGroup.getRawValue()).every(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ([key, value]) => this.entityEqualsFormValue(entity[key], value),
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private filterFieldGroupsByPermissions<T extends Entity = Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldGroups: FieldGroup[],
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): FieldGroup[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const action = entity.isNew ? "create" : "read";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return fieldGroups
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .map((group) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        group.fields = group.fields.filter((field) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.ability.can(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +            action,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +            entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +            typeof field === "string" ? field : field.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return group;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .filter((group) => group.fields.length > 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private entityEqualsFormValue(entityValue, formValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (entityValue instanceof Date &&
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        moment(entityValue).isSame(formValue, "day")) ||
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (entityValue === undefined && formValue === null) ||
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      entityValue === formValue ||
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      JSON.stringify(entityValue) === JSON.stringify(formValue)
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Disable the form for certain states of the entity, like it being already anonymized.
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private disableForLockedEntity() {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.entity?.anonymized) {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.form.formGroup.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            <form [ngClass]="{ 'grid-layout': gridLayout }">
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <div *ngFor="let group of fieldGroups" class="entity-form-cell">
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <h2 *ngIf="group.header">{{ group.header }}</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <div *ngFor="let field of group.fields">
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <app-entity-field-edit
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [field]="field"
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ></app-entity-field-edit>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +</form>
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            + ./entity-form.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            @use "mixins/grid-layout";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +.grid-layout {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @include grid-layout.adaptive(
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    $min-block-width: sizes.$form-group-min-width,
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    $max-screen-width: 414px
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +.entity-form-cell {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  flex-direction: column;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /* set the width of each form field to 100% in every form component that is a descendent
                                                                                                                                                                                                                                                                                                                                                                                                                                            +     of the columns-wrapper class */
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  mat-form-field {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /* We align the photo (and only tht photo) to the center of the cell if there is one.
                                                                                                                                                                                                                                                                                                                                                                                                                                            +     This looks better on desktop and mobile compared to an alignment to the start of the cell
                                                                                                                                                                                                                                                                                                                                                                                                                                            +     which is the default for all other elements */
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  > app-edit-photo {
                                                                                                                                                                                                                                                                                                                                                                                                                                            +    align-self: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityImportConfigComponent.html b/documentation/components/EntityImportConfigComponent.html new file mode 100644 index 0000000000..3667efa2eb --- /dev/null +++ b/documentation/components/EntityImportConfigComponent.html @@ -0,0 +1,746 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/basic-datatypes/entity/entity-import-config/entity-import-config.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              Configuration UI for the EntityDatatype's import mapping function.

                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • + Async + save +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(data: MappingDialogData, confirmation: ConfirmationDialogService, dialog: MatDialogRef, entities: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                              data + MappingDialogData + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                              confirmation + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                              dialog + MatDialogRef<any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                              entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + save + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + save() +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + availableProperties + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : MappingDialogData + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + entity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + propertyForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : new FormControl("") +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MappingDialogData } from "../../../import/import-column-mapping/import-column-mapping.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfirmationDialogService } from "../../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityRegistry } from "../../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FormControl, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { HelpButtonComponent } from "../../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Configuration UI for the EntityDatatype's import mapping function.
                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("EntityImportConfig")
                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-entity-import-config",
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./entity-import-config.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./entity-import-config.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class EntityImportConfigComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entity: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  propertyForm = new FormControl("");
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  availableProperties: { property: string; label: string }[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    @Inject(MAT_DIALOG_DATA) public data: MappingDialogData,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private confirmation: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private dialog: MatDialogRef<any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const propertyName = this.data.col.propertyName;
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const entityName = this.data.entityType.schema.get(propertyName).additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.entity = this.entities.get(entityName);
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.availableProperties = [...this.entity.schema.entries()]
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .filter(([_, schema]) => !!schema.label)
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .map(([prop, schema]) => ({ label: schema.label, property: prop }));
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.propertyForm.setValue(this.data.col.additional);
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async save() {
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const confirmed =
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.propertyForm.value ||
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (await this.confirmation.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                              +        $localize`Ignore for import?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +        $localize`If no property is selected, this column will be skipped during import. Are you sure to keep it unmapped?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ));
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (confirmed) {
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.data.col.additional = this.propertyForm.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.dialog.close();
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              <mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <h3 i18n="Label for property selection">
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Select matching {{ entity.label }} property
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </h3>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-select [formControl]="propertyForm">
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                              +        *ngFor="let property of availableProperties"
                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [value]="property.property"
                                                                                                                                                                                                                                                                                                                                                                                                                                              +        >{{ property.label }}</mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </mat-select>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-help-button
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    text="Select which property of the target entity is matching with the values of this column. E.g. if your column contains names of children then select 'Name'."
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    i18n-text="import - value mapping (entity) - help text"
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ></app-help-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button mat-raised-button color="accent" (click)="save()" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Save & Close
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button mat-stroked-button matDialogClose i18n>Cancel</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              + ./entity-import-config.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityInlineEditActionsComponent.html b/documentation/components/EntityInlineEditActionsComponent.html new file mode 100644 index 0000000000..6efbd138f1 --- /dev/null +++ b/documentation/components/EntityInlineEditActionsComponent.html @@ -0,0 +1,836 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/entities-table/entity-inline-edit-actions/entity-inline-edit-actions.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Buttons to edit an (entities-table) row inline, handling the necessary logic and UI buttons.

                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(entityFormService: EntityFormService, alertService: AlertService, entityRemoveService: EntityActionsService, unsavedChanges: UnsavedChangesService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                entityRemoveService + EntityActionsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                unsavedChanges + UnsavedChangesService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + row +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : TableRow<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + delete + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + delete() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + edit + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + edit() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + resetChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +resetChanges() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Discard any changes to the given entity and reset it to the state before the user started editing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + save + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + save() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                Save an edited record to the database (if validation succeeds).

                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + form + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EntityForm<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Angulartics2OnModule } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DisableEntityOperationDirective } from "../../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { TableRow } from "../entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { InvalidFormFieldError } from "../../entity-form/invalid-form-field.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../../entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AlertService } from "../../../alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityActionsService } from "../../../entity/entity-actions/entity-actions.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { UnsavedChangesService } from "../../../entity-details/form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Buttons to edit an (entities-table) row inline, handling the necessary logic and UI buttons.
                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-entity-inline-edit-actions",
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    Angulartics2OnModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./entity-inline-edit-actions.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrl: "./entity-inline-edit-actions.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class EntityInlineEditActionsComponent<T extends Entity = Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() row: TableRow<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  form: EntityForm<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entityRemoveService: EntityActionsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private unsavedChanges: UnsavedChangesService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async edit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.form = await this.entityFormService.createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      Array.from(this.row.record.getSchema().keys()),
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.row.record,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.row.formGroup = this.form.formGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.row.formGroup.enable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Save an edited record to the database (if validation succeeds).
                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async save(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.row.record = await this.entityFormService.saveChanges(
                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.row.formGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.row.record,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      delete this.row.formGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!(err instanceof InvalidFormFieldError)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.alertService.addDanger(err.message);
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async delete(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.entityRemoveService.delete(this.row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Discard any changes to the given entity and reset it to the state before the user started editing.
                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  resetChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    delete this.row.formGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                <ng-container *ngIf="row && (!row.formGroup || row.formGroup.disabled)">
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity: row.record,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      operation: 'update',
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="edit(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <fa-icon aria-label="edit" icon="pen"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +</ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +<div *ngIf="row?.formGroup?.enabled" class="flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="save(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [angularticsCategory]="row?.record?.getType()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angularticsAction="subrecord_inlineedit_save"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <fa-icon aria-label="save" icon="check-circle"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="resetChanges(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [angularticsCategory]="row?.record?.getType()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angularticsAction="subrecord_inlineedit_cancel"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <fa-icon aria-label="cancel" icon="times-circle"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity: row.record,
                                                                                                                                                                                                                                                                                                                                                                                                                                                +      operation: 'delete',
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="delete(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [angularticsCategory]="row?.record?.getType()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angularticsAction="subrecord_inlineedit_delete"
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <fa-icon aria-label="delete" icon="trash"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntityListComponent.html b/documentation/components/EntityListComponent.html new file mode 100644 index 0000000000..171e43b864 --- /dev/null +++ b/documentation/components/EntityListComponent.html @@ -0,0 +1,2587 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-list/entity-list/entity-list.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  This component allows to create a full-blown table with pagination, filtering, searching and grouping. +The filter and grouping settings are written into the URL params to allow going back to the previous view. +The pagination settings are stored for each user. +The columns can be any kind of component. +The column components will be provided with the Entity object, the id for this column, as well as its static config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  The component can be either used inside a template, or directly in a route through the config object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + EntityListConfig + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(screenWidthObserver: ScreenWidthObserver, router: Router, activatedRoute: ActivatedRoute, entityMapperService: EntityMapperService, entities: EntityRegistry, dialog: MatDialog, duplicateRecord: DuplicateRecordService, entityActionsService: EntityActionsService, entitySpecialLoader: EntitySpecialLoaderService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                  screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  activatedRoute + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  duplicateRecord + DuplicateRecordService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  entityActionsService + EntityActionsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  entitySpecialLoader + EntitySpecialLoaderService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + allEntities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : "navigate" | "popup" | "none" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "navigate" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + columnGroups +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : ColumnGroupsConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : (FormFieldConfig | string)[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + defaultSort +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entityConstructor +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + exportConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + filters +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + loaderMethod +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  initial / default state whether to include archived records in the list

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + title +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + addNewClick +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + elementClick +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + addNew + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +addNew() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + anonymizeRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + anonymizeRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + applyFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +applyFilter(filterValue: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                  filterValue + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + archiveRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + archiveRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + deleteRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + deleteRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + duplicateRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +duplicateRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + getEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Template method that can be overwritten to change the loading logic.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<T[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + Async + loadEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + loadEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + onRowClick + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +onRowClick(row: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                  row + T + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + openFilterOverlay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +openFilterOverlay() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Calling this function will display the filters in a popup

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + defaultColumnGroup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + filteredData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + filterFreetext + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + filterObj + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + filterString + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + groups + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : GroupConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + isDesktop + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + mobileColumnGroup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + selectedColumnGroupIndex_ + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + selectedRows + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + selectedColumnGroupIndex +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + getselectedColumnGroupIndex() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + setselectedColumnGroupIndex(newValue: number) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                  newValue + number + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + offsetFilterStyle +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + getoffsetFilterStyle() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  defines the bottom margin of the topmost row in the +desktop version. This has to be bigger when there are +several column groups since there are +tabs with zero top-padding in this case

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : object + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Optional,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ActivatedRoute, Router, RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ColumnGroupsConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  EntityListConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  FilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  GroupConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "../EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormFieldConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ScreenWidthObserver } from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FilterOverlayComponent } from "../../filter/filter-overlay/filter-overlay.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  NgStyle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  NgTemplateOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Angulartics2OnModule } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FilterComponent } from "../../filter/filter/filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { TabStateModule } from "../../../utils/tab-state/tab-state.module";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ExportDataDirective } from "../../export/export-data-directive/export-data.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DuplicateRecordService } from "../duplicate-records/duplicate-records.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ExportColumnConfig } from "../../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityActionsService } from "app/core/entity/entity-actions/entity-actions.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntitiesTableComponent } from "../../common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { applyUpdate } from "../../entity/model/entity-update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Subscription } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DataFilter } from "../../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityCreateButtonComponent } from "../../common-components/entity-create-button/entity-create-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AbilityModule } from "@casl/angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityActionsMenuComponent } from "../../entity-details/entity-actions-menu/entity-actions-menu.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ViewActionsComponent } from "../../common-components/view-actions/view-actions.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  EntitySpecialLoaderService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  LoaderMethod,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "../../entity/entity-special-loader/entity-special-loader.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This component allows to create a full-blown table with pagination, filtering, searching and grouping.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The filter and grouping settings are written into the URL params to allow going back to the previous view.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The pagination settings are stored for each user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The columns can be any kind of component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The column components will be provided with the Entity object, the id for this column, as well as its static config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The component can be either used inside a template, or directly in a route through the config object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@RouteTarget("EntityList")
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-entity-list",
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./entity-list.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./entity-list.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providers: [DuplicateRecordService],
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgStyle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    Angulartics2OnModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgTemplateOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTabsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    FilterComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    TabStateModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ViewTitleComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ExportDataDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    RouterLink,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    EntityCreateButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    AbilityModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    EntityActionsMenuComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ViewActionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // WARNING: all imports here also need to be set for components extending EntityList, like ChildrenListComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class EntityListComponent<T extends Entity>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  implements EntityListConfig, OnChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() allEntities: T[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() entityConstructor: EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() defaultSort: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() exportConfig: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The special service or method to load data via an index or other special method.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() loaderMethod: LoaderMethod;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() clickMode: "navigate" | "popup" | "none" = "navigate";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** initial / default state whether to include archived records in the list */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() showInactive: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Output() elementClick = new EventEmitter<T>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Output() addNewClick = new EventEmitter();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selectedRows: T[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  isDesktop: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() title = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() columns: (FormFieldConfig | string)[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() columnGroups: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  groups: GroupConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  defaultColumnGroup = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  mobileColumnGroup = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() filters: FilterConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columnsToDisplay: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filterObj: DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filterString = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filteredData = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filterFreetext: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  get selectedColumnGroupIndex(): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.selectedColumnGroupIndex_;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  set selectedColumnGroupIndex(newValue: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedColumnGroupIndex_ = newValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.columnsToDisplay = this.groups[newValue].columns;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selectedColumnGroupIndex_: number = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * defines the bottom margin of the topmost row in the
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * desktop version. This has to be bigger when there are
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * several column groups since there are
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * tabs with zero top-padding in this case
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  get offsetFilterStyle(): object {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const bottomMargin = this.groups.length > 1 ? 29 : 14;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      "margin-bottom": `${bottomMargin}px`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private activatedRoute: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    protected entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private duplicateRecord: DuplicateRecordService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private entityActionsService: EntityActionsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    @Optional() private entitySpecialLoader: EntitySpecialLoaderService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.screenWidthObserver
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .platform()
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe((isDesktop) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        if (!isDesktop) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          this.displayColumnGroupByName(this.mobileColumnGroup);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        } else if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          this.selectedColumnGroupIndex ===
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          this.getSelectedColumnIndexByName(this.mobileColumnGroup)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          this.displayColumnGroupByName(this.defaultColumnGroup);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.isDesktop = isDesktop;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.buildComponentFromConfig();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private async buildComponentFromConfig() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entityConstructor = this.entities.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ) as EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!this.allEntities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // if no entities are passed as input, by default load all entities of the type
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      await this.loadEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.title = this.title || this.entityConstructor?.labelPlural;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.initColumnGroups(this.columnGroups);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.displayColumnGroupByName(
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.screenWidthObserver.isDesktop()
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ? this.defaultColumnGroup
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        : this.mobileColumnGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  protected async loadEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.allEntities = await this.getEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.listenToEntityUpdates();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Template method that can be overwritten to change the loading logic.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  protected getEntities(): Promise<T[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.loaderMethod && this.entitySpecialLoader) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return this.entitySpecialLoader.loadData(this.loaderMethod);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.entityMapperService.loadType(this.entityConstructor);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private updateSubscription: Subscription;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private listenToEntityUpdates() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!this.updateSubscription && this.entityConstructor) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.updateSubscription = this.entityMapperService
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        .receiveUpdates(this.entityConstructor)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        .subscribe((next) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          this.allEntities = applyUpdate(this.allEntities, next);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private initColumnGroups(columnGroup?: ColumnGroupsConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (columnGroup && columnGroup.groups.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.groups = columnGroup.groups;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.defaultColumnGroup =
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        columnGroup.default || columnGroup.groups[0].name;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.mobileColumnGroup = columnGroup.mobile || columnGroup.groups[0].name;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.groups = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          name: "default",
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          columns: this.columns.map((c) => (typeof c === "string" ? c : c.id)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.defaultColumnGroup = "default";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.mobileColumnGroup = "default";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  applyFilter(filterValue: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // TODO: turn this into one of our filter types, so that all filtering happens the same way (and we avoid accessing internal datasource of sub-component here)
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.filterFreetext = filterValue.trim().toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private displayColumnGroupByName(columnGroupName: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const selectedColumnIndex =
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.getSelectedColumnIndexByName(columnGroupName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (selectedColumnIndex !== -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.selectedColumnGroupIndex = selectedColumnIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private getSelectedColumnIndexByName(columnGroupName: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.groups.findIndex((c) => c.name === columnGroupName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Calling this function will display the filters in a popup
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  openFilterOverlay() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.dialog.open(FilterOverlayComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        filterConfig: this.filters,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        entityType: this.entityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        entities: this.allEntities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        useUrlQueryParams: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        filterObjChange: (filter: DataFilter<T>) => (this.filterObj = filter),
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  addNew() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.clickMode === "navigate") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.router.navigate(["new"], { relativeTo: this.activatedRoute });
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.addNewClick.emit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  duplicateRecords() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.duplicateRecord.duplicateRecord(this.selectedRows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedRows = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async deleteRecords() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.entityActionsService.delete(this.selectedRows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedRows = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async archiveRecords() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.entityActionsService.archive(this.selectedRows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedRows = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async anonymizeRecords() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.entityActionsService.anonymize(this.selectedRows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedRows = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  onRowClick(row: T) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.elementClick.emit(row);
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  <!-- Desktop version -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<div *ngIf="isDesktop">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <!-- Header bar; contains the title on the left and controls on the right -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <app-view-title [ngStyle]="offsetFilterStyle">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    {{ title }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <div class="flex-row gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <app-entity-create-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [entityType]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (entityCreate)="addNew()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ></app-entity-create-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <button mat-icon-button color="primary" [matMenuTriggerFor]="additional">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <fa-icon icon="ellipsis-v"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <!-- Filters -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <div class="flex-row gap-regular flex-wrap">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <div *ngTemplateOutlet="filterDialog"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <app-filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      *ngIf="!!allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="flex-row gap-regular flex-wrap"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [filterConfig]="filters"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [entityType]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [entities]="allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [useUrlQueryParams]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [(filterObj)]="filterObj"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ></app-filter>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <!-- Bulk Actions -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <ng-container *ngTemplateOutlet="bulkActions"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <!-- Tab Groups-->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <div class="mat-elevation-z1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <div *ngIf="groups.length > 1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <mat-tab-group
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [(selectedIndex)]="selectedColumnGroupIndex"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        appTabStateMemo
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <mat-tab
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          *ngFor="let item of groups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          [label]="item.name"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          angularticsAction="list_column_view"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          [angularticsLabel]="item.name"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ></mat-tab>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </mat-tab-group>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <ng-container *ngTemplateOutlet="subrecord"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<!-- Mobile Version -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<div *ngIf="!isDesktop">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <app-view-title [disableBackButton]="true">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <h2>{{ title }}</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <div class="flex-row full-width">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <div *ngTemplateOutlet="filterDialog"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <button mat-icon-button color="primary" [matMenuTriggerFor]="additional">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <fa-icon icon="ellipsis-v"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <div *ngIf="selectedRows" class="bulk-action-spacing">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <ng-container *ngTemplateOutlet="bulkActions"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <ng-container *ngTemplateOutlet="subrecord"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<!-- Templates and menus for both mobile and desktop -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<ng-template #filterDialog>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-form-field class="full-width filter-field">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <mat-label
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      i18n="Filter placeholder|Allows the user to filter through entities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >Filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="full-width"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      matInput
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      i18n-placeholder="Examples of things to filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      placeholder="e.g. name, age"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      (ngModelChange)="applyFilter($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [(ngModel)]="filterString"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    />
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      *ngIf="filterString"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aria-label="Clear"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      (click)="filterString = ''; applyFilter('')"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <fa-icon icon="times"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<ng-template #subrecord>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [entityType]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [records]="allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [customColumns]="columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [editable]="false"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [clickMode]="clickMode"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    (entityClick)="onRowClick($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [columnsToDisplay]="columnsToDisplay"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [filter]="filterObj"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [sortBy]="defaultSort"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [(selectedRecords)]="selectedRows"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [selectable]="!!selectedRows"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [showInactive]="showInactive"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    (filteredRecordsChange)="filteredData = $event"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [filterFreetext]="filterFreetext"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ></app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<mat-menu #additional>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <div class="hide-desktop">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      (click)="addNew()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      angularticsCategory="UserAction"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [angularticsAction]="title.toLowerCase().replace(' ', '_') + '_add_new'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        entity: entityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        operation: 'create',
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        aria-label="add element"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        icon="plus-circle"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <span i18n="Add a new entity to a list of multiple entities">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Add New
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <button mat-menu-item (click)="openFilterOverlay()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        aria-label="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        icon="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <span i18n="Show filter options popup for list"> Filter options </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [appExportData]="allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [exportConfig]="exportConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [filename]="title.replace(' ', '')"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    angularticsAction="list_csv_export"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aria-label="download csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      icon="download"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <span i18n="Download list contents as CSV"> Download all data (.csv) </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [appExportData]="filteredData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [exportConfig]="exportConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [filename]="title.replace(' ', '')"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    angularticsAction="list_csv_export"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aria-label="download csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      icon="download"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <span i18n="Download list contents as CSV"> Download current (.csv) </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    angularticsAction="import_file"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [routerLink]="['/import']"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [queryParams]="{ entityType: entityConstructor?.ENTITY_TYPE }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aria-label="import file"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      icon="file-import"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <span i18n> Import from file </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    (click)="selectedRows = []"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    matTooltip="Select multiple records for bulk actions like duplicating or deleting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    matTooltipPosition="before"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aria-label="bulk actions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      icon="list-check"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <span i18n> Bulk Actions </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [routerLink]="['/admin/entity', entityConstructor.ENTITY_TYPE]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [queryParams]="{ mode: 'list' }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    queryParamsHandling="merge"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    *ngIf="'update' | ablePure: 'Config' | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="standard-icon-with-text color-accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      icon="tools"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <span i18n>Edit Data Structure</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <ng-content select="[mat-menu-item]"></ng-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</mat-menu>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<ng-template #bulkActions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <div *ngIf="!!selectedRows" class="bulk-action-button">
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <div i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      Actions on <b>{{ selectedRows.length }}</b> selected records:
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      class="flex-row gap-small bulk-action-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      matTooltip="Select rows for an action on multiple records"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (click)="archiveRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Archive
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (click)="anonymizeRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Anonymize
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (click)="deleteRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (click)="duplicateRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Duplicate
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <button mat-raised-button (click)="selectedRows = undefined" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Cancel
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./entity-list.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  @use "../../../../styles/variables/breakpoints";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Aligns the baseline of the filter-field with the baseline
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * of the other controls.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This only has to be done on the desktop
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +.filter-field {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @media screen and (min-width: breakpoints.$md) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    /* restricts the width so that the field does not feel too big */
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    max-width: 412px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +.bulk-action-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  right: sizes.$large;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  padding: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  background-color: colors.$background;
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EntitySelectComponent.html b/documentation/components/EntitySelectComponent.html new file mode 100644 index 0000000000..90b4897779 --- /dev/null +++ b/documentation/components/EntitySelectComponent.html @@ -0,0 +1,1537 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/common-components/entity-select/entity-select.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(entityMapperService: EntityMapperService, formDialog: FormDialogService, entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + accessor +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : (e) => e.toString() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    The accessor used for filtering and when selecting a new +entity. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Per default, this filters for the name. If the entity +has no name, this filters for the entity's id.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + additionalFilter +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : (_) => true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string | [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    The entity-type (e.g. 'Child', 'School', e.t.c.) to set. + that displays the entities. Can be an array giving multiple types.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + form +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + includeInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    The label is what is seen above the list. For example when used +in the note-details-view, this is "Children"

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + multi +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Whether users can select multiple entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + placeholder +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    The placeholder is what is seen when someone clicks into the input- +field and adds new entities. +In the note-details-view, this is "Add children..." +The placeholder is only displayed if loading === false

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + showEntities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Whether to show entities in the list. +Entities can still be selected using the autocomplete, +and selection as well as selectionChange will +still work as expected

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + recalculateMatchingInactive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +recalculateMatchingInactive(newAutocompleteFilter?: (o?: Entity) => void) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Recalculates the number of inactive entities that match the current filter, +and optionally updates the current filter function (otherwise reuses the filter previously set)

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                    newAutocompleteFilter + function + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + toggleIncludeInactive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + toggleIncludeInactive() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + allEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : E[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + availableOptions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : new BehaviorSubject<E[]>([]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + createNewEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + currentlyMatchingInactive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + entityToId + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + loading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : new BehaviorSubject(true) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    true when this is loading and false when it's ready. +This subject's state reflects the actual loading resp. the 'readiness'- +state of this component. Will trigger once loading is done

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Readonly + loadingPlaceholder + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : $localize`:A placeholder for the input element when select options are not loaded yet:loading...` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + setentityType(type: string | string[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    The entity-type (e.g. 'Child', 'School', e.t.c.) to set. + that displays the entities. Can be an array giving multiple types.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                    type + string | string[] + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    The ENTITY_TYPE of a Entity. This affects the entities which will be loaded and the component +that displays the entities. Can be an array giving multiple types.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { BehaviorSubject, lastValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormControl, FormsModule, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatChipsModule } from "@angular/material/chips";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatAutocompleteModule } from "@angular/material/autocomplete";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { UntilDestroy } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityBlockComponent } from "../../basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatCheckboxModule } from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ErrorHintComponent } from "../error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { BasicAutocompleteComponent } from "../basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatSlideToggle } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { asArray } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormDialogService } from "../../form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-entity-select",
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./entity-select.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    "./entity-select.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    "../../common-components/basic-autocomplete/basic-autocomplete-dropdown.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatAutocompleteModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatChipsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatSlideToggle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class EntitySelectComponent<
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  E extends Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  T extends string[] | string = string[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  readonly loadingPlaceholder = $localize`:A placeholder for the input element when select options are not loaded yet:loading...`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() form: FormControl<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The entity-type (e.g. 'Child', 'School', e.t.c.) to set.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param type The ENTITY_TYPE of a Entity. This affects the entities which will be loaded and the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *             that displays the entities. Can be an array giving multiple types.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @throws Error when `type` is not in the entity-map
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() set entityType(type: string | string[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (type === undefined || type === null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      type = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this._entityType = Array.isArray(type) ? type : [type];
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loadAvailableEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private _entityType: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Whether users can select multiple entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() multi: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The label is what is seen above the list. For example when used
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * in the note-details-view, this is "Children"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The placeholder is what is seen when someone clicks into the input-
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * field and adds new entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * In the note-details-view, this is "Add children..."
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The placeholder is only displayed if `loading === false`
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() placeholder: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Whether to show entities in the list.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Entities can still be selected using the autocomplete,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * and {@link selection} as well as {@link selectionChange} will
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * still work as expected
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() showEntities: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * true when this is loading and false when it's ready.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This subject's state reflects the actual loading resp. the 'readiness'-
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * state of this component. Will trigger once loading is done
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  loading = new BehaviorSubject(true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  allEntities: E[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  availableOptions = new BehaviorSubject<E[]>([]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() includeInactive: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  currentlyMatchingInactive: number = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The accessor used for filtering and when selecting a new
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * <br> Per default, this filters for the name. If the entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * has no name, this filters for the entity's id.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() accessor: (e: Entity) => string = (e) => e.toString();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entityToId = (option: E) => option.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() additionalFilter: (e: E) => boolean = (_) => true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async loadAvailableEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loading.next(true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.allEntities = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const type of this._entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.allEntities.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ...(await this.entityMapperService.loadType<E>(type)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.allEntities.sort((a, b) => a.toString().localeCompare(b.toString()));
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await this.updateAvailableOptions();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loading.next(false);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async updateAvailableOptions() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const includeInactive = (entity: E) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.includeInactive || entity.isActive;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const includeSelected = (entity: E) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      asArray(this.form.value).includes(entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const newAvailableEntities = this.allEntities.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (e) => includeInactive(e) || includeSelected(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await this.alignAvailableAndSelectedEntities(newAvailableEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.availableOptions.next(newAvailableEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.recalculateMatchingInactive();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Edit form value (currently selected) and the given available Entities to be consistent:
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Entities that do not exist should be removed from the form value
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * and availableEntities should contain all selected entities, even from other types.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async alignAvailableAndSelectedEntities(availableEntities: E[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.form.value === null || this.form.value === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let updatedValue: T = this.form.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const id of asArray(this.form.value)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (availableEntities.find((e) => id === e.getId())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // already available, nothing to do
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const additionalEntity = await this.getEntity(id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (additionalEntity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        availableEntities.push(additionalEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        updatedValue = isMulti(this)
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          ? ((updatedValue as string[]).filter((v) => v !== id) as T)
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          : undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.form.value !== updatedValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.form.setValue(updatedValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async getEntity(selectedId: string): Promise<E | undefined> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const type = Entity.extractTypeFromId(selectedId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const entity = await this.entityMapperService
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .load<E>(type, selectedId)
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .catch((err: Error) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          "[ENTITY_SELECT] Error loading selected entity.",
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          this.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          selectedId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          err.message,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async toggleIncludeInactive() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.includeInactive = !this.includeInactive;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await this.updateAvailableOptions();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private autocompleteFilter: (o: E) => boolean = () => true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Recalculates the number of inactive entities that match the current filter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * and optionally updates the current filter function (otherwise reuses the filter previously set)
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param newAutocompleteFilter
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  recalculateMatchingInactive(newAutocompleteFilter?: (o: Entity) => boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (newAutocompleteFilter) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.autocompleteFilter = newAutocompleteFilter;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.currentlyMatchingInactive = this.allEntities.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (e) => !e.isActive && this.autocompleteFilter(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ).length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  createNewEntity = async (input: string): Promise<E> => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this._entityType?.length < 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this._entityType.length > 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "EntitySelect with multiple types is always creating a new entity of the first listed type only.",
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // TODO: maybe display an additional popup asking the user to select which type should be created?
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const newEntity = new (this.entityRegistry.get(this._entityType[0]))();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    applyTextToCreatedEntity(newEntity, input);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const dialogRef = this.formDialog.openFormPopup(newEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return lastValueFrom<E | undefined>(dialogRef.afterClosed());
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +function isMulti(
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  cmp: EntitySelectComponent<any, string | string[]>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +): cmp is EntitySelectComponent<any, string[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  return cmp.multi;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Update the given entity by applying the text entered by a user
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * to the most likely appropriate entity field, inferred from the toString representation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export function applyTextToCreatedEntity(entity: Entity, input: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  const toStringFields = entity.getConstructor().toStringAttributes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  if (!toStringFields || toStringFields.length < 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  const inputParts = input.split(/\s+/);
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  for (let i = 0; i < inputParts.length; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const targetProperty =
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      toStringFields[i < toStringFields.length ? i : toStringFields.length - 1];
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    entity[targetProperty] = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (entity[targetProperty] ?? "") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      inputParts[i]
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ).trim();
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  return entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <div class="autocomplete-container">
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <app-basic-autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      #autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [formControl]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [valueMapper]="entityToId"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [optionToString]="accessor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (autocompleteFilterChange)="recalculateMatchingInactive($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [multi]="multi"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [display]="showEntities ? 'chips' : 'none'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [options]="availableOptions | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [placeholder]="(loading | async) ? loadingPlaceholder : placeholder"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [createOption]="createNewEntity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <ng-template let-item>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          style="margin: auto"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          [entityToDisplay]="item"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          [linkDisabled]="form.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <ng-container autocompleteFooter *ngIf="currentlyMatchingInactive > 0">
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <mat-slide-toggle
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          [checked]="includeInactive"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          (toggleChange)="toggleIncludeInactive()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          i18n="Label for checkbox|e.g. include inactive children"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          >Also show {{ currentlyMatchingInactive }} inactive
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        </mat-slide-toggle>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </app-basic-autocomplete>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <div class="icon-container">
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        *ngIf="form.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        icon="caret-down"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        class="form-field-icon-suffix"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        (click)="autocomplete.showAutocomplete()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-error *ngIf="form.errors">
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <app-error-hint [form]="form"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./entity-select.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    .chip {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  padding-top: 2px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  padding-bottom: 2px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ../../common-components/basic-autocomplete/basic-autocomplete-dropdown.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    .autocomplete-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.icon-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  top: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  right: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/EnumDropdownComponent.html b/documentation/components/EnumDropdownComponent.html new file mode 100644 index 0000000000..7524f8db78 --- /dev/null +++ b/documentation/components/EnumDropdownComponent.html @@ -0,0 +1,1042 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/configurable-enum/enum-dropdown/enum-dropdown.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(enumService: ConfigurableEnumService, entityMapper: EntityMapperService, ability: EntityAbility, dialog: MatDialog, confirmation: ConfirmationDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                      enumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      confirmation + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + enumId +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + form +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormControl + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + multi +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + openSettings + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +openSettings(event: Event) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                      event + Event + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + canEdit + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + createNewOption + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + enumEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ConfigurableEnum + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + enumValueToString + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + invalidOptions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ConfigurableEnumValue[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + options + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ConfigurableEnumValue[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FormControl, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumDirective } from "../configurable-enum-directive/configurable-enum.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumValue } from "../configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { BasicAutocompleteComponent } from "../../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumService } from "../configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityMapperService } from "../../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnum } from "../configurable-enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityAbility } from "../../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigureEnumPopupComponent } from "../configure-enum-popup/configure-enum-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfirmationDialogService } from "../../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { OkButton } from "../../../common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-enum-dropdown",
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./enum-dropdown.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    "./enum-dropdown.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    "../../../common-components/basic-autocomplete/basic-autocomplete-dropdown.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ConfigurableEnumDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EnumDropdownComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() form: FormControl; // cannot be named "formControl" - otherwise the angular directive grabs this
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() multi = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  enumEntity: ConfigurableEnum;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  invalidOptions: ConfigurableEnumValue[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  options: ConfigurableEnumValue[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  canEdit = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  enumValueToString = (v: ConfigurableEnumValue) => v?.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  createNewOption: (input: string) => Promise<ConfigurableEnumValue>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private enumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private confirmation: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (changes.hasOwnProperty("enumId")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.enumEntity = this.enumService.getEnum(this.enumId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.canEdit = this.ability.can("update", this.enumEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (this.canEdit) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.createNewOption = this.addNewOption.bind(this);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (changes.hasOwnProperty("enumId") || changes.hasOwnProperty("form")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.invalidOptions = this.prepareInvalidOptions();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.options = [...(this.enumEntity?.values ?? []), ...this.invalidOptions];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private prepareInvalidOptions(): ConfigurableEnumValue[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let additionalOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.multi && this.form.value?.isInvalidOption) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      additionalOptions = [this.form.value];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.multi) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      additionalOptions = this.form.value?.filter((o) => o.isInvalidOption);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return additionalOptions ?? [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async addNewOption(name: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const prevValues = JSON.stringify(this.enumEntity.values);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let addedOption: ConfigurableEnumValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      addedOption = this.enumEntity.addOption(name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } catch (error) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      await this.confirmation.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        $localize`Failed to create new option`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        $localize`Couldn't create this new option. Please check if the value already exists.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        OkButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!addedOption) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const userConfirmed = await this.confirmation.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      $localize`Create new option`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      $localize`Do you want to create the new option "${addedOption.label}"?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!userConfirmed) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.enumEntity.values = JSON.parse(prevValues);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    await this.entityMapper.save(this.enumEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return addedOption;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  openSettings(event: Event) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    event.stopPropagation();
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .open(ConfigureEnumPopupComponent, { data: this.enumEntity })
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .subscribe(() => this.updateOptions());
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private updateOptions() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.form.value &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // value not in options anymore
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      !this.enumEntity.values.some((v) => v.id === this.form.value.id) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // but was in options previously
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.options.some((v) => v.id === this.form.value.id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.form.setValue(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.options = [...(this.enumEntity?.values ?? []), ...this.invalidOptions];
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <mat-label>{{ label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <div class="autocomplete-container">
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <app-basic-autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      #autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [formControl]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [multi]="multi"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [options]="options"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [optionToString]="enumValueToString"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [createOption]="createNewOption"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ></app-basic-autocomplete>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <div class="icon-container">
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        *ngIf="form.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        icon="caret-down"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        class="form-field-icon-suffix"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        (click)="autocomplete.showAutocomplete()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        *ngIf="form.enabled && !!createNewOption && canEdit"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        class="form-field-icon-suffix"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        (click)="openSettings($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        icon="wrench"
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <mat-error *ngIf="form.errors">
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <app-error-hint [form]="form"></app-error-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + ./enum-dropdown.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      + ../../../common-components/basic-autocomplete/basic-autocomplete-dropdown.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      .autocomplete-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +.icon-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  top: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  right: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ErrorHintComponent.html b/documentation/components/ErrorHintComponent.html new file mode 100644 index 0000000000..81723ff196 --- /dev/null +++ b/documentation/components/ErrorHintComponent.html @@ -0,0 +1,404 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/common-components/error-hint/error-hint.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + form +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : UntypedFormControl + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { UntypedFormControl } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { KeyValuePipe, NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-error-hint",
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./error-hint.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./error-hint.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [NgForOf, KeyValuePipe],
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ErrorHintComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() form: UntypedFormControl;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div *ngFor="let err of form?.errors | keyvalue">
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  {{ err.value["errorMessage"] }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <ng-content></ng-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./error-hint.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        :host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/FaDynamicIconComponent.html b/documentation/components/FaDynamicIconComponent.html new file mode 100644 index 0000000000..616dc9bc6f --- /dev/null +++ b/documentation/components/FaDynamicIconComponent.html @@ -0,0 +1,735 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/common-components/fa-dynamic-icon/fa-dynamic-icon.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          This component can be used to display dynamic Font-Awesome icons. +The term 'dynamic icons' refers to icons that are injected at runtime, +for example through the config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(iconLibrary: FaIconLibrary) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                          iconLibrary + FaIconLibrary + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + icon +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Sets the dynamic icon by name. +You should make sure that the icon is registered inside the iconAliases-map, +or put it into this map if it isn't there. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +If for some reason the icon is not inside the map or cannot be inserted into the map, +the icon name has to match the exact icon name as provided by font-awesome. +A prefix can be specified using the syntax " ", for example +"far address-book". The default prefix, if not specified, is "fas" +(font-awesome solid icons) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +In case the provided icon still doesn't exist, a question-mark-icon with circle +(see fallbackIcon) will be shown. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +Note that there is no getter, and you should not attempt to get the icon name, for example via +_icon#iconName since it is not guaranteed to be the same as the provided name

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + _icon + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : IconDefinition + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          The font-awesome internal icon definition

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + fallbackIcon + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : faQuestionCircle +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          The fallback icon if the given icon is neither known (inside the internal map) +nor registered as a font-awesome icon

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + icon +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + seticon(icon: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Sets the dynamic icon by name. +You should make sure that the icon is registered inside the iconAliases-map, +or put it into this map if it isn't there. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +If for some reason the icon is not inside the map or cannot be inserted into the map, +the icon name has to match the exact icon name as provided by font-awesome. +A prefix can be specified using the syntax " ", for example +"far address-book". The default prefix, if not specified, is "fas" +(font-awesome solid icons) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +In case the provided icon still doesn't exist, a question-mark-icon with circle +(see fallbackIcon) will be shown. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +Note that there is no getter, and you should not attempt to get the icon name, for example via +_icon#iconName since it is not guaranteed to be the same as the provided name

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                          icon + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          the icon name

                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { ChangeDetectionStrategy, Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { IconName, IconPrefix } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  faCalendarAlt,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  faCalendarCheck,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  faChartLine,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  faFileAlt,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  faQuestionCircle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  faUsers,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@fortawesome/free-solid-svg-icons";
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FaIconLibrary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  IconDefinition,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A map to prevent old configs to be broken
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +const iconAliases = new Map<string, IconDefinition>([
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ["calendar-check-o", faCalendarCheck],
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ["file-text", faFileAlt],
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ["question", faQuestionCircle],
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ["line-chart", faChartLine],
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ["calendar", faCalendarAlt],
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ["users", faUsers],
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This component can be used to display dynamic Font-Awesome icons.
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * The term 'dynamic icons' refers to icons that are injected at runtime,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * for example through the config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-fa-dynamic-icon",
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  template: ` <fa-icon *ngIf="_icon" [icon]="_icon"></fa-icon>`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [FontAwesomeModule, NgIf],
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class FaDynamicIconComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** The fallback icon if the given icon is neither known (inside the internal map)
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * nor registered as a font-awesome icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static fallbackIcon = faQuestionCircle;
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Sets the dynamic icon by name.
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * You should make sure that the icon is registered inside the {@link iconAliases}-map,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * or put it into this map if it isn't there.
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * <br>
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * If for some reason the icon is not inside the map or cannot be inserted into the map,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * the icon name has to match the <em>exact</em> icon name as provided by font-awesome.
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A prefix can be specified using the syntax "<prefix> <icon-name>", for example
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * "far address-book". The default prefix, if not specified, is "fas"
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * (font-awesome solid icons)
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * <br>
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * In case the provided icon still doesn't exist, a question-mark-icon with circle
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * (see {@link fallbackIcon}) will be shown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * <br>
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Note that there is no getter, and you should not attempt to get the icon name, for example via
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * {@link _icon#iconName} since it is not guaranteed to be the same as the provided name
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param icon the icon name
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() set icon(icon: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!icon) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this._icon = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let definition = iconAliases.get(icon);
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!definition && icon) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const iconAndDef = icon.split(" ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (iconAndDef.length === 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        definition = this.iconLibrary.getIconDefinition(
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          "fas",
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          icon as IconName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        definition = this.iconLibrary.getIconDefinition(
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          iconAndDef[0] as IconPrefix,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          iconAndDef[1] as IconName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // Fallback if the icon is not available: search through the icon definitions
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!definition) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // Fallback if the icon is neither in the map nor a registered icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      definition = FaDynamicIconComponent.fallbackIcon;
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        `Tried to set icon "${icon}" but it does not exist as a font awesome regular item nor is it registered as an alias.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this._icon = definition;
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The font-awesome internal icon definition
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  _icon: IconDefinition;
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(private iconLibrary: FaIconLibrary) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/FilterComponent.html b/documentation/components/FilterComponent.html new file mode 100644 index 0000000000..b885681d67 --- /dev/null +++ b/documentation/components/FilterComponent.html @@ -0,0 +1,998 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/filter/filter/filter.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            This component can be used to display filters, for example above tables.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(filterGenerator: FilterGeneratorService, filterService: FilterService, router: Router, route: ActivatedRoute) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                            filterGenerator + FilterGeneratorService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            route + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            The list of entities. This is used to detect which options should be available

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            The type of entities that will be filtered

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + filterConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            The filter configuration from the config

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + filterObj +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            The filter query which is build by combining all selected filters. +This can be used as two-way-binding or through the filterObjChange output.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + onlyShowRelevantFilterOptions +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            If true, only filter options are shown, for which some entities pass the filter. +default false

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + useUrlQueryParams +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            If true, the filter state will be stored in the url and automatically applied on reload or navigation. +default false.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + filterObjChange +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            An event emitter that notifies about updates of the filter.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + filterOptionSelected + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +filterOptionSelected(filter: Filter<T>, selectedOptions: string[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                            filter + Filter<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            selectedOptions + string[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + filterSelections + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Filter<T>[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + urlPath + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FilterConfig } from "../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FilterGeneratorService } from "../filter-generator/filter-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ActivatedRoute, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgComponentOutlet } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { getUrlWithoutParams } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FilterService } from "../filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DataFilter, Filter } from "../filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This component can be used to display filters, for example above tables.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-filter",
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./filter.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [NgComponentOutlet],
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class FilterComponent<T extends Entity = Entity> implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The filter configuration from the config
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() filterConfig: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The type of entities that will be filtered
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entityType: EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The list of entities. This is used to detect which options should be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entities: T[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If true, the filter state will be stored in the url and automatically applied on reload or navigation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * default `false`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() useUrlQueryParams = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If true, only filter options are shown, for which some entities pass the filter.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * default `false`
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() onlyShowRelevantFilterOptions = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The filter query which is build by combining all selected filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * This can be used as two-way-binding or through the `filterObjChange` output.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() filterObj: DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * An event emitter that notifies about updates of the filter.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Output() filterObjChange = new EventEmitter<DataFilter<T>>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  filterSelections: Filter<T>[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  urlPath: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private filterGenerator: FilterGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private route: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.urlPath = getUrlWithoutParams(this.router);
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (changes.filterConfig || changes.entityType || changes.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.filterSelections = await this.filterGenerator.generate(
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.filterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.onlyShowRelevantFilterOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      for (const filter of this.filterSelections) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter.selectedOptionChange.subscribe((event) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.filterOptionSelected(filter, event),
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.loadUrlParams();
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.applyFilterSelections();
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  filterOptionSelected(filter: Filter<T>, selectedOptions: string[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    filter.selectedOptionValues = selectedOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.applyFilterSelections();
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.useUrlQueryParams) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.updateUrl(filter.name, selectedOptions.toString());
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private applyFilterSelections() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const previousFilter: string = JSON.stringify(this.filterObj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const newFilter: DataFilter<T> = this.filterService.combineFilters<T>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.filterSelections,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (previousFilter === JSON.stringify(newFilter)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.filterObj = newFilter;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.filterObjChange.emit(this.filterObj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private updateUrl(key: string, value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const params = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    params[key] = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.router.navigate([], {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      relativeTo: this.route,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      queryParams: params,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      queryParamsHandling: "merge",
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private loadUrlParams() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!this.useUrlQueryParams) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const params = this.route.snapshot.queryParams;
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.filterSelections.forEach((f) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (params.hasOwnProperty(f.name)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        f.selectedOptionValues = params[f.name]
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          .split(",")
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          .filter((value) => value !== "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            @for (filter of filterSelections; track filter.name) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    *ngComponentOutlet="filter.component; inputs: { filterConfig: filter }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  />
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/FilterOverlayComponent.html b/documentation/components/FilterOverlayComponent.html new file mode 100644 index 0000000000..236f649446 --- /dev/null +++ b/documentation/components/FilterOverlayComponent.html @@ -0,0 +1,504 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/filter/filter-overlay/filter-overlay.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              The component that shows filter options on small screens +via a popover instead of the menu

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • + + Public + data +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(data: FilterOverlayData<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                              data + FilterOverlayData<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : FilterOverlayData<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FilterConfig } from "../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FilterComponent } from "../filter/filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DataFilter } from "../filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface FilterOverlayData<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  filterConfig: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entityType: EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entities: T[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  useUrlQueryParams: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  filterObjChange: (filter: DataFilter<T>) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * The component that shows filter options on small screens
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * via a popover instead of the menu
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-filter-overlay",
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./filter-overlay.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styles: [":host { display: block }"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [MatDialogModule, FilterComponent, MatButtonModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class FilterOverlayComponent<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(@Inject(MAT_DIALOG_DATA) public data: FilterOverlayData<T>) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              <h1 mat-dialog-title i18n>Filter Options</h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<div mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [filterConfig]="data.filterConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [entityType]="data.entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [entities]="data.entities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [useUrlQueryParams]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (filterObjChange)="data.filterObjChange($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </app-filter>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<div mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button mat-raised-button mat-dialog-close i18n>Close</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              :host { display: block }
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/FormComponent.html b/documentation/components/FormComponent.html new file mode 100644 index 0000000000..afc468650e --- /dev/null +++ b/documentation/components/FormComponent.html @@ -0,0 +1,854 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/entity-details/form/form.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                A simple wrapper function of the EntityFormComponent which can be used as a dynamic component +e.g. as a panel for the EntityDetailsComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + FormConfig + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(router: Router, location: Location, entityFormService: EntityFormService, alertService: AlertService, viewContext: ViewComponentContext) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                viewContext + ViewComponentContext + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + creatingNew +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : E + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + fieldGroups +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + cancelClicked + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +cancelClicked() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + saveClicked + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + saveClicked() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + form + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EntityForm<E> | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Input, OnInit, Optional } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { getParentUrl } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Location, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { InvalidFormFieldError } from "../../common-components/entity-form/invalid-form-field.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AlertService } from "../../alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityFormComponent } from "../../common-components/entity-form/entity-form/entity-form.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FieldGroup } from "./field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A simple wrapper function of the EntityFormComponent which can be used as a dynamic component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * e.g. as a panel for the EntityDetailsComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("Form")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-form",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./form.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./form.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntityFormComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class FormComponent<E extends Entity> implements FormConfig, OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() entity: E;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() creatingNew = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  form: EntityForm<E> | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @Optional() private viewContext: ViewComponentContext,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.entityFormService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [].concat(...this.fieldGroups.map((group) => group.fields)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .then((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.form = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (!this.creatingNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.form.formGroup.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async saveClicked() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      await this.entityFormService.saveChanges(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.form.formGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (this.creatingNew && !this.viewContext?.isDialog) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        await this.router.navigate([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          getParentUrl(this.router),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.entity.getId(true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!(err instanceof InvalidFormFieldError)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.alertService.addDanger(err.message);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  cancelClicked() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.creatingNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.location.back();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.entityFormService.resetForm(this.form.formGroup, this.entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.form.formGroup.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Config format that the FormComponent handles.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface FormConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  class="form-buttons-wrapper padding-bottom-small flex-row gap-small align-self-end"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    *ngIf="form?.formGroup.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="saveClicked()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    i18n="Save button for forms"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    Save
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    *ngIf="form?.formGroup.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="cancelClicked()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    i18n="Cancel button for forms"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    Cancel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <ng-container *ngIf="form?.formGroup.disabled && !entity?.anonymized">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (click)="form?.formGroup.enable()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        operation: 'update',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      i18n="Edit button for forms"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      Edit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<app-entity-form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  *ngIf="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [fieldGroups]="fieldGroups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +></app-entity-form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./form.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  flex-direction: column;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.form-buttons-wrapper {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  position: sticky;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  top: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  z-index: 100;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  margin-right: 3px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  background-color: colors.$background;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  padding: sizes.$x-small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/GroupedChildAttendanceComponent.html b/documentation/components/GroupedChildAttendanceComponent.html new file mode 100644 index 0000000000..0571a5c3e8 --- /dev/null +++ b/documentation/components/GroupedChildAttendanceComponent.html @@ -0,0 +1,593 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/child-dev-project/children/child-details/grouped-child-attendance/grouped-child-attendance.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(attendanceService: AttendanceService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  attendanceService + AttendanceService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + activities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : RecurringActivity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + loading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, Input, OnInit, ViewEncapsulation } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AttendanceService } from "../../../attendance/attendance.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { RecurringActivity } from "../../../attendance/model/recurring-activity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { TabStateModule } from "../../../../utils/tab-state/tab-state.module";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ActivityAttendanceSectionComponent } from "../../../attendance/activity-attendance-section/activity-attendance-section.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("GroupedChildAttendance")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-grouped-child-attendance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./grouped-child-attendance.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./grouped-child-attendance.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTabsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    TabStateModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ActivityAttendanceSectionComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class GroupedChildAttendanceComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  loading: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  activities: RecurringActivity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(private attendanceService: AttendanceService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.loadActivities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private async loadActivities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.loading = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.activities = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      await this.attendanceService.getActivitiesForChild(this.entity.getId())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ).filter((a) => !a.excludedParticipants.includes(this.entity.getId()));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.loading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <div *ngIf="loading">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<mat-tab-group appTabStateMemo class="activity-tab-group">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <mat-tab *ngFor="let activity of activities" [label]="activity.title">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <app-activity-attendance-section
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [entity]="activity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [forChild]="entity.getId()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </app-activity-attendance-section>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </mat-tab>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</mat-tab-group>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./grouped-child-attendance.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  .activity-tab-group .mat-mdc-tab-body-content {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  overflow: hidden;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/HelpButtonComponent.html b/documentation/components/HelpButtonComponent.html new file mode 100644 index 0000000000..8c0eddfbf1 --- /dev/null +++ b/documentation/components/HelpButtonComponent.html @@ -0,0 +1,432 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/common-components/help-button/help-button.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Display a help button that shows the user additional guidance and explanations when necessary +as the user clicks on it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + text +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Help text to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Display a help button that shows the user additional guidance and explanations when necessary
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * as the user clicks on it.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-help-button",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./help-button.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./help-button.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [FontAwesomeModule, MatButtonModule, NgIf, MatTooltipModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class HelpButtonComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Help text to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() text: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  *ngIf="text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  type="button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  #tooltipElement="matTooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [matTooltip]="text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  (click)="tooltipElement.show()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <fa-icon icon="question-circle"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./help-button.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImagePopupComponent.html b/documentation/components/ImagePopupComponent.html new file mode 100644 index 0000000000..84942121f7 --- /dev/null +++ b/documentation/components/ImagePopupComponent.html @@ -0,0 +1,474 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/features/file/edit-photo/image-popup/image-popup.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • + + Public + data +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(data: literal type) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      data + literal type + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DialogCloseComponent } from "../../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-image-popup",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [CommonModule, DialogCloseComponent, MatDialogModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./image-popup.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./image-popup.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class ImagePopupComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(@Inject(MAT_DIALOG_DATA) public data: { url: string }) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +<img [src]="data.url" style="margin: 40px" />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + ./image-popup.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      img {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  max-width: 60vw;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportAdditionalActionsComponent.html b/documentation/components/ImportAdditionalActionsComponent.html new file mode 100644 index 0000000000..6260a34f45 --- /dev/null +++ b/documentation/components/ImportAdditionalActionsComponent.html @@ -0,0 +1,1085 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/import/import-additional-actions/import-additional-actions.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Import sub-step: Let user select additional import actions like adding entities to a group entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(entityMapper: EntityMapperService, entityTypeLabelPipe: EntityTypeLabelPipe, importService: ImportService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityTypeLabelPipe + EntityTypeLabelPipe + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        importService + ImportService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + importActions +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : AdditionalImportAction[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + importActionsChange +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + addAction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +addAction() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + removeAction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +removeAction(actionToRemove: AdditionalImportAction) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        actionToRemove + AdditionalImportAction + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + actionSelected + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + entityToId + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + linkableEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + linkableEntityTypes + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + linkEntityForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : new FormGroup({ + type: new FormControl({ value: "", disabled: true }), + id: new FormControl({ value: "", disabled: true }), + }) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + typeToString + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormControl, FormGroup, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityTypeLabelPipe } from "../../common-components/entity-type-label/entity-type-label.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { AdditionalImportAction } from "./additional-import-action";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ImportService } from "../import.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatListModule } from "@angular/material/list";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityBlockComponent } from "../../basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { BasicAutocompleteComponent } from "../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Import sub-step: Let user select additional import actions like adding entities to a group entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-import-additional-actions",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./import-additional-actions.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./import-additional-actions.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatListModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityTypeLabelPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providers: [EntityTypeLabelPipe],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ImportAdditionalActionsComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() importActions: AdditionalImportAction[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Output() importActionsChange = new EventEmitter<AdditionalImportAction[]>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  linkableEntityTypes: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  typeToString = (val) => this.entityTypeLabelPipe.transform(val);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  linkableEntities: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityToId = (e: Entity) => e.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  linkEntityForm = new FormGroup({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    type: new FormControl({ value: "", disabled: true }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    id: new FormControl({ value: "", disabled: true }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  actionSelected: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityTypeLabelPipe: EntityTypeLabelPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private importService: ImportService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.linkEntityForm
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .get("type")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .valueChanges.subscribe((val) => this.updateSelectableOptions(val));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.linkEntityForm
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .get("id")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .valueChanges.subscribe((val) => (this.actionSelected = !!val));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (changes.hasOwnProperty("entityType")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.updateSelectableTypes();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private updateSelectableTypes() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.linkEntityForm.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!this.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.linkEntityForm.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.linkableEntityTypes = this.importService.getLinkableEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.linkEntityForm.enable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.updateSelectableOptions(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private async updateSelectableOptions(newLinkType: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (newLinkType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.linkableEntities = await this.entityMapper.loadType(newLinkType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.linkEntityForm.get("id").enable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.linkableEntities = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.linkEntityForm.get("id").disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  addAction() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const newAction = this.linkEntityForm.getRawValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.importActions = [...(this.importActions ?? []), newAction];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.linkEntityForm.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.importActionsChange.emit(this.importActions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  removeAction(actionToRemove: AdditionalImportAction) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.importActions = this.importActions.filter((a) => a !== actionToRemove);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.importActionsChange.emit(this.importActions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <!-- Existing additional actions -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +<div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <mat-list-item *ngFor="let action of importActions">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        icon="xmark"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        matListItemIcon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (click)="removeAction(action)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        matTooltip="Remove"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        class="existing-action-remove"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <div matListItemTitle i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        Link all imported records to {{ action.type | entityTypeLabel }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <div matListItemLine>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [entityId]="action.id"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [linkDisabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </mat-list-item>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </mat-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    *ngIf="!(importActions?.length > 0)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    class="no-actions margin-bottom-large"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    i18n="import additional actions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    no additional actions selected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +<!-- Create new additional action -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +<form [formGroup]="linkEntityForm">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <mat-error *ngIf="linkEntityForm.disabled" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Select an Import Target Type before defining additional actions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div class="flex-row gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-label i18n="Label for linked entity type input"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        >Linked record type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <app-basic-autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        formControlName="type"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [options]="linkableEntityTypes"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [optionToString]="typeToString"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ></app-basic-autocomplete>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-label i18n="Label for linked entity input">Linked record</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <app-basic-autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        formControlName="id"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [options]="linkableEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [valueMapper]="entityToId"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <ng-template let-item>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            [entityToDisplay]="item"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            [linkDisabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </app-basic-autocomplete>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="addAction()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [disabled]="!actionSelected"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="action-add-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Add Action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./import-additional-actions.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        .action-add-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  margin: auto 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.existing-action-remove {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.no-actions {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportColumnMappingComponent.html b/documentation/components/ImportColumnMappingComponent.html new file mode 100644 index 0000000000..40e0344521 --- /dev/null +++ b/documentation/components/ImportColumnMappingComponent.html @@ -0,0 +1,1240 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/import/import-column-mapping/import-column-mapping.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Import sub-step: Let user map columns from import data to entity properties +and define value matching and transformations.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(entities: EntityRegistry, schemaService: EntitySchemaService, componentRegistry: ComponentRegistry, dialog: MatDialog, importColumnMappingService: ImportColumnMappingService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          componentRegistry + ComponentRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          importColumnMappingService + ImportColumnMappingService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + columnMapping +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ColumnMapping[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + rawData +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + columnMappingChange +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + openMappingComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + openMappingComponent(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + updateMapping + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +updateMapping(col: ColumnMapping, settingAdditional: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          col + ColumnMapping + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          settingAdditional + boolean + + No + + false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + allProps + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entity properties that have a label

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + dataTypeMap + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          properties that need further adjustments through a component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + isUsed + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + labelMapper + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + mappingAdditionalWarning + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : {} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          warning label badges for a mapped column that requires user configuration for the "additional" details

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + setentityType(value: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ColumnMapping } from "../column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { HelpButtonComponent } from "../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { BasicAutocompleteComponent } from "../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatBadgeModule } from "@angular/material/badge";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ComponentRegistry } from "../../../dynamic-components";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DefaultDatatype } from "../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ImportColumnMappingService } from "./import-column-mapping.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Import sub-step: Let user map columns from import data to entity properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * and define value matching and transformations.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-import-column-mapping",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./import-column-mapping.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./import-column-mapping.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatBadgeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class ImportColumnMappingComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() rawData: any[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() columnMapping: ColumnMapping[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() columnMappingChange = new EventEmitter<ColumnMapping[]>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() set entityType(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.entityCtor = this.entities.get(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dataTypeMap = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.allProps = [...this.entityCtor.schema.entries()]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter(([_, schema]) => schema.label)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map(([name, schema]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.dataTypeMap[name] = this.schemaService.getDatatypeOrDefault(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          schema.dataType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return name;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private entityCtor: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** entity properties that have a label */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  allProps: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** properties that need further adjustments through a component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  dataTypeMap: { [name: string]: DefaultDatatype };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** warning label badges for a mapped column that requires user configuration for the "additional" details */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mappingAdditionalWarning: { [key: string]: string } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  labelMapper = (name: string) => this.entityCtor.schema.get(name).label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isUsed = (option: string) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.columnMapping.some(({ propertyName }) => propertyName === option);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private componentRegistry: ComponentRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private importColumnMappingService: ImportColumnMappingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (changes.columnMapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.importColumnMappingService.automaticallySelectMappings(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.columnMapping,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.entityCtor.schema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async openMappingComponent(col: ColumnMapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const uniqueValues = new Set<any>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.rawData.forEach((obj) => uniqueValues.add(obj[col.column]));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const configComponent = await this.componentRegistry.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.dataTypeMap[col.propertyName].importConfigComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    )();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .open<any, MappingDialogData>(configComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          col: col,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          values: [...uniqueValues],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          entityType: this.entityCtor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        width: "80vw",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        disableClose: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .subscribe(() => this.updateMapping(col, true));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  updateMapping(col: ColumnMapping, settingAdditional: boolean = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!settingAdditional) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // reset additional, because mapping changed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      delete col.additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.mappingAdditionalWarning[col.column] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.dataTypeMap[
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        col.propertyName
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ]?.importIncompleteAdditionalConfigBadge?.(col);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // Emitting copy of array to trigger change detection; values have been updated in place through data binding
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.columnMappingChange.emit([...this.columnMapping]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  // TODO: infer column mapping from data. The following is from old DataImportModule (#1942)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Try to guess mappings of import file columns to entity properties.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * (e.g. based on column headers)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private inferColumnPropertyMapping() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //const columnMap: ImportColumnMap = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //    for (const p of this.properties) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //      const match = this.importData?.fields.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //        (f) => f === p.label || f === p.key
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //      if (match) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //        columnMap[match] = p;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    //    this.loadColumnMapping(columnMap);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface MappingDialogData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  col: ColumnMapping;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  values: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <span i18n>Define which columns / fields will be imported:</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <app-help-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    style="float: right"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    text="The form below lists all columns from your imported file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          Select a property of the record type in the system, into which you want to import each column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          You can also omit some columns. If you do not select anything for a column, that column will be ignored during the import.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          For advanced types, use the button next to the field to configure how values are transformed."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    i18n-text="import - column mapping - help text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </app-help-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +<div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <div *ngFor="let col of columnMapping">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <mat-label>{{ col.column }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <app-basic-autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [options]="allProps"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [(ngModel)]="col.propertyName"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (ngModelChange)="updateMapping(col)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [optionToString]="labelMapper"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [hideOption]="isUsed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      class="margin-left-small"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      *ngIf="dataTypeMap[col.propertyName]?.importConfigComponent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (click)="openMappingComponent(col)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      i18n="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        import - column mapping - configure additional transformation button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [matBadge]="mappingAdditionalWarning?.[col.column]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [matBadgeHidden]="!mappingAdditionalWarning?.[col.column]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      matBadgeColor="warn"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Configure value mapping
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ./import-column-mapping.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportComponent.html b/documentation/components/ImportComponent.html new file mode 100644 index 0000000000..e4e32c6a1e --- /dev/null +++ b/documentation/components/ImportComponent.html @@ -0,0 +1,1401 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/import/import/import.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            View providing a full UI workflow to import data from an uploaded file.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(confirmationDialog: ConfirmationDialogService, alertService: AlertService, route: ActivatedRoute, router: Router, location: Location) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            route + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + applyPreviousMapping + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +applyPreviousMapping(importMetadata: ImportMetadata) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            importMetadata + ImportMetadata + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + onColumnMappingUpdate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +onColumnMappingUpdate(newColumnMapping: ColumnMapping[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            newColumnMapping + ColumnMapping[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + onDataLoaded + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +onDataLoaded(data: ParsedData) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            data + ParsedData + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + onImportCompleted + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +onImportCompleted() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + reset(skipConfirmation?: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            skipConfirmation + boolean + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + additionalImportActions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : AdditionalImportAction[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + columnMapping + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ColumnMapping[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + entityType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + importFileComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ImportFileComponent + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + @ViewChild(ImportFileComponent)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + mappedColumnsCount + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            calculated for validation on columnMapping changes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + rawData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + stepper + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : MatStepper + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + @ViewChild(MatStepper)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, Inject, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ParsedData } from "../../common-components/input-file/input-file.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatStepper, MatStepperModule } from "@angular/material/stepper";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ColumnMapping } from "../column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImportFileComponent } from "../import-file/import-file.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ConfirmationDialogService } from "../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { AdditionalImportAction } from "../import-additional-actions/additional-import-action";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImportMetadata } from "../import-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { AlertService } from "../../alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ActivatedRoute, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImportHistoryComponent } from "../import-history/import-history.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityTypeLabelPipe } from "../../common-components/entity-type-label/entity-type-label.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImportEntityTypeComponent } from "../import-entity-type/import-entity-type.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatExpansionModule } from "@angular/material/expansion";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { HelpButtonComponent } from "../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImportAdditionalActionsComponent } from "../import-additional-actions/import-additional-actions.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImportColumnMappingComponent } from "../import-column-mapping/import-column-mapping.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ImportReviewDataComponent } from "../import-review-data/import-review-data.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { LOCATION_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * View providing a full UI workflow to import data from an uploaded file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@RouteTarget("Import")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-import",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./import.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./import.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatStepperModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ImportFileComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatCardModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ImportHistoryComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    EntityTypeLabelPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ImportEntityTypeComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatExpansionModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ImportAdditionalActionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ImportColumnMappingComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ImportReviewDataComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class ImportComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  rawData: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  additionalImportActions: AdditionalImportAction[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  columnMapping: ColumnMapping[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @ViewChild(MatStepper) stepper: MatStepper;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @ViewChild(ImportFileComponent) importFileComponent: ImportFileComponent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** calculated for validation on columnMapping changes */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  mappedColumnsCount: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private route: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    @Inject(LOCATION_TOKEN) private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.route.queryParamMap.subscribe((params) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (params.has("entityType")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entityType = params.get("entityType");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async reset(skipConfirmation?: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      !skipConfirmation &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      !(await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        $localize`:Import Reset Confirmation title:Cancel Import?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        $localize`:Import Reset Confirmation text:Do you really want to discard the currently prepared import?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const currentRoute = this.location.pathname;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.router
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .navigate([""], { skipLocationChange: true })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .then(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.router.navigate([currentRoute], { skipLocationChange: true }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  onDataLoaded(data: ParsedData) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.rawData = data.data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.columnMapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.alertService.addInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        $localize`:alert info after file load:Column Mappings have been reset`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.onColumnMappingUpdate(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      data.fields.map((field) => ({ column: field, propertyName: undefined })),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  onColumnMappingUpdate(newColumnMapping: ColumnMapping[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.columnMapping = newColumnMapping;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.mappedColumnsCount = newColumnMapping.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (m) => !!m.propertyName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ).length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  applyPreviousMapping(importMetadata: ImportMetadata) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityType = importMetadata.config.entityType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.additionalImportActions = importMetadata.config.additionalActions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const adjustedMappings = this.columnMapping.map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ({ column }) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        importMetadata.config.columnMapping.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          (c) => column === c.column,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ) ?? { column },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // TODO: load additionalActions also
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.onColumnMappingUpdate(adjustedMappings);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  onImportCompleted() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.reset(true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <mat-stepper [linear]="true" #stepper style="height: 100%">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <ng-template matStepperIcon="edit">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <fa-icon icon="check" class="stepper-icon"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <!-- STEP 1: SELECT FILE -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-step [completed]="rawData?.length > 0" #step1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepLabel>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div i18n="Import Step - upload">Select File</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        *ngIf="step1.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        class="step-label-extra"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        i18n="Import Step - upload - sub-label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        {{ rawData?.length }} rows to import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepContent>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div class="stepper-navigation">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          [disabled]="!step1.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          i18n="import next step button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          matStepperNext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div class="flex-row gap-large">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <div class="flex-grow">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          <app-import-file
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            (dataLoaded)="onDataLoaded($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          ></app-import-file>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <mat-card class="flex-grow-1-3">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          <mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            <app-import-history
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              [data]="rawData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              (itemSelected)="applyPreviousMapping($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            ></app-import-history>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          </mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </mat-card>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </mat-step>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <!-- STEP 2: SELECT IMPORT TYPE -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-step [completed]="!!entityType" #step2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepLabel>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div i18n="Import Step - import types">Select Import Type(s)</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        *ngIf="step2.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        class="step-label-extra"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        i18n="Import Step - type - sub-label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        as {{ entityType | entityTypeLabel }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepContent>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div class="stepper-navigation">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <button mat-stroked-button i18n="import back button" matStepperPrevious>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Back
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          [disabled]="!step2.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          i18n="import next step button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          matStepperNext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <app-import-entity-type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [(entityType)]="entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ></app-import-entity-type>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <mat-expansion-panel [expanded]="additionalImportActions?.length > 0">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          <mat-panel-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            <span i18n>Advanced Import Actions [optional]</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            <app-help-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              style="float: right"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              text="In addition to creating new records directly for the imported data you can also define additional actions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                    (e.g. to make all imported records members of an existing activity or group).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                    This is an advanced functionality you do not have to use.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +                    If uncertain, please refer to the user guides, videos or support contact."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              i18n-text="import - additional actions - help text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            </app-help-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          </mat-panel-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <app-import-additional-actions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          [entityType]="entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          [(importActions)]="additionalImportActions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ></app-import-additional-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </mat-expansion-panel>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </mat-step>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <!-- STEP 3: MAP COLUMNS -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-step [completed]="mappedColumnsCount > 0" #step3>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepLabel>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div i18n="Import Step - map columns">Map Columns</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        *ngIf="step3.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        class="step-label-extra"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        i18n="Import Step - map columns - sub-label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        {{ mappedColumnsCount }} columns selected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepContent>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div class="stepper-navigation">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <button mat-stroked-button i18n="import back button" matStepperPrevious>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Back
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          [disabled]="!step3.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          i18n="import next step button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          matStepperNext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <app-import-column-mapping
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [entityType]="entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [columnMapping]="columnMapping"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        (columnMappingChange)="onColumnMappingUpdate($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [rawData]="rawData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ></app-import-column-mapping>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </mat-step>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <!-- STEP 4: REVIEW DATA -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-step [completed]="false" #step4>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepLabel i18n="Import Step - review data">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Review & Edit Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <ng-template matStepContent>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <div class="stepper-navigation">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <button mat-stroked-button matStepperPrevious i18n="import back button">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Back
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          color="warn"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          (click)="reset()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          i18n="import cancel/reset button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Cancel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <app-import-review-data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [rawData]="rawData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [entityType]="entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [columnMapping]="columnMapping"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [additionalActions]="additionalImportActions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        (importComplete)="onImportCompleted()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ></app-import-review-data>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </mat-step>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</mat-stepper>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + ./import.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +mat-stepper {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  background-color: transparent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.stepper-icon {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  font-size: 0.8em;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.step-label-extra {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  font-size: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  color: colors.$muted;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/* this component is designed as a screen filling view with sticky headers */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  height: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  padding-bottom: 0; /* overwrite parent assigned (larger) padding to make reasonable use of space with scrolling */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +:host ::ng-deep .mat-horizontal-stepper-wrapper {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  height: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +:host ::ng-deep .mat-horizontal-content-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  overflow-y: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.stepper-navigation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  flex-direction: row;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  justify-content: flex-end;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  gap: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  position: sticky;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  top: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  z-index: 100;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  background-color: colors.$background;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  padding-top: sizes.$x-small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  padding-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportConfirmSummaryComponent.html b/documentation/components/ImportConfirmSummaryComponent.html new file mode 100644 index 0000000000..ac04739ca5 --- /dev/null +++ b/documentation/components/ImportConfirmSummaryComponent.html @@ -0,0 +1,689 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/import/import-confirm-summary/import-confirm-summary.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Summary screen and confirmation / execution dialog for running an import.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(dialogRef: MatDialogRef<ImportConfirmSummaryComponent>, data: ImportDialogData, snackBar: MatSnackBar, importService: ImportService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              dialogRef + MatDialogRef<ImportConfirmSummaryComponent> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              data + ImportDialogData + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              snackBar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              importService + ImportService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + executeImport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + executeImport() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : ImportDialogData + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + importInProgress + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ImportService } from "../import.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ImportMetadata, ImportSettings } from "../import-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Data passed into Import Confirmation Dialog.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface ImportDialogData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entitiesToImport: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  importSettings: ImportSettings;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Summary screen and confirmation / execution dialog for running an import.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-import-confirm-summary",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./import-confirm-summary.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./import-confirm-summary.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [MatDialogModule, NgIf, MatProgressBarModule, MatButtonModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class ImportConfirmSummaryComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  importInProgress: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private dialogRef: MatDialogRef<ImportConfirmSummaryComponent>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    @Inject(MAT_DIALOG_DATA) public data: ImportDialogData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private snackBar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private importService: ImportService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  // TODO: detailed summary including warnings of unmapped columns, ignored values, etc. (#1943)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async executeImport() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.importInProgress = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.dialogRef.disableClose = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const completedImport = await this.importService.executeImport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.data.entitiesToImport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.data.importSettings,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.showImportSuccessToast(completedImport);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.dialogRef.close(completedImport);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private showImportSuccessToast(completedImport: ImportMetadata) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const snackBarRef = this.snackBar.open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      $localize`Import completed`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      $localize`Undo`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        duration: 8000,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    snackBarRef.onAction().subscribe(async () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.importService.undoImport(completedImport);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <h2 *ngIf="!importInProgress" mat-dialog-title i18n>Start Import?</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<h2 *ngIf="importInProgress" mat-dialog-title i18n>Importing Data</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <!-- Summary -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div i18n>{{ data.entitiesToImport?.length }} records will be imported.</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <!-- Progress -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div *ngIf="importInProgress" class="margin-top-large">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div i18n>Importing data ...</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (click)="executeImport()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [disabled]="importInProgress"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    i18n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Confirm & Run Import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [mat-dialog-close]="false"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [disabled]="importInProgress"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    i18n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Cancel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + ./import-confirm-summary.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportEntityTypeComponent.html b/documentation/components/ImportEntityTypeComponent.html new file mode 100644 index 0000000000..75cacd3998 --- /dev/null +++ b/documentation/components/ImportEntityTypeComponent.html @@ -0,0 +1,751 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/import/import-entity-type/import-entity-type.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Import sub-step: Let user select which entity type data should be imported as.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                pre-selected entity type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entityTypeChange +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                user selected entity type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + entityRegistry + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EntityRegistry + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + entityTypes + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + expertMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + getexpertMode() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Whether to show all, including administrative, entity types for selection.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + setexpertMode(value: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                value + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { HelpButtonComponent } from "../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Import sub-step: Let user select which entity type data should be imported as.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-import-entity-type",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./import-entity-type.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./import-entity-type.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ImportEntityTypeComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** user selected entity type */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() entityTypeChange = new EventEmitter<string>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** pre-selected entity type */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Whether to show all, including administrative, entity types for selection.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  get expertMode(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this._expertMode;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  set expertMode(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.entityTypes = this.entityRegistry.getEntityTypes(!value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private _expertMode: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityTypes: { key: string; value: EntityConstructor }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(public entityRegistry: EntityRegistry) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.entityTypes = this.entityRegistry.getEntityTypes(true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // TODO: infer entityType automatically -> pre-select + UI explanatory text
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <p i18n>Select the import target type:</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<div class="flex-row align-center">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-label i18n>Import as</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-select
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      [(value)]="entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (selectionChange)="entityTypeChange.emit($event.value)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        *ngFor="let entity of entityTypes"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [value]="entity.key"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [hidden]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        {{ entity.value.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </mat-select>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <app-help-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    text="What type of records should your imported data become in the system? Select the target 'Entity Type' here. (e.g. are you trying to import participants, events or team members etc.)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    i18n-text="import - select type - help text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </app-help-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <span class="flex-grow"></span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-slide-toggle [(ngModel)]="expertMode" i18n="Toggle label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    >Expert Mode</mat-slide-toggle
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./import-entity-type.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportFileComponent.html b/documentation/components/ImportFileComponent.html new file mode 100644 index 0000000000..13b84c83b9 --- /dev/null +++ b/documentation/components/ImportFileComponent.html @@ -0,0 +1,643 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/import/import-file/import-file.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Import sub-step: Let user load a file and return parsed data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + dataLoaded +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + onFileLoad + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +onFileLoad(parsedData: ParsedData<any>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  parsedData + ParsedData<any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : ParsedData<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + inputFileField + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : InputFileComponent + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + @ViewChild(InputFileComponent)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, EventEmitter, Output, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  InputFileComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ParsedData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "../../common-components/input-file/input-file.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Import sub-step: Let user load a file and return parsed data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-import-file",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./import-file.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./import-file.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [InputFileComponent, NgIf],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class ImportFileComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Output() dataLoaded = new EventEmitter<ParsedData<any>>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  data: ParsedData<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @ViewChild(InputFileComponent) inputFileField: InputFileComponent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  onFileLoad(parsedData: ParsedData<any>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.dataLoaded.emit(parsedData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.data = parsedData;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public reset() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    delete this.data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.inputFileField.formControl.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <p i18n>Select a .csv file with data to import:</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<app-input-file (fileLoad)="onFileLoad($event)" fileType="csv"></app-input-file>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<div *ngIf="data" i18n>{{ data.data?.length }} rows detected for import</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./import-file.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportHistoryComponent.html b/documentation/components/ImportHistoryComponent.html new file mode 100644 index 0000000000..814a6c0aef --- /dev/null +++ b/documentation/components/ImportHistoryComponent.html @@ -0,0 +1,777 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/import/import-history/import-history.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(entityMapper: EntityMapperService, importService: ImportService, confirmationDialog: ConfirmationDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    importService + ImportService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + data +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + itemSelected +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + undoImport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + undoImport(item: ImportMetadata) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    item + ImportMetadata + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + previousImports + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ImportMetadata[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ImportMetadata } from "../import-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ImportService } from "../import.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfirmationDialogService } from "../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { applyUpdate } from "../../entity/model/entity-update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatExpansionModule } from "@angular/material/expansion";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DatePipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityTypeLabelPipe } from "../../common-components/entity-type-label/entity-type-label.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityBlockComponent } from "../../basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-import-history",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./import-history.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./import-history.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatExpansionModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DatePipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    EntityTypeLabelPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class ImportHistoryComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() data: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Output() itemSelected = new EventEmitter<ImportMetadata>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  previousImports: ImportMetadata[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private importService: ImportService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .receiveUpdates(ImportMetadata)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .subscribe((update) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.previousImports = applyUpdate(this.previousImports, update);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.sortImports();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loadPreviousImports();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async loadPreviousImports() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.previousImports =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.entityMapper.loadType<ImportMetadata>(ImportMetadata);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.sortImports();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private sortImports() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.previousImports.sort((a, b) => b.date.getTime() - a.date.getTime());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async undoImport(item: ImportMetadata) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const confirmation = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      $localize`:Import Undo Confirmation Title:Revert Import?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      $localize`:Import Undo Confirmation Text:Are you sure you want to undo this import? All records that had been imported at that time will be deleted from the system.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (confirmation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.importService.undoImport(item);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <h3 i18n>Previous Imports</h3>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<mat-accordion>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-expansion-panel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    *ngFor="let item of previousImports; index as i"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [expanded]="i === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <mat-panel-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        {{ item.date | date }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </mat-panel-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <mat-panel-description i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        {{ item.ids.length }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "{{ item.config.entityType | entityTypeLabel }}" records
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </mat-panel-description>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <div i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      imported by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        [entityId]="item.user"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entityType="User"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        [linkDisabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      at {{ item.date | date: "medium" }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <div class="flex-row gap-regular margin-top-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        i18n-matTooltip="Tooltip help text for button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        matTooltip="Please select a file first"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        [matTooltipDisabled]="data?.length > 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          [disabled]="!data?.length"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          (click)="itemSelected.emit(item)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          i18n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          Re-use configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <button (click)="undoImport(item)" mat-stroked-button color="warn" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        Undo import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-expansion-panel>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</mat-accordion>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  *ngIf="!(previousImports?.length > 0)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  class="no-results"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  i18n="Placeholder text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  no existing imports
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./import-history.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    .no-results {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportReviewDataComponent.html b/documentation/components/ImportReviewDataComponent.html new file mode 100644 index 0000000000..aab9e32373 --- /dev/null +++ b/documentation/components/ImportReviewDataComponent.html @@ -0,0 +1,904 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/import/import-review-data/import-review-data.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(importService: ImportService, matDialog: MatDialog, entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      importService + ImportService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      matDialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + additionalActions +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : AdditionalImportAction[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + columnMapping +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ColumnMapping[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + rawData +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + importComplete +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + startImport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + startImport() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + displayColumns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + entityConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + mappedEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ColumnMapping } from "../column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ImportService } from "../import.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ImportConfirmSummaryComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ImportDialogData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "../import-confirm-summary/import-confirm-summary.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { lastValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ImportMetadata } from "../import-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AdditionalImportAction } from "../import-additional-actions/additional-import-action";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { HelpButtonComponent } from "../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntitiesTableComponent } from "../../common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatProgressBar } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-import-review-data",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./import-review-data.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./import-review-data.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatProgressBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class ImportReviewDataComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() rawData: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entityConstructor: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() columnMapping: ColumnMapping[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() additionalActions: AdditionalImportAction[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Output() importComplete = new EventEmitter<ImportMetadata>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  isLoading: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  mappedEntities: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  displayColumns: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private importService: ImportService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private matDialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entityConstructor = this.entityRegistry.get(this.entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // Every change requires a complete re-calculation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.parseRawData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async parseRawData() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.isLoading = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.mappedEntities = await this.importService.transformRawDataToEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.rawData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.columnMapping,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.displayColumns = this.columnMapping
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .filter(({ propertyName }) => !!propertyName)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .map(({ propertyName }) => propertyName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.isLoading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async startImport() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const confirmationResult = await lastValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.matDialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .open(ImportConfirmSummaryComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            entitiesToImport: this.mappedEntities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            importSettings: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              columnMapping: this.columnMapping,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              entityType: this.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              additionalActions: this.additionalActions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          } as ImportDialogData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .afterClosed(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!!confirmationResult) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.importComplete.emit(confirmationResult);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @if (isLoading) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <div i18n>Preparing data for preview and import ...</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <div class="flex-row gap-regular align-center">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <span class="flex-grow" i18n>Review your mapped data to be imported:</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <button (click)="startImport()" mat-raised-button color="accent" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Start Import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <app-help-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      text="The data previewed here is mapped and transformed according to the 'Column Mapping' you defined in the previous step.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        Only columns for which you selected a field there will be imported and appears here in this preview.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        If necessary, you can go back to the previous step and make changes to the mapping."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      i18n-text="import - review data - help text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </app-help-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    [entityType]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    [customColumns]="displayColumns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    [columnsToDisplay]="displayColumns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    [records]="mappedEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    clickMode="none"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    [editable]="false"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + ./import-review-data.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ImportantNotesDashboardComponent.html b/documentation/components/ImportantNotesDashboardComponent.html new file mode 100644 index 0000000000..ca8ca9bba1 --- /dev/null +++ b/documentation/components/ImportantNotesDashboardComponent.html @@ -0,0 +1,727 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/child-dev-project/notes/dashboard-widgets/important-notes-dashboard/important-notes-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DashboardWidget +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(formDialog: FormDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + warningLevels +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + getRequiredEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getRequiredEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DashboardWidget +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DashboardWidget:20 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + openNote + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +openNote(note: Note) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        note + Note + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + dataMapper + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Note } from "../../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormDialogService } from "../../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DatePipe, NgStyle } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("ImportantNotesDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("ImportantNotesComponent") // TODO remove after all existing instances are updated
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-important-notes-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./important-notes-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./important-notes-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [DashboardListWidgetComponent, MatTableModule, DatePipe, NgStyle],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ImportantNotesDashboardComponent extends DashboardWidget {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override getRequiredEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return Note.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() warningLevels: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  dataMapper: (data: Note[]) => Note[] = (data) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((note) => note.warningLevel && this.noteIsRelevant(note))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .sort((a, b) => b.warningLevel._ordinal - a.warningLevel._ordinal);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(private formDialog: FormDialogService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private noteIsRelevant(note: Note): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.warningLevels.includes(note.warningLevel.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  openNote(note: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.formDialog.openView(note, "NoteDetails");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  icon="exclamation-triangle"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  subtitle="Notes needing follow-up"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  i18n-subtitle="subtitle|dashboard showing notes that require action"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  theme="note"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityType="Note"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [dataMapper]="dataMapper"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <table mat-table aria-label="Notes needing follow-up">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <!-- Table header only for assistive technologies like screen readers -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <tr hidden="true">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <th scope="col">Date</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <th scope="col">Title</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <ng-container matColumnDef="date">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <td *matCellDef="let note" class="date-cell row-indicator">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {{ note.date | date }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <ng-container matColumnDef="title">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <td *matCellDef="let note" class="subject-cell">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {{ note.subject }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <tr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-row
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      *matRowDef="let row; columns: ['date', 'title']"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="dashboard-table-row row-view"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="openNote(row)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [ngStyle]="{ '--row-indicator-color': row.getColor?.() }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./important-notes-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @use "../../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.subject-cell {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  text-align: right;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.row-view {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  & > td:first-child {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    padding-left: 2 * sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  & > td:last-child {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    padding-right: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/InheritedValueButtonComponent.html b/documentation/components/InheritedValueButtonComponent.html new file mode 100644 index 0000000000..100fecb6e9 --- /dev/null +++ b/documentation/components/InheritedValueButtonComponent.html @@ -0,0 +1,641 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/default-values/inherited-value-button/inherited-value-button.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Display an indicator for form fields explaining the status of the inherited-value config of that field +and allowing users to re-sync the inherited value manually.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(defaultValueService: DefaultValueService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          defaultValueService + DefaultValueService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + field +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + form +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EntityForm<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + defaultValueHint + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : DefaultValueHint | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityForm } from "../../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityFieldLabelComponent } from "../../common-components/entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { TemplateTooltipDirective } from "../../common-components/template-tooltip/template-tooltip.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  DefaultValueHint,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  DefaultValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "../default-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FormFieldConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Display an indicator for form fields explaining the status of the inherited-value config of that field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * and allowing users to re-sync the inherited value manually.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-inherited-value-button",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    TemplateTooltipDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatIconButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./inherited-value-button.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrl: "./inherited-value-button.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class InheritedValueButtonComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() form: EntityForm<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() field: FormFieldConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  defaultValueHint: DefaultValueHint | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(private defaultValueService: DefaultValueService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.defaultValueHint = this.defaultValueService.getDefaultValueUiHint(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.field?.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (changes.form && changes.form.firstChange) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.form?.formGroup.valueChanges.subscribe((value) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // ensure this is only called after the other changes handler
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        setTimeout(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            (this.defaultValueHint =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              this.defaultValueService.getDefaultValueUiHint(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                this.form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +                this.field?.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              )),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @if (defaultValueHint) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <div [appTemplateTooltip]="tooltip" class="inline-box">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      type="button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [disabled]="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        form.formGroup.disabled ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        defaultValueHint.isInSync ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        defaultValueHint.isEmpty
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (click)="defaultValueHint.syncFromParentField()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [icon]="defaultValueHint.isInSync ? 'link' : 'link-slash'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +<ng-template #tooltip>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <div class="field-hint">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <div i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Inherited value from parent record selected in field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      "<app-entity-field-label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [field]="defaultValueHint.inheritedFromField"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [entityType]="entity.getConstructor()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ></app-entity-field-label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      >"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <br />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    @if (defaultValueHint.isEmpty) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <div i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        Select exactly one record in the parent field to automatically inherit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        its value here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } @else if (defaultValueHint.isInSync) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <div i18n>(up-to-date, inherited from parent record)</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <div i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (manually overwritten): click to reset value to inherited from parent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        record
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        @if (!form.formGroup.enabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          (requires the form to be in "Edit" mode)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <div i18n></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/InputFileComponent.html b/documentation/components/InputFileComponent.html new file mode 100644 index 0000000000..24cf0a08ce --- /dev/null +++ b/documentation/components/InputFileComponent.html @@ -0,0 +1,766 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/common-components/input-file/input-file.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Form Field to select and parse a file.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Currently only supports CSV.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(papa: Papa) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            papa + Papa + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + fileType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : "csv" | "json" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + fileLoad +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            returns parsed data as an object on completing load after user selects a file

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + loadFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + loadFile($event: Event) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $event + Event + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + formControl + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : new FormControl() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + parsedData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ParsedData<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { readFile } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Papa } from "ngx-papaparse";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FormControl, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Form Field to select and parse a file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Currently only supports CSV.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-input-file",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./input-file.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class InputFileComponent<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** returns parsed data as an object on completing load after user selects a file */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Output() fileLoad = new EventEmitter<ParsedData<T>>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() fileType: "csv" | "json";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  parsedData: ParsedData<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  formControl = new FormControl();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(private papa: Papa) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async loadFile($event: Event): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.formControl.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const file = this.getFileFromInputEvent($event, this.fileType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.formControl.setValue(file.name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const fileContent = await readFile(file);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.parsedData = this.parseContent(fileContent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.fileLoad.emit(this.parsedData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } catch (errors) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.formControl.setErrors(errors);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.formControl.markAsTouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private getFileFromInputEvent(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    inputEvent: Event,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    allowedFileType?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): File {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const target = inputEvent.target as HTMLInputElement;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const file = target.files[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      allowedFileType &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      !file.name.toLowerCase().endsWith("." + allowedFileType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      throw { fileInvalid: `Only ${this.fileType} files are supported` };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return file;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private parseContent(fileContent: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.fileType === "csv") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const papaParsed = this.papa.parse(fileContent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        header: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        dynamicTyping: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        skipEmptyLines: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      result = { data: papaParsed.data, fields: papaParsed.meta.fields };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else if (this.fileType === "json") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      result = { data: JSON.parse(fileContent) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (result === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      throw { parsingError: "File could not be parsed" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (result.data.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      throw { parsingError: "File has no content" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Results and (optional) meta data about data parsed from a file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface ParsedData<T = any[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** object or array of objects parsed from a file */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  data: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** meta information listing the fields contained in data objects */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  fields?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  #fileInput
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  type="file"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  style="display: none"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  (change)="loadFile($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-label i18n="Label for file select input">Select file</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    matInput
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    readonly
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    i18n-placeholder="placeholder for file-input"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    placeholder="No file selected"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    (click)="fileInput.click()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <button mat-icon-button matIconSuffix (click)="fileInput.click()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <fa-icon icon="upload"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-error *ngIf="formControl.invalid">{{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    formControl.errors.fileInvalid || formControl.errors.parsingError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }}</mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/LanguageSelectComponent.html b/documentation/components/LanguageSelectComponent.html new file mode 100644 index 0000000000..5252443d41 --- /dev/null +++ b/documentation/components/LanguageSelectComponent.html @@ -0,0 +1,660 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/language/language-select/language-select.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Shows a dropdown-menu of available languages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(translationService: LanguageService, location: Location) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              translationService + LanguageService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + changeLocale + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +changeLocale(lang: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              lang + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + localeEnumId + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : LOCALE_ENUM_ID +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + siteRegionCode + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The region code of the currently selected language/region

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { ChangeDetectionStrategy, Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { LanguageService } from "../language.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { LOCATION_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { LANGUAGE_LOCAL_STORAGE_KEY } from "../language-statics";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatIconModule } from "@angular/material/icon";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { LOCALE_ENUM_ID } from "../languages";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfigurableEnumDirective } from "../../basic-datatypes/configurable-enum/configurable-enum-directive/configurable-enum.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Shows a dropdown-menu of available languages
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-language-select",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./language-select.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./language-select.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatIconModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ConfigurableEnumDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class LanguageSelectComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  localeEnumId = LOCALE_ENUM_ID;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The region code of the currently selected language/region
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  siteRegionCode: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private translationService: LanguageService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    @Inject(LOCATION_TOKEN) private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.siteRegionCode = this.translationService.currentRegionCode();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  changeLocale(lang: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    localStorage.setItem(LANGUAGE_LOCAL_STORAGE_KEY, lang);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.location.reload();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [matMenuTriggerFor]="menu"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  matTooltip="Change language"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <fa-icon icon="globe" class="toolbar-icon"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<mat-menu #menu>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    *appConfigurableEnum="let lang of localeEnumId"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (click)="changeLocale(lang.id)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <span>{{ lang.label }}</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-menu>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + ./language-select.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              .toolbar-icon {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  color: white;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ListFilterComponent.html b/documentation/components/ListFilterComponent.html new file mode 100644 index 0000000000..4dde91d078 --- /dev/null +++ b/documentation/components/ListFilterComponent.html @@ -0,0 +1,566 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/filter/list-filter/list-filter.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + filterConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : SelectableFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + deselectAll + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +deselectAll() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + selectAll + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +selectAll() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { BorderHighlightDirective } from "../../common-components/border-highlight/border-highlight.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { JsonPipe, NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { SelectableFilter } from "../filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-list-filter",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./list-filter.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./list-filter.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    BorderHighlightDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    JsonPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ListFilterComponent<E extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input({ transform: (value: any) => value as SelectableFilter<E> })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filterConfig: SelectableFilter<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selectAll() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filterConfig.selectedOptionValues = this.filterConfig.options.map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (option) => option.key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filterConfig.selectedOptionChange.emit(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.filterConfig.selectedOptionValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  deselectAll() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filterConfig.selectedOptionValues = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filterConfig.selectedOptionChange.emit(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.filterConfig.selectedOptionValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <mat-form-field appearance="fill" class="full-width">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-label>{{ filterConfig.label || filterConfig.name }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-select
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [id]="filterConfig.name"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [(value)]="filterConfig.selectedOptionValues"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (valueChange)="filterConfig.selectedOptionChange.emit($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    multiple
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <!-- SELECT ALL / CLEAR -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <div class="flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <button mat-flat-button i18n class="util-button" (click)="selectAll()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        Select All
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <button mat-flat-button i18n class="util-button" (click)="deselectAll()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        Clear
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @for (option of filterConfig.options; track option.key) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [value]="option.key"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [appBorderHighlight]="option.color"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        style="padding-top: 0.5em; padding-bottom: 0.5em"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        {{ option.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </mat-select>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./list-filter.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                .util-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  flex-basis: 50%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  border-radius: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  font-size: 0.8rem;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ListPaginatorComponent.html b/documentation/components/ListPaginatorComponent.html new file mode 100644 index 0000000000..65f4054ff0 --- /dev/null +++ b/documentation/components/ListPaginatorComponent.html @@ -0,0 +1,759 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/common-components/entities-table/list-paginator/list-paginator.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + OnChanges + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + dataSource +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : MatTableDataSource<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + idForSavingPagination +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + onPaginateChange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +onPaginateChange(event: PageEvent) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  event + PageEvent + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Readonly + LOCAL_STORAGE_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "PAGINATION-" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + pageSize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : 10 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Readonly + pageSizeOptions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [10, 20, 50, 100] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + paginator + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : MatPaginator + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + @ViewChild(MatPaginator, {static: true})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  MatPaginator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  MatPaginatorModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  PageEvent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/material/paginator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTableDataSource } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-list-paginator",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./list-paginator.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./list-paginator.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [MatPaginatorModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class ListPaginatorComponent<E> implements OnChanges, OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  readonly LOCAL_STORAGE_KEY = "PAGINATION-";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  readonly pageSizeOptions = [10, 20, 50, 100];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() dataSource: MatTableDataSource<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() idForSavingPagination: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  pageSize = 10;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (changes.hasOwnProperty("idForSavingPagination")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.applyUserPaginationSettings();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.dataSource.paginator = this.paginator;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  onPaginateChange(event: PageEvent) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.pageSize = event.pageSize;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.savePageSize(this.pageSize);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private applyUserPaginationSettings() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const savedSize = this.getSavedPageSize();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.pageSize = savedSize && savedSize !== -1 ? savedSize : this.pageSize;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private getSavedPageSize(): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return Number.parseInt(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      localStorage.getItem(this.LOCAL_STORAGE_KEY + this.idForSavingPagination),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private savePageSize(size: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.LOCAL_STORAGE_KEY + this.idForSavingPagination,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      size?.toString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <mat-paginator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  (page)="onPaginateChange($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [pageSize]="pageSize"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [pageSizeOptions]="pageSizeOptions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [showFirstLastButtons]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +></mat-paginator>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./list-paginator.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/* The paginator is usually a little smaller than this */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +$approx-width-paginator: 450px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +$slider-padding-all: 16px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  flex-direction: row;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  align-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @media all and (max-width: $approx-width-paginator) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    flex-direction: column-reverse;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    align-items: flex-start;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  justify-content: flex-start;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  background-color: white;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +.slider {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  padding-left: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @media all and (max-width: $approx-width-paginator) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    padding-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  font-size: small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/LocationInputComponent.html b/documentation/components/LocationInputComponent.html new file mode 100644 index 0000000000..a498532655 --- /dev/null +++ b/documentation/components/LocationInputComponent.html @@ -0,0 +1,2070 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/features/location/location-input/location-input.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + CustomFormControlDirective +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    HostBindings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(elementRef: ElementRef, errorStateMatcher: ErrorStateMatcher, ngControl: NgControl, parentForm: NgForm, parentFormGroup: FormGroupDirective, dialog: MatDialog) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    elementRef + ElementRef<HTMLElement> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    errorStateMatcher + ErrorStateMatcher + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ngControl + NgControl + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parentForm + NgForm + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parentFormGroup + FormGroupDirective + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + autoLookup +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Automatically run an address lookup when the user leaves the input field.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + aria-describedby +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + disabled +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + placeholder +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + required +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    HostBindings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + id + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + onContainerClick + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + onContainerClick() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + openMap + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +openMap() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + blur + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +blur() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + focus + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +focus() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + registerOnChange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +registerOnChange(fn: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    fn + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + registerOnTouched + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +registerOnTouched(fn: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    fn + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + setDescribedByIds + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +setDescribedByIds(ids: string[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ids + string[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + setDisabledState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +setDisabledState(isDisabled: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    isDisabled + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + writeValue + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +writeValue(val: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    val + T + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + _disabled + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + _value + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + controlType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "custom-control" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + elementRef + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ElementRef<HTMLElement> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + errorState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + errorStateMatcher + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ErrorStateMatcher + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + focused + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + id + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + @HostBinding()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + nextId + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + ngControl + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : NgControl + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + onChange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + onTouched + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + parentForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : NgForm + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + parentFormGroup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormGroupDirective + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + stateChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : new Subject<void>() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + touched + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, ElementRef, Input, Optional, Self } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  FormGroupDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  NgControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  NgForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatFormFieldControl, MatSuffix } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatInput } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { CustomFormControlDirective } from "../../../core/common-components/basic-autocomplete/custom-form-control.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  MapPopupComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  MapPopupConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "../map-popup/map-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ErrorStateMatcher } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { filter, map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-location-input",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatInput,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatIconButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatSuffix,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatTooltip,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  providers: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    { provide: MatFormFieldControl, useExisting: LocationInputComponent },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./location-input.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./location-input.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class LocationInputComponent extends CustomFormControlDirective<GeoLocation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Automatically run an address lookup when the user leaves the input field.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() autoLookup = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    elementRef: ElementRef<HTMLElement>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    errorStateMatcher: ErrorStateMatcher,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Optional() @Self() ngControl: NgControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Optional() parentForm: NgForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Optional() parentFormGroup: FormGroupDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      elementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      errorStateMatcher,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ngControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      parentForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      parentFormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  override onContainerClick() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this._disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.openMap();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  openMap() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const config: MapPopupConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      selectedLocation: this.value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      disabled: this._disabled,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const ref = this.dialog.open(MapPopupComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      width: "90%",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      autoFocus: ".address-search-input",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      restoreFocus: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      data: config,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this._disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ref
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          filter((result: GeoLocation[] | undefined) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            return Array.isArray(result);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          map((result: GeoLocation[]) => result[0]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            (result: GeoLocation | undefined) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              JSON.stringify(result) !== JSON.stringify(this.value),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          ), // nothing changed, skip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .subscribe((result: GeoLocation) => (this.value = result));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <textarea
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    #inputElement
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    matInput
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [title]="placeholder"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [disabled]="_disabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    readonly
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [value]="_value?.locationString ?? _value?.geoLookup?.display_name"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    rows="2"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ></textarea>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @if (_value?.geoLookup) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (click)="openMap(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      type="button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      class="input-suffix-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      matTooltip="Show the location marked on the map."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <fa-icon icon="map-location-dot"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      matTooltip="No location marked yet. Edit and search a location on the map here."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        (click)="openMap(); $event.stopPropagation()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        type="button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        class="input-suffix-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        [disabled]="_disabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <fa-icon icon="magnifying-glass-location"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./location-input.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  pointer-events: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.input-suffix-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  margin-top: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/LoginComponent.html b/documentation/components/LoginComponent.html new file mode 100644 index 0000000000..18a928eee2 --- /dev/null +++ b/documentation/components/LoginComponent.html @@ -0,0 +1,929 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/session/login/login.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Allows the user to login online or offline depending on the connection status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(router: Router, route: ActivatedRoute, sessionManager: SessionManagerService, loginState: LoginStateSubject, siteSettingsService: SiteSettingsService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      route + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      sessionManager + SessionManagerService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      loginState + LoginStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      siteSettingsService + SiteSettingsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + tryLogin + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +tryLogin() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + enableOfflineLogin + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + loginInProgress + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + loginState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : LoginStateSubject + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + offlineUsers + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : SessionInfo[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + sessionManager + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : SessionManagerService + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + siteSettingsService + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : SiteSettingsService + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ActivatedRoute, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { LoginState } from "../session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { LoginStateSubject } from "../session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SessionManagerService } from "../session-service/session-manager.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SessionInfo } from "../auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SiteSettingsService } from "../../site-settings/site-settings.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatListModule } from "@angular/material/list";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { waitForChangeTo } from "../session-states/session-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { race, timer } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Allows the user to login online or offline depending on the connection status
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-login",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./login.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./login.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatCardModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatListModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class LoginComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  offlineUsers: SessionInfo[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  enableOfflineLogin: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  loginInProgress = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private route: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    public sessionManager: SessionManagerService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    public loginState: LoginStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    public siteSettingsService: SiteSettingsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.enableOfflineLogin = !this.sessionManager.remoteLoginAvailable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    sessionManager
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .remoteLogin()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .then(() => sessionManager.clearRemoteSessionIfNecessary());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.loginState.pipe(untilDestroyed(this)).subscribe((state) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.loginInProgress = state === LoginState.IN_PROGRESS;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (state === LoginState.LOGGED_IN) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.routeAfterLogin();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.offlineUsers = this.sessionManager.getOfflineUsers();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    race(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.loginState.pipe(waitForChangeTo(LoginState.LOGIN_FAILED)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      timer(10000),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ).subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.enableOfflineLogin = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private routeAfterLogin() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const redirectUri = this.route.snapshot.queryParams["redirect_uri"] || "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.router.navigateByUrl(decodeURIComponent(redirectUri));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  tryLogin() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.sessionManager.remoteLogin();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <!--
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     This file is part of ndb-core.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     ndb-core is free software: you can redistribute it and/or modify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     it under the terms of the GNU General Public License as published by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     the Free Software Foundation, either version 3 of the License, or
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     (at your option) any later version.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     ndb-core is distributed in the hope that it will be useful,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     GNU General Public License for more details.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     You should have received a copy of the GNU General Public License
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     along with ndb-core.  If not, see <http://www.gnu.org/licenses/>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +<mat-card appearance="raised" class="full-width border-box-sizing">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <mat-card-header class="header">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <mat-card-title style="text-align: center" i18n="Sign in title">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Welcome
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </mat-card-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <mat-card-subtitle i18n="Sign in subtitle">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      to your system
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <em>{{ siteSettingsService.siteName | async }}</em>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </mat-card-subtitle>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </mat-card-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <div class="gap-regular flex-column">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <!-- ONLINE -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        matTooltip="It is necessary to log in to the server so that your data can be synchronized with other team members. We are checking whether you are still logged in or otherwise forward you to provide your credentials. You can still use the application offline, if you currently have no internet connection."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        i18n-matTooltip="online login tooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <div *ngIf="loginInProgress">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          <em i18n="login progess bar title">Checking online login ...</em>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          <mat-progress-bar
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            mode="indeterminate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            class="login-check-progressbar"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          ></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <div *ngIf="!loginInProgress">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            i18n="online login failed text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            class="online-error margin-bottom-small"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            We couldn't connect to the server currently. You can still use the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            application offline, if you have logged in on this device
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            previously.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            type="button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            (click)="tryLogin()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            i18n="Login button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            style="width: 100%"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            Retry online login
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <!-- OFFLINE -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <mat-card
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        *ngIf="offlineUsers.length > 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        class="margin-top-large"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        appearance="outlined"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <mat-card-header
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          matTooltip="You can use the application completely offline. However, your changes cannot be synchronized with other team members in this mode. When available, you should always use the online login."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          i18n-matTooltip="offline login tooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          <h3 mat-card-title class="offline-title" i18n="offline section title">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            Offline Login
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          </h3>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          <mat-card-subtitle i18n="Select user for offline login title"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            >Log in as user ...</mat-card-subtitle
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        </mat-card-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          <mat-action-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              mat-list-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              *ngFor="let user of offlineUsers"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              (click)="sessionManager.offlineLogin(user)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              [disabled]="!enableOfflineLogin"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              <fa-icon matListItemIcon icon="user"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              {{ user.email ?? user.name }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          </mat-action-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        </mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      </mat-card>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +</mat-card>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + ./login.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +.login-error {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  color: colors.$error;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  font-size: 90%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  text-align: justify;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  display: block;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  max-width: 400px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  margin: 0 auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +.header {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  justify-content: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  padding-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +.offline-title {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  font-size: 1.1em;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +.login-check-progressbar {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  margin-top: 8px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/MapComponent.html b/documentation/components/MapComponent.html new file mode 100644 index 0000000000..da649e1d67 --- /dev/null +++ b/documentation/components/MapComponent.html @@ -0,0 +1,1358 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/features/location/map/map.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + AfterViewInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(configService: ConfigService, dialog: MatDialog) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + displayedProperties +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : LocationProperties + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + expandable +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + height +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "200px" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + highlightedEntities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + marked +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Coordinates[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + displayedPropertiesChange +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entityClick +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + mapClick +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Observable<Coordinates> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + openMapInPopup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + openMapInPopup() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + openMapPropertiesPopup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +openMapPropertiesPopup() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + showPropertySelection + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + marked +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + setmarked(coordinates: Coordinates[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        coordinates + Coordinates[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + setentities(entities: Entity[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entities + Entity[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + highlightedEntities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + sethighlightedEntities(entities: Entity[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entities + Entity[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + displayedProperties +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + setdisplayedProperties(displayedProperties: LocationProperties) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        displayedProperties + LocationProperties + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  AfterViewInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import * as L from "leaflet";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { BehaviorSubject, Observable, timeInterval } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { debounceTime, filter, map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Coordinates } from "../coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { getHueForEntity, getLocationProperties } from "../map-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ConfigService } from "../../../core/config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MAP_CONFIG_KEY, MapConfig } from "../map-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MapPopupConfig } from "../map-popup/map-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  LocationProperties,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MapPropertiesPopupComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "./map-properties-popup/map-properties-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { GeoResult } from "../geo.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-map",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./map.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./map.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [FontAwesomeModule, NgIf, MatButtonModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class MapComponent implements AfterViewInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private readonly start_location: L.LatLngTuple = [52.4790412, 13.4319106];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @ViewChild("map") private mapElement: ElementRef<HTMLDivElement>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() height = "200px";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() expandable = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() set marked(coordinates: Coordinates[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!coordinates) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.clearMarkers(this.markers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.markers = this.createMarkers(coordinates);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.showMarkersOnMap(this.markers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this._marked.next(coordinates);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private _marked = new BehaviorSubject<Coordinates[]>([]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() set entities(entities: Entity[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.clearMarkers(this.markers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.markers = this.createEntityMarkers(entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.showMarkersOnMap(this.markers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this._entities.next(entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private _entities = new BehaviorSubject<Entity[]>([]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() set highlightedEntities(entities: Entity[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.clearMarkers(this.highlightedMarkers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.highlightedMarkers = this.createEntityMarkers(entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.showMarkersOnMap(this.highlightedMarkers, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this._highlightedEntities.next(entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private _highlightedEntities = new BehaviorSubject<Entity[]>([]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() set displayedProperties(displayedProperties: LocationProperties) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (displayedProperties) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this._displayedProperties = displayedProperties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.showPropertySelection = Object.keys(displayedProperties).length > 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private _displayedProperties: LocationProperties = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Output() displayedPropertiesChange = new EventEmitter<LocationProperties>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  showPropertySelection = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private map: L.Map;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private markers: L.Marker[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private highlightedMarkers: L.Marker[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private clickStream = new EventEmitter<Coordinates>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Output() mapClick: Observable<Coordinates> = this.clickStream.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    timeInterval(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    debounceTime(400),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    filter(({ interval }) => interval >= 400),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    map(({ value }) => value),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Output() entityClick = new EventEmitter<Entity>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const config = configService.getConfig<MapConfig>(MAP_CONFIG_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (config?.start) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.start_location = config.start;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ngAfterViewInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // init Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.map = L.map(this.mapElement.nativeElement, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      center:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.markers?.length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          ? this.markers[0].getLatLng()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          : this.start_location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      zoom: 14,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.map.addEventListener("click", (res) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.clickStream.emit({ lat: res.latlng.lat, lon: res.latlng.lng }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const tiles = L.tileLayer(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        maxZoom: 18,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        minZoom: 3,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        attribution:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    tiles.addTo(this.map);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // this is necessary to remove gray spots when directly opening app on a page with the map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    setTimeout(() => this.map.invalidateSize());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.showMarkersOnMap(this.markers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.showMarkersOnMap(this.highlightedMarkers, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private showMarkersOnMap(marker: L.Marker[], highlighted = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!marker || !this.map || marker.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    marker.forEach((m) => this.addMarker(m, highlighted));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const group = L.featureGroup(marker);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.map.fitBounds(group.getBounds(), {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      padding: [50, 50],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      maxZoom: this.map.getZoom(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private createEntityMarkers(entities: Entity[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const markers: L.Marker[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((entity) => !!entity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .forEach((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.getMapProperties(entity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          .map((prop) => entity[prop]?.geoLookup)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          .filter((loc: GeoResult) => !!loc)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          .forEach((loc: GeoResult) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            const marker = L.marker([loc.lat, loc.lon]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            marker.bindTooltip(entity.toString());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            marker.on("click", () => this.entityClick.emit(entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            marker["entity"] = entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            markers.push(marker);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return markers;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getMapProperties(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (this._displayedProperties[entity.getType()]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this._displayedProperties[entity.getType()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const locationProperties = getLocationProperties(entity.getConstructor());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this._displayedProperties[entity.getType()] = locationProperties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.displayedPropertiesChange.emit(this._displayedProperties);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.showPropertySelection = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return locationProperties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private clearMarkers(markers: L.Marker[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (markers?.length > 0 && this.map) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      markers.forEach((marker) => marker.removeFrom(this.map));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private createMarkers(coordinates: Coordinates[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return coordinates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((coord) => !!coord)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .map((coord) => L.marker([coord.lat, coord.lon]));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private addMarker(m: L.Marker, highlighted: boolean = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    m.addTo(this.map);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const entity = m["entity"] as Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (highlighted || entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const degree = entity ? getHueForEntity(entity) : "145";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const icon = m["_icon"] as HTMLElement;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      icon.style.filter = `hue-rotate(${degree}deg)`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      icon.style.opacity = highlighted ? "1" : "0.5";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return m;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async openMapInPopup() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // Breaking circular dependency by using async import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const mapComponent = await import("../map-popup/map-popup.component");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const data: MapPopupConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      marked: this._marked.value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      entities: this._entities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      highlightedEntities: this._highlightedEntities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      entityClick: this.entityClick,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      displayedProperties: this._displayedProperties,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .open(mapComponent.MapPopupComponent, { width: "90%", data })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        // displayed properties might have changed in map view
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.updatedDisplayedProperties(data.displayedProperties),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private updatedDisplayedProperties(properties: LocationProperties) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this._displayedProperties = properties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.displayedPropertiesChange.emit(this._displayedProperties);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.entities = this._entities.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.highlightedEntities = this._highlightedEntities.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  openMapPropertiesPopup() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .open(MapPropertiesPopupComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        data: this._displayedProperties,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe((res: LocationProperties) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (res) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.updatedDisplayedProperties(res);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="map-frame" [style.height]="height">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div id="map" #map>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <div class="action-elements">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <button *ngIf="expandable" mat-mini-fab (click)="openMapInPopup()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <fa-icon icon="expand" style="color: black"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        *ngIf="showPropertySelection"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        mat-mini-fab
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (click)="openMapPropertiesPopup()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <fa-icon icon="location-dot" style="color: black"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./map.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        .map-frame {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  border: 1px solid lightgrey;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  border-radius: 2px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +#map {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  height: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.action-elements {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  bottom: 3px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  left: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  z-index: 1000;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  background-color: white !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  margin-left: 3px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/MapPopupComponent.html b/documentation/components/MapPopupComponent.html new file mode 100644 index 0000000000..b37194f95c --- /dev/null +++ b/documentation/components/MapPopupComponent.html @@ -0,0 +1,908 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/location/map-popup/map-popup.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A dialog to display an OpenStreetMap map with markers and optionally allow the user to select a location.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(data: MapPopupConfig, dialogRef: MatDialogRef<MapPopupComponent>, geoService: GeoService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          data + MapPopupConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          dialogRef + MatDialogRef<MapPopupComponent> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          geoService + GeoService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + mapClicked + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + mapClicked(newCoordinates: Coordinates) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          newCoordinates + Coordinates + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + updateLocation + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +updateLocation(event: GeoLocation) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          event + GeoLocation + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : MapPopupConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + helpText + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : $localize`Search an address or click on the map directly to select a different location` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + markedLocations + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : BehaviorSubject<GeoResult[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + selectedLocation + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : GeoLocation + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Coordinates } from "../coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { BehaviorSubject, firstValueFrom, Observable, of, Subject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MapComponent } from "../map/map.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AsyncPipe } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { LocationProperties } from "../map/map-properties-popup/map-properties-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AddressSearchComponent } from "../address-search/address-search.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { GeoResult, GeoService } from "../geo.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { catchError, map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AddressEditComponent } from "../address-edit/address-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface MapPopupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  marked?: Coordinates[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entities?: Observable<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  highlightedEntities?: Observable<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entityClick?: Subject<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  disabled?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  displayedProperties?: LocationProperties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Display a custom help text in the dialog to explain possible actions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * (Otherwise the default help is shown)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  helpText?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A single location that is selected and editable.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selectedLocation?: GeoLocation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A dialog to display an OpenStreetMap map with markers and optionally allow the user to select a location.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-map-popup",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./map-popup.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./map-popup.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MapComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    AddressSearchComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    AddressEditComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class MapPopupComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  markedLocations: BehaviorSubject<GeoResult[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  helpText: string = $localize`Search an address or click on the map directly to select a different location`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selectedLocation: GeoLocation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    @Inject(MAT_DIALOG_DATA) public data: MapPopupConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private dialogRef: MatDialogRef<MapPopupComponent>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private geoService: GeoService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.markedLocations = new BehaviorSubject<GeoResult[]>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (data.marked as GeoResult[]) ?? [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.selectedLocation = data.selectedLocation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.selectedLocation &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      !this.markedLocations.value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .filter((x) => !!x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .includes(this.selectedLocation.geoLookup)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.markedLocations.next([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ...this.markedLocations.value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.selectedLocation.geoLookup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!data.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.dialogRef.disableClose = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (data.hasOwnProperty("helpText")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.helpText = data.helpText;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async mapClicked(newCoordinates: Coordinates) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.data.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const geoResult: GeoResult = await firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.lookupCoordinates(newCoordinates),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.updateLocation({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      geoLookup: geoResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      locationString: geoResult?.display_name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private lookupCoordinates(coords: Coordinates) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!coords) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const fallback: GeoResult = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      display_name: $localize`[selected on map: ${coords.lat} - ${coords.lon}]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ...coords,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.geoService.reverseLookup(coords).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      map((res) => (res["error"] ? fallback : res)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      catchError(() => of(fallback)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  updateLocation(event: GeoLocation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.selectedLocation = event;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.markedLocations.next(event?.geoLookup ? [event?.geoLookup] : []);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <mat-dialog-content style="max-height: 90vh">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <app-address-edit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [disabled]="data.disabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [selectedLocation]="selectedLocation"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (selectedLocationChange)="updateLocation($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ></app-address-edit>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <app-map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    height="65vh"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [marked]="markedLocations | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [(displayedProperties)]="data.displayedProperties"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [entities]="data.entities | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [highlightedEntities]="data.highlightedEntities | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (mapClick)="mapClicked($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (entityClick)="data.entityClick?.next($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ></app-map>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @if (data.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button mat-raised-button mat-dialog-close i18n>Close</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    @if (helpText) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <p class="help-text">{{ helpText }}</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button mat-stroked-button mat-dialog-close i18n>Cancel</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button mat-raised-button [mat-dialog-close]="[selectedLocation]" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Save
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ./map-popup.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          mat-dialog-actions {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  justify-content: end;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +.help-text {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  margin: auto 20px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +app-address-edit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  max-width: 640px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  display: block;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/MapPropertiesPopupComponent.html b/documentation/components/MapPropertiesPopupComponent.html new file mode 100644 index 0000000000..b6bef09dc8 --- /dev/null +++ b/documentation/components/MapPropertiesPopupComponent.html @@ -0,0 +1,609 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/location/map/map-properties-popup/map-properties-popup.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(mapProperties: LocationProperties, entities: EntityRegistry, dialogRef: MatDialogRef<MapPropertiesPopupComponent>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            mapProperties + LocationProperties + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dialogRef + MatDialogRef<MapPropertiesPopupComponent> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + closeDialog + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +closeDialog() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + entityProperties + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DialogCloseComponent } from "../../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityConstructor } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { getLocationProperties } from "../../map-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * A map of entity types and the (selected) location properties of this type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export type LocationProperties = { [key: string]: string[] };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-map-properties-popup",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./map-properties-popup.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styles: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class MapPropertiesPopupComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityProperties: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entity: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    properties: { name: string; label: string }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    selected: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    @Inject(MAT_DIALOG_DATA) mapProperties: LocationProperties,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private dialogRef: MatDialogRef<MapPropertiesPopupComponent>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityProperties = Object.entries(mapProperties).map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ([entityType, selected]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const entity = entities.get(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const mapProperties = getLocationProperties(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const properties = mapProperties.map((name) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          label: entity.schema.get(name).label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return { entity, properties, selected };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  closeDialog() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const result: LocationProperties = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityProperties.forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ({ entity, selected }) => (result[entity.ENTITY_TYPE] = selected),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.dialogRef.close(result);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <h1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  matDialogTitle
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  i18n="Title of popup to select locations that are displayed in the map"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Select displayed locations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<app-dialog-close matDialogClose></app-dialog-close>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-form-field *ngFor="let row of entityProperties" style="width: 100%">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <mat-label>{{ row.entity.label }}</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <mat-select
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [(value)]="row.selected"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [disabled]="row.properties.length < 2"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      multiple
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <mat-option *ngFor="let prop of row.properties" [value]="prop.name">{{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        prop.label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }}</mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </mat-select>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    (click)="closeDialog()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    i18n="Button for closing popup and applying changes"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Apply
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/MarkdownPageComponent.html b/documentation/components/MarkdownPageComponent.html new file mode 100644 index 0000000000..aaf0a176c2 --- /dev/null +++ b/documentation/components/MarkdownPageComponent.html @@ -0,0 +1,400 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/markdown-page/markdown-page/markdown-page.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Display markdown formatted page that is dynamically loaded based on the file defined in config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + markdownFile +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              filepath to be loaded as markdown

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MarkdownPageModule } from "../markdown-page.module";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Display markdown formatted page that is dynamically loaded based on the file defined in config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@RouteTarget("MarkdownPage")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-markdown-page",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./markdown-page.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [MarkdownPageModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class MarkdownPageComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** filepath to be loaded as markdown */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() markdownFile: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <div markdown [src]="markdownFile"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/MatchingEntitiesComponent.html b/documentation/components/MatchingEntitiesComponent.html new file mode 100644 index 0000000000..4a31842466 --- /dev/null +++ b/documentation/components/MatchingEntitiesComponent.html @@ -0,0 +1,1747 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/matching-entities/matching-entities/matching-entities.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(route: ActivatedRoute, formDialog: FormDialogService, entityMapper: EntityMapperService, configService: ConfigService, entityRegistry: EntityRegistry, filterService: FilterService, changeDetector: ChangeDetectorRef) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                route + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                changeDetector + ChangeDetectorRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Column mapping of property pairs of left and right entity that should be compared side by side.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + leftSide +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : MatchingSideConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : {} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + matchActionLabel +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : $localize`:Matching button label:create matching` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + onMatch +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : NewMatchAction + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + rightSide +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : MatchingSideConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : {} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + applySelectedFilters + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +applySelectedFilters(side: MatchingSide, filter: DataFilter<Entity>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                side + MatchingSide + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                filter + DataFilter<Entity> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + createMatch + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + createMatch() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + entityInMapClicked + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +entityInMapClicked(entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + updateMarkersAndDistances + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +updateMarkersAndDistances() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + DEFAULT_CONFIG_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "appConfig:matching-entities" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + displayedLocationProperties + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : LocationProperties + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : {} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + filteredMapEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + lockedMatching + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + mapVisible + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + matchComparisonElement + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : ElementRef + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + @ViewChild('matchComparison', {static: true})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + sideDetails + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : [MatchingSide, MatchingSide] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatchingEntitiesConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatchingSideConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  NewMatchAction,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "./matching-entities-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponentConfig } from "../../../core/config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ActivatedRoute } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { addAlphaToHexColor } from "../../../utils/style-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ConfigService } from "../../../core/config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityFieldViewComponent } from "../../../core/common-components/entity-field-view/entity-field-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MapComponent } from "../../location/map/map.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterComponent } from "../../../core/filter/filter/filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Coordinates } from "../../location/coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterService } from "../../../core/filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { LocationProperties } from "../../location/map/map-properties-popup/map-properties-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { getLocationProperties } from "../../location/map-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FlattenArrayPipe } from "../../../utils/flatten-array/flatten-array.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DataFilter } from "../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { GeoLocation } from "../../location/location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface MatchingSide extends MatchingSideConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** pass along filters from app-filter to subrecord component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filterObj?: DataFilter<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  availableEntities?: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selectMatch?: (e) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** whether this allows to select more than one selected match */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  multiSelect: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selected?: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** item of `selected` that is currently highlighted */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  highlightedSelected: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  distanceColumn: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    coordinatesProperties: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    compareCoordinates: BehaviorSubject<Coordinates[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@RouteTarget("MatchingEntities")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("MatchingEntities")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-matching-entities",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./matching-entities.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./matching-entities.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntityFieldViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MapComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FilterComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FlattenArrayPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class MatchingEntitiesComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static DEFAULT_CONFIG_KEY = "appConfig:matching-entities";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() leftSide: MatchingSideConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() rightSide: MatchingSideConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Column mapping of property pairs of left and right entity that should be compared side by side.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() columns: [ColumnConfig, ColumnConfig][] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  matchActionLabel: string = $localize`:Matching button label:create matching`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() onMatch: NewMatchAction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild("matchComparison", { static: true })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  matchComparisonElement: ElementRef;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  columnsToDisplay = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  lockedMatching = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  sideDetails: [MatchingSide, MatchingSide];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  mapVisible = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filteredMapEntities: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  displayedLocationProperties: LocationProperties = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private route: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private changeDetector: ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const config: MatchingEntitiesConfig =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.configService.getConfig<MatchingEntitiesConfig>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        MatchingEntitiesComponent.DEFAULT_CONFIG_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ) ?? {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    Object.assign(this, JSON.parse(JSON.stringify(config)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.route.data.subscribe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (data: DynamicComponentConfig<MatchingEntitiesConfig>) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          !data?.config?.leftSide &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          !data?.config?.rightSide &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          !data?.config?.columns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        Object.assign(this, JSON.parse(JSON.stringify(data.config)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // TODO: fill selection on hover already?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.sideDetails = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      await this.initSideDetails(this.leftSide, 0),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      await this.initSideDetails(this.rightSide, 1),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.sideDetails.forEach((side, index) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.initDistanceColumn(side, index),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filterMapEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.columnsToDisplay = ["side-0", "side-1"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // needed due to async
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.changeDetector.detectChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Generate setup for a side of the matching view template based on the component input properties.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param side
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param sideIndex
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private async initSideDetails(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    side: MatchingSideConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    sideIndex: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<MatchingSide> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newSide = Object.assign({}, side) as MatchingSide; // we are transforming it into this type here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!newSide.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.selected = newSide.selected ?? [this.entity];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.highlightedSelected = newSide.selected[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.entityType = newSide.highlightedSelected?.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let entityType = newSide.entityType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (typeof entityType === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entityType = this.entityRegistry.get(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newSide.entityType =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entityType ?? newSide.highlightedSelected?.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newSide.columns =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.columns ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.columns.map((p) => p[sideIndex]).filter((c) => !!c);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newSide.multiSelect = this.checkIfMultiSelect(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.onMatch.newEntityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      sideIndex === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ? this.onMatch.newEntityMatchPropertyLeft
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        : this.onMatch.newEntityMatchPropertyRight,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (newSide.multiSelect) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.selectMatch = this.getMultiSelectFunction(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.selectMatch = this.getSingleSelectFunction(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!newSide.selected && newSide.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.availableEntities = await this.entityMapper.loadType(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        newSide.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.availableFilters = newSide.availableFilters ?? [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.filterObj = { ...(side.prefilter ?? {}) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.mapVisible =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.mapVisible || getLocationProperties(newSide.entityType).length > 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return newSide;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private checkIfMultiSelect(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    onMatchEntityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    onMatchProperty: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const schemaField = this.entityRegistry
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .get(onMatchEntityType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .schema.get(onMatchProperty);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return schemaField.isArray;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private getMultiSelectFunction(newSide: MatchingSide) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (e: Entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!newSide.selected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        newSide.selected = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (newSide.selected.includes(e)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        // unselect
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.highlightSelectedRow(e, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        newSide.selected = newSide.selected.filter((s) => s !== e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (newSide.highlightedSelected === e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          newSide.highlightedSelected = newSide.selected[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.highlightSelectedRow(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        newSide.selected = [...newSide.selected, e];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        newSide.highlightedSelected = e;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.matchComparisonElement.nativeElement.scrollIntoView();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.updateDistanceColumn(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private getSingleSelectFunction(newSide: MatchingSide) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (e: Entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.highlightSelectedRow(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (newSide.highlightedSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.highlightSelectedRow(newSide.highlightedSelected, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.selected = [e];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSide.highlightedSelected = e;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.matchComparisonElement.nativeElement.scrollIntoView();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.updateDistanceColumn(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private highlightSelectedRow(newSelectedEntity: Entity, unHighlight = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (unHighlight) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSelectedEntity.getColor =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        newSelectedEntity.getConstructor().prototype.getColor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newSelectedEntity.getColor = () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        addAlphaToHexColor(newSelectedEntity.getConstructor().color, 0.2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async createMatch() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newMatchEntity = new (this.entityRegistry.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.onMatch.newEntityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ))();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const leftMatch = this.sideDetails[0].selected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const rightMatch = this.sideDetails[1].selected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newMatchEntity[this.onMatch.newEntityMatchPropertyLeft] = this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .sideDetails[0].multiSelect
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ? leftMatch.map((e) => e.getId())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      : leftMatch[0].getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newMatchEntity[this.onMatch.newEntityMatchPropertyRight] = this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .sideDetails[1].multiSelect
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ? rightMatch.map((e) => e.getId())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      : rightMatch[0].getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // best guess properties (if they do not exist on the specific entity, the values will be discarded during save
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newMatchEntity["date"] = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newMatchEntity["start"] = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    newMatchEntity["name"] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newMatchEntity.getConstructor().label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      leftMatch.map((e) => e.toString()).join(", ") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      " - " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      rightMatch.map((e) => e.toString()).join(", ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.onMatch.columnsToReview) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.formDialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .openFormPopup(newMatchEntity, this.onMatch.columnsToReview)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .subscribe((result) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          if (result instanceof newMatchEntity.getConstructor()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            this.lockedMatching = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      await this.entityMapper.save(newMatchEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.lockedMatching = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  applySelectedFilters(side: MatchingSide, filter: DataFilter<Entity>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    side.filterObj = { ...side.prefilter, ...filter };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filterMapEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private filterMapEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filteredMapEntities = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.sideDetails.forEach((side) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (side.filterObj) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const predicate = this.filterService.getFilterPredicate(side.filterObj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const filtered = side.availableEntities.filter(predicate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.filteredMapEntities.push(...filtered);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.filteredMapEntities.push(...(side.availableEntities ?? []));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityInMapClicked(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const side = this.sideDetails.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (s) => s.entityType === entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (side) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      side.selectMatch(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Initialize distance column for columns of side and columns of EntitySubrecord
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param side
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param index of the side
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private initDistanceColumn(side: MatchingSide, index: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const sideIndex = side.columns.findIndex((col) => col === "distance");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (sideIndex !== -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const columnConfig = this.getDistanceColumnConfig(side);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      side.columns[sideIndex] = columnConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      side.distanceColumn = columnConfig.additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const colIndex = this.columns.findIndex(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (row) => row[index] === "distance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (colIndex !== -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.columns[colIndex][index] = columnConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private getDistanceColumnConfig(side: MatchingSide): FormFieldConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      id: "distance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      label: $localize`:Matching View column name:Distance`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      viewComponent: "DisplayDistance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      additional: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        coordinatesProperties:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.displayedLocationProperties[side.entityType.ENTITY_TYPE],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        compareCoordinates: new BehaviorSubject<Coordinates[]>([]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  updateMarkersAndDistances() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.sideDetails.forEach((side) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const sideProperties =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.displayedLocationProperties[side.entityType.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (side.distanceColumn) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        side.distanceColumn.coordinatesProperties = sideProperties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const lastValue = side.distanceColumn.compareCoordinates.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        side.distanceColumn.compareCoordinates.next(lastValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (side.highlightedSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.updateDistanceColumn(side);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private updateDistanceColumn(side: MatchingSide) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const locationProperties =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.displayedLocationProperties[side.highlightedSelected?.getType()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const otherIndex = this.sideDetails[0] === side ? 1 : 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const distanceColumn = this.sideDetails[otherIndex].distanceColumn;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (locationProperties && distanceColumn) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const coordinates: Coordinates[] = locationProperties.map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (prop) => (side.highlightedSelected[prop] as GeoLocation)?.geoLookup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      distanceColumn.compareCoordinates.next(coordinates);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="margin-bottom-small" #matchComparison>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [dataSource]="columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    class="match-comparison-table mat-elevation-z1"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      [matColumnDef]="'side-' + i"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      *ngFor="let side of sideDetails; let i = index"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <th
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        mat-header-cell
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        *matHeaderCellDef
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        class="comparison-header"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [style.color]="side.entityType?.color ?? 'black'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <em class="comparison-header-type">{{ side.entityType?.label }}:</em>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        &nbsp;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <ng-container *ngFor="let s of side.selected; let i = index">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          <span
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            [class.highlighted-name]="s === side.highlightedSelected"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            (click)="side.highlightedSelected = s"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            >{{ s.toString() }}</span
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          ><ng-container *ngIf="i < side.selected.length - 1">, </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        &nbsp;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          icon="lock"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          *ngIf="!side.availableEntities || lockedMatching"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          matTooltip="These details of the record are displayed to make comparison easier. You cannot select a different record here."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          i18n-matTooltip="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            tooltip explaining that this entity in matching is locked
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          class="icon"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <td mat-cell *matCellDef="let property">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <app-entity-field-view
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          *ngIf="side.highlightedSelected && property[i]; else placeholder"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          [entity]="side.highlightedSelected"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          [field]="property[i]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          showLabel="above"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ></app-entity-field-view>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <ng-template #placeholder> - </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <tr mat-row *matRowDef="let row; columns: columnsToDisplay"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<div class="margin-bottom-large flex-column gap-small">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    style="width: 100%"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="createMatch()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [disabled]="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        sideDetails?.[0].selected?.length > 0 &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        sideDetails?.[1].selected?.length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ) || lockedMatching
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    {{ matchActionLabel }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <app-map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    *ngIf="mapVisible"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    class="flex-grow"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [expandable]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [entities]="filteredMapEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [highlightedEntities]="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      [sideDetails?.[0].selected, sideDetails?.[1].selected] | flattenArray
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (entityClick)="entityInMapClicked($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [(displayedProperties)]="displayedLocationProperties"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (displayedPropertiesChange)="updateMarkersAndDistances()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ></app-map>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<div class="flex-row flex-wrap gap-large" *ngIf="!lockedMatching">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <ng-container *ngFor="let side of sideDetails">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <div class="flex-grow" *ngIf="side.availableEntities">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <h3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [style.color]="side.entityType?.color ?? 'black'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        class="selection-header"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        i18n="header of section with entities available for selection"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        Select {{ side.entityType?.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </h3>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <app-filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        class="flex-row gap-regular flex-wrap"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [filterConfig]="side.availableFilters"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [entityType]="side.entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [entities]="side.availableEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (filterObjChange)="applySelectedFilters(side, $event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ></app-filter>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [entityType]="side.entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [records]="side.availableEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [customColumns]="side.columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [editable]="false"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        clickMode="none"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (entityClick)="side.selectMatch($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [filter]="side.filterObj"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ></app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./matching-entities.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @use "mixins/grid-layout";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.overall-layout {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @include grid-layout.adaptive(380px, 100%);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.map-placeholder {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  background-color: lightgrey;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  height: 100px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  padding: 2em;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.match-comparison-table {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  table-layout: fixed;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  border-spacing: sizes.$large 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  margin: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.comparison-header {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  font-size: medium;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.comparison-header-type {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  font-weight: bold;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.selection-header {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  font-weight: 500;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  font-size: medium;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.highlighted-name {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  text-decoration: underline;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NavigationComponent.html b/documentation/components/NavigationComponent.html new file mode 100644 index 0000000000..ff9fa22700 --- /dev/null +++ b/documentation/components/NavigationComponent.html @@ -0,0 +1,683 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/ui/navigation/navigation/navigation.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Main app menu listing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(configService: ConfigService, router: Router, routePermissionService: RoutePermissionsService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  routePermissionService + RoutePermissionsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + activeLink + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The menu-item link (not the actual router link) that is currently active

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + menuItems + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  all menu items to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MenuItem, NavigationMenuConfig } from "../menu-item";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ConfigService } from "../../../config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { NavigationEnd, Router, RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { filter, startWith } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatListModule } from "@angular/material/list";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FaDynamicIconComponent } from "../../../common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { RoutePermissionsService } from "../../../config/dynamic-routing/route-permissions.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Main app menu listing.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-navigation",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./navigation.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./navigation.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatListModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    RouterLink,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    FaDynamicIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class NavigationComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** The menu-item link (not the actual router link) that is currently active */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  activeLink: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** name of config array in the config json file */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private readonly CONFIG_ID = "navigationMenu";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** all menu items to be displayed */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public menuItems: MenuItem[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private routePermissionService: RoutePermissionsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.configService.configUpdates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe(() => this.initMenuItemsFromConfig());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.router.events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        startWith(new NavigationEnd(0, this.router.url, "")),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        filter((event) => event instanceof NavigationEnd),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe((event: NavigationEnd) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.activeLink = this.computeActiveLink(event.url);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Computes the active link from a set of MenuItems.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The active link is the link with the most "overlap", i.e.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * the most specific link that can be found given the array.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param newUrl The new url for which the navigation item should be highlighted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @return the most specific link
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private computeActiveLink(newUrl: string): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // conservative filter matching all items that could fit to the given url
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const items: MenuItem[] = this.menuItems.filter((item) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      newUrl.startsWith(item.link),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    switch (items.length) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case 0:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case 1:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        const link = items[0].link;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // for root "/" only return on exact match to avoid confusing highlighting of unrelated items
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return newUrl === link || link.length > 1 ? link : "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // If there are multiple matches (A user navigates with a URL that starts with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // multiple links from a MenuItem), use the element where the length is bigger.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        //
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // For example: Let there be two possible routes: '/attendance' and '/attendance/add/day'.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // When a user navigates to the URL '/attendance', only '/attendance' is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // a prefix of the possible '/attendance'. The potential other candidate '/attendance/add/day'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // is not a prefix of '/attendance' and there is no ambiguity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        //
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // Vice Versa, when navigated to '/attendance/add/day',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // both '/attendance' and '/attendance/add/day' are a prefix of '/attendance/add/day'.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // In the latter case, the one with the longer URL should match.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return items.reduce((i1, i2) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          i1.link.length > i2.link.length ? i1 : i2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ).link;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Load menu items from config file
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private async initMenuItemsFromConfig() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const config = this.configService.getConfig<NavigationMenuConfig>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.CONFIG_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.menuItems = await this.routePermissionService.filterPermittedRoutes(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      config.items,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // re-select active menu item after menu has been fully initialized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.activeLink = this.computeActiveLink(location.pathname);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <!--
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     This file is part of ndb-core.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     ndb-core is free software: you can redistribute it and/or modify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     it under the terms of the GNU General Public License as published by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     the Free Software Foundation, either version 3 of the License, or
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     (at your option) any later version.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     ndb-core is distributed in the hope that it will be useful,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     GNU General Public License for more details.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     You should have received a copy of the GNU General Public License
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ~     along with ndb-core.  If not, see <http://www.gnu.org/licenses/>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<mat-nav-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <ng-container *ngFor="let item of menuItems">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <mat-list-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      angularticsCategory="Navigation"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      angularticsAction="app_navigation_link_click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [angularticsLabel]="item.label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [routerLink]="[item.link]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [class.matched-background]="item.link === activeLink"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      onclick="this.blur();"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <a class="flex-row gap-small">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <app-fa-dynamic-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          class="nav-icon"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          [icon]="item.icon"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ></app-fa-dynamic-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        <div>{{ item.label }}</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      </a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </mat-list-item>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <mat-divider></mat-divider>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</mat-nav-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./navigation.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/* ensures that all icons have the same width */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +.nav-icon {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  min-width: sizes.$max-icon-width;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +.matched-background {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  background-color: colors.$background !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NotFoundComponent.html b/documentation/components/NotFoundComponent.html new file mode 100644 index 0000000000..f4e1d19688 --- /dev/null +++ b/documentation/components/NotFoundComponent.html @@ -0,0 +1,423 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/config/dynamic-routing/not-found/not-found.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(location: Location) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Logging } from "../../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LOCATION_TOKEN } from "../../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-not-found",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./not-found.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./not-found.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [MatButtonModule, RouterLink],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class NotFoundComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(@Inject(LOCATION_TOKEN) private location: Location) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this.location.pathname.endsWith("/404")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      Logging.debug("Could not find route: " + this.location.pathname);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="flex-column place-center">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <h1 i18n>Page Not Found</h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <h2 class="error-code">404</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <p i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Either the page has been removed or you don't have the required permissions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    to view this page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <button mat-stroked-button routerLink="" i18n>Go to Dashboard</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./not-found.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.error-code {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  color: colors.$text-secondary;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NoteAttendanceCountBlockComponent.html b/documentation/components/NoteAttendanceCountBlockComponent.html new file mode 100644 index 0000000000..b306082e25 --- /dev/null +++ b/documentation/components/NoteAttendanceCountBlockComponent.html @@ -0,0 +1,483 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/child-dev-project/notes/note-attendance-block/note-attendance-count-block.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Displays the amount of children with a given attendance status at a given note.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + config +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The logical attendance status for which the attendance should be counted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Note + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The note on which the attendance should be counted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + participantsWithStatus + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Note } from "../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AttendanceLogicalStatus } from "../../attendance/model/attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Displays the amount of children with a given attendance status at a given note.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("NoteAttendanceCountBlock")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-note-attendance-count-block",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  template: `{{ participantsWithStatus }}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class NoteAttendanceCountBlockComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The note on which the attendance should be counted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() entity: Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The logical attendance status for which the attendance should be counted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() config: { status: AttendanceLogicalStatus };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  participantsWithStatus: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.participantsWithStatus = this.entity.countWithStatus(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.config.status,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NoteDetailsComponent.html b/documentation/components/NoteDetailsComponent.html new file mode 100644 index 0000000000..a7d5a189b5 --- /dev/null +++ b/documentation/components/NoteDetailsComponent.html @@ -0,0 +1,1289 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/child-dev-project/notes/note-details/note-details.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component responsible for displaying the Note creation/view window

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + AbstractEntityDetailsComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(entityMapperService: EntityMapperService, entities: EntityRegistry, ability: EntityAbility, router: Router, unsavedChanges: UnsavedChangesService, configService: ConfigService, entityFormService: EntityFormService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        unsavedChanges + UnsavedChangesService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + bottomForm +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : ["children", "schools"] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Note + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + middleForm +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : ["subject", "text"] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + topForm +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : [ + "date", + "warningLevel", + "category", + "authors", + "attachment", + ] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + Async + loadEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + loadEntity() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + subscribeToEntityChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + subscribeToEntityChanges() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + bottomFieldGroups + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + entityConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : Note +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + exportConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        export format for notes to be used for downloading the individual details

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + form + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EntityForm<Note> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + tmpEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Note + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + topFieldGroups + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ViewEncapsulation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Note } from "../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ExportColumnConfig } from "../../../core/export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ConfigService } from "../../../core/config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityListConfig } from "../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DatePipe } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ExportDataDirective } from "../../../core/export/export-data-directive/export-data.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "../../../core/common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityFormComponent } from "../../../core/common-components/entity-form/entity-form/entity-form.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponentDirective } from "../../../core/config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DialogButtonsComponent } from "../../../core/form-dialog/dialog-buttons/dialog-buttons.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DialogCloseComponent } from "../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityArchivedInfoComponent } from "../../../core/entity-details/entity-archived-info/entity-archived-info.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityFieldEditComponent } from "../../../core/common-components/entity-field-edit/entity-field-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FieldGroup } from "../../../core/entity-details/form/field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ViewTitleComponent } from "../../../core/common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { AbstractEntityDetailsComponent } from "../../../core/entity-details/abstract-entity-details/abstract-entity-details.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityAbility } from "../../../core/permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { UnsavedChangesService } from "../../../core/entity-details/form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatProgressBar } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ViewActionsComponent } from "../../../core/common-components/view-actions/view-actions.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Component responsible for displaying the Note creation/view window
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("NoteDetails")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-note-details",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./note-details.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./note-details.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DatePipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ExportDataDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityFormComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DialogButtonsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityArchivedInfoComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityFieldEditComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ViewTitleComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatProgressBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ViewActionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class NoteDetailsComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  extends AbstractEntityDetailsComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  implements OnChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() declare entity: Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override entityConstructor = Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** export format for notes to be used for downloading the individual details */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  exportConfig: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() topForm = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    "date",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    "warningLevel",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    "category",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    "authors",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    "attachment",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() middleForm = ["subject", "text"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() bottomForm = ["children", "schools"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  topFieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  bottomFieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  form: EntityForm<Note>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  tmpEntity: Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    unsavedChanges: UnsavedChangesService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super(entityMapperService, entities, ability, router, unsavedChanges);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.exportConfig = this.configService.getConfig<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      config: EntityListConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }>("view:note")?.config.exportConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override async ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    await super.ngOnChanges(changes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.topFieldGroups = this.topForm.map((f) => ({ fields: [f] }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.bottomFieldGroups = [{ fields: this.bottomForm }];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form = await this.entityFormService.createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.middleForm.concat(this.topForm, this.bottomForm),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // create an object reflecting unsaved changes to use in template (e.g. for dynamic title)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.tmpEntity = this.entity.copy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.formGroup.valueChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.tmpEntity = Object.assign(this.tmpEntity, value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @if (isLoading || !tmpEntity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    {{ tmpEntity.date | date }}: {{ tmpEntity.subject }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div class="flex-column gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <app-entity-archived-info [entity]="entity"></app-entity-archived-info>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <app-entity-form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [fieldGroups]="topFieldGroups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </app-entity-form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <!-- Primary information of Note -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="mat-elevation-z2 flex-column gap-small padding-small margin-bottom-regular"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <div class="middle-form-field">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <app-entity-field-edit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [field]="middleForm[0]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ></app-entity-field-edit>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <div class="textarea middle-form-field">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <app-entity-field-edit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [field]="middleForm[1]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ></app-entity-field-edit>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <app-entity-form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [fieldGroups]="bottomFieldGroups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      style="margin-top: 10px"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ></app-entity-form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <app-dialog-buttons [form]="form.formGroup" [entity]="entity">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [appExportData]="[entity]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [exportConfig]="exportConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [filename]="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          'event_' +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          entity.toString()?.replace(' ', '-') +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          '_' +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          (entity.date | date: 'YYYY-MM-dd')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          aria-label="download csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          icon="download"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          angularticsCategory="Note"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          angularticsAction="single_note_csv_export"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <span i18n="Download note details as CSV"> Download details </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </app-dialog-buttons>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./note-details.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@use "mixins/grid-layout";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.input-medium {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  max-width: 500px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.content-header {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @include grid-layout.adaptive(450px);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.additional-actions-menu {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  right: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  top: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.form-section {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  margin-top: 24px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.middle-form-field mat-form-field {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NotesDashboardComponent.html b/documentation/components/NotesDashboardComponent.html new file mode 100644 index 0000000000..d9152d9bf0 --- /dev/null +++ b/documentation/components/NotesDashboardComponent.html @@ -0,0 +1,1179 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/child-dev-project/notes/dashboard-widgets/notes-dashboard/notes-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Dashboard Widget displaying entities that do not have a recently added Note.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          If you do not set "sinceDays" of "fromBeginningOfWeek" inputs +by default notes since beginning of the current week are considered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + DashboardWidget +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + OnInit + NotesDashboardConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(childrenService: ChildrenService, entities: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Entity for which the recent notes should be counted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + fromBeginningOfWeek +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Whether an additional offset should be automatically added to include notes from the beginning of the week

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + mode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : "with-recent-notes" | "without-recent-notes" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + sinceDays +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          number of days since last note that entities should be considered having a "recent" note.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + getRequiredEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + getRequiredEntities(config: NotesDashboardConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DashboardWidget +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DashboardWidget:45 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          config + NotesDashboardConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + _entity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + entries + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EntityWithRecentNoteInfo[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Entities displayed in the template with additional "daysSinceLastNote" field

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + subtitle + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + setentity(value: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Entity for which the recent notes should be counted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + gettooltip() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + sinceBeginningOfTheWeek +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + getsinceBeginningOfTheWeek() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + withinTheLastNDays +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + getwithinTheLastNDays() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ChildrenService } from "../../../children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityConstructor } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DecimalPipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Note } from "../../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +interface NotesDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entity?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  sinceDays?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  fromBeginningOfWeek?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mode?: "with-recent-notes" | "without-recent-notes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Dashboard Widget displaying entities that do not have a recently added Note.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * If you do not set "sinceDays" of "fromBeginningOfWeek" inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * by default notes since beginning of the current week are considered.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@DynamicComponent("NotesDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-no-recent-notes-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./notes-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./notes-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DecimalPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class NotesDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  implements OnInit, NotesDashboardConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override getRequiredEntities(config: NotesDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return config?.entity || Note.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Entity for which the recent notes should be counted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() set entity(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this._entity = this.entities.get(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  _entity: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * number of days since last note that entities should be considered having a "recent" note.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() sinceDays = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** Whether an additional offset should be automatically added to include notes from the beginning of the week */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() fromBeginningOfWeek = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() mode: "with-recent-notes" | "without-recent-notes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Entities displayed in the template with additional "daysSinceLastNote" field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entries: EntityWithRecentNoteInfo[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  subtitle: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this._entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entity = "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let dayRangeBoundary = this.sinceDays;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.fromBeginningOfWeek) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dayRangeBoundary += moment().diff(moment().startOf("week"), "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    switch (this.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      case "with-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          (stat) => stat[1] <= dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.subtitle = $localize`:Subtitle|Subtitle informing the user that these are the entities with recent reports:${this._entity.labelPlural} with recent report`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      case "without-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          (stat) => stat[1] >= dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.subtitle = $localize`:Subtitle|Subtitle informing the user that these are the entities without recent reports:${this._entity.labelPlural} having no recent reports`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private async loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    filter: (stat: [string, number]) => boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    dayRangeBoundary: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const queryRange = Math.round((dayRangeBoundary * 3) / 10) * 10; // query longer range to be able to display exact date of last note for recent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // recent notes are sorted ascending, without recent notes descending
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const order = this.mode === "with-recent-notes" ? -1 : 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const recentNotesMap =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      await this.childrenService.getDaysSinceLastNoteOfEachEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this._entity.ENTITY_TYPE,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        queryRange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.entries = Array.from(recentNotesMap)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter(filter)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((stat) => statsToEntityWithRecentNoteInfo(stat, queryRange))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .sort((a, b) => order * (b.daysSinceLastNote - a.daysSinceLastNote));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  get tooltip(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    switch (this.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      case "with-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return $localize`:Tooltip|Spaces in front of the variables are added automatically:includes cases with a note${this.sinceBeginningOfTheWeek}:sinceBeginningOfWeek:${this.withinTheLastNDays}:withinTheLastDays:`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      case "without-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return $localize`:Tooltip|Spaces in front of the variables are added automatically:includes cases without a note${this.sinceBeginningOfTheWeek}:sinceBeginningOfWeek:${this.withinTheLastNDays}:withinTheLastDays:`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  get sinceBeginningOfTheWeek(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.fromBeginningOfWeek) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        $localize`:Tooltip-part|'includes cases without a note since the beginning of the week':since the beginning of the week`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  get withinTheLastNDays(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.sinceDays > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        $localize`:Tooltip-part|'includes cases without a note within the last x days':without a note within the last ${this.sinceDays} days`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * details on entity stats to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +interface EntityWithRecentNoteInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entityId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  daysSinceLastNote: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** true when the daysSinceLastNote is not accurate but was cut off for performance optimization */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  moreThanDaysSince: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Map a result entry from getDaysSinceLastNoteOfEachEntity to the EntityWithRecentNoteInfo interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * @param stat Array of [entityId, daysSinceLastNote]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * @param queryRange The query range (the maximum of days that exactly calculated)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +function statsToEntityWithRecentNoteInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  stat: [string, number],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  queryRange: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +): EntityWithRecentNoteInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  if (stat[1] < Number.POSITIVE_INFINITY) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entityId: stat[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      daysSinceLastNote: stat[1],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      moreThanDaysSince: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entityId: stat[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      daysSinceLastNote: queryRange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      moreThanDaysSince: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  icon="file-alt"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  theme="note"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  [subtitle]="subtitle"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  [explanation]="tooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  [entries]="entries"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <div class="table-wrapper">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <table mat-table [attr.aria-label]="subtitle">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <!-- Table header only for assistive technologies like screen readers -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <tr hidden="true">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <th scope="col">{{ _entity.label }}</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <th scope="col">Days since last note</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <ng-container matColumnDef="entity">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <td *matCellDef="let entityNoteInfo">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            [entityId]="entityNoteInfo.entityId"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        matColumnDef="daysSinceLastNote"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        i18n="Amount of days back|Format like 'Days passed > 5 days'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <td *matCellDef="let entityNoteInfo" class="text-align-end">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          <ng-container *ngIf="entityNoteInfo.moreThanDaysSince">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            &gt;&nbsp;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          {{ entityNoteInfo.daysSinceLastNote | number: "1.0-0" }} days
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <tr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        mat-row
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        *matRowDef="let row; columns: ['entity', 'daysSinceLastNote']"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <div *ngIf="entries?.length === 0">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        *ngIf="mode === 'without-recent-notes'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        i18n="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          There are no participants that don't have a recent report to be shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        no records without recent report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        *ngIf="mode === 'with-recent-notes'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        i18n="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          There are no participants that have a recent report to be shown here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        no records with recent report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ./notes-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @use "../../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NotesManagerComponent.html b/documentation/components/NotesManagerComponent.html new file mode 100644 index 0000000000..af01fb4328 --- /dev/null +++ b/documentation/components/NotesManagerComponent.html @@ -0,0 +1,1042 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/child-dev-project/notes/notes-manager/notes-manager.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(formDialog: FormDialogService, entityMapperService: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + columnGroups +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ColumnGroupsConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : (FormFieldConfig | string)[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + defaultSort +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + exportConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + filters +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + includeEventNotes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + showEventNotesToggle +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + title +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + addNoteClick + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +addNoteClick() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + showDetails + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +showDetails(entity: Note) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entity + Note + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + updateIncludeEvents + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + updateIncludeEvents() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + entityConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : Note +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + notes + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Note[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Note } from "../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityListComponent } from "../../../core/entity-list/entity-list/entity-list.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { applyUpdate } from "../../../core/entity/model/entity-update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ColumnGroupsConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  FilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EventNote } from "../../attendance/model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { merge } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FaDynamicIconComponent } from "../../../core/common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ExportColumnConfig } from "../../../core/export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * additional config specifically for NotesManagerComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface NotesManagerConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** whether to also load EventNote entities in addition to Note entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  includeEventNotes?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** whether a toggle control is displayed to users, allowing to change the "includeEventNotes" state */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  showEventNotesToggle?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@RouteTarget("NotesManager")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-notes-manager",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./notes-manager.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    EntityListComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    FaDynamicIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class NotesManagerComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  // inputs to be passed through to EntityList
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() defaultSort: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() exportConfig: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() showInactive: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() title = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() columns: (FormFieldConfig | string)[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() columnGroups: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() filters: FilterConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() includeEventNotes: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() showEventNotesToggle: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityConstructor = Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  notes: Note[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.notes = await this.loadEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.subscribeEntityUpdates();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async loadEntities(): Promise<Note[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let notes = await this.entityMapperService.loadType(Note);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.includeEventNotes) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const eventNotes = await this.entityMapperService.loadType(EventNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      notes = notes.concat(eventNotes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return notes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private subscribeEntityUpdates() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    merge(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityMapperService.receiveUpdates(Note),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityMapperService.receiveUpdates(EventNote),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .subscribe((updatedNote) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          !this.includeEventNotes &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          updatedNote?.entity?.getType() === EventNote.ENTITY_TYPE
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.notes = applyUpdate(this.notes, updatedNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async updateIncludeEvents() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.includeEventNotes = !this.includeEventNotes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.notes = await this.loadEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  addNoteClick() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const newNote = new Note(Date.now().toString());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.showDetails(newNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  showDetails(entity: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.formDialog.openView(entity, "NoteDetails");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <app-entity-list
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [allEntities]="notes"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [entityConstructor]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  clickMode="none"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  (elementClick)="showDetails($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  (addNewClick)="addNoteClick()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [defaultSort]="defaultSort"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [exportConfig]="exportConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [showInactive]="showInactive"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [title]="title"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [columns]="columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [columnGroups]="columnGroups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [filters]="filters"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    *ngIf="showEventNotesToggle"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    (click)="updateIncludeEvents()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    angularticsCategory="Note"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    angularticsAction="include_events_toggle"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    [angularticsLabel]="includeEventNotes ? 'off' : 'on'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    i18n="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Slider that allows a user to also include events|events are related to a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      child
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <app-fa-dynamic-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [icon]="includeEventNotes ? 'toggle-on' : 'toggle-off'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      class="standard-icon-with-text color-accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ></app-fa-dynamic-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Include events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</app-entity-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/NotesRelatedToEntityComponent.html b/documentation/components/NotesRelatedToEntityComponent.html new file mode 100644 index 0000000000..cbc62d6420 --- /dev/null +++ b/documentation/components/NotesRelatedToEntityComponent.html @@ -0,0 +1,1559 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/child-dev-project/notes/notes-related-to-entity/notes-related-to-entity.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The component that is responsible for listing the Notes that are related to a certain entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + RelatedEntitiesComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(childrenService: ChildrenService, formDialog: FormDialogService, entityMapper: EntityMapperService, entities: EntityRegistry, screenWidthObserver: ScreenWidthObserver, filterService: FilterService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : "popup" | "navigate" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "popup" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Columns to be displayed in the table

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + editable +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              currently viewed/main entity for which related entities are displayed in this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity type of the related entities to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + filter +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This filter is applied before displaying the data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + loaderMethod +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + property +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string | string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Property name of the related entities (type given in this.entityType) that holds the entity id +to be matched with the id of the current main entity (given in this.entity). +If not explicitly set, this will be inferred based on the defined relations between the entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              manually setting this is only necessary if you have multiple properties referencing the same entity type +and you want to list only records related to one of them. +For example: if you set entityType = "Project" (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities, +you can set property = "supervisors" to only list those projects where the current User is supervisors, not participant.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Whether inactive/archived records should be shown.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + createNewRecordFactory + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + createNewRecordFactory() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : () => any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + getData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + getData() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + showNoteDetails + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +showNoteDetails(note: Note) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              note + Note + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + getProperty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + getProperty() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : string | [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + initFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + initFilter() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + listenToEntityUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + listenToEntityUpdates() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + _columns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [ + { id: "date", visibleFrom: "xs" }, + { id: "subject", visibleFrom: "xs" }, + { id: "text", visibleFrom: "md" }, + { id: "authors", visibleFrom: "md" }, + { id: "warningLevel", visibleFrom: "md" }, + ] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + entityCtr + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : Note +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + getColor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              returns the color for a note; passed to the entity subrecord component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              note +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              note to get color for

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + newRecordFactory + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : this.createNewRecordFactory() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : E[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Note } from "../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ChildrenService } from "../../children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FilterService } from "../../../core/filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ChildSchoolRelation } from "../../children/model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityDatatype } from "../../../core/basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { asArray } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RelatedEntitiesComponent } from "../../../core/entity-details/related-entities/related-entities.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ScreenWidthObserver } from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * The component that is responsible for listing the Notes that are related to a certain entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("NotesRelatedToEntity")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("NotesOfChild") // for backward compatibility
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-notes-related-to-entity",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./notes-related-to-entity.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [EntitiesTableComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class NotesRelatedToEntityComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  extends RelatedEntitiesComponent<Note>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override entityCtr = Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override _columns: FormFieldConfig[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    { id: "date", visibleFrom: "xs" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    { id: "subject", visibleFrom: "xs" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    { id: "text", visibleFrom: "md" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    { id: "authors", visibleFrom: "md" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    { id: "warningLevel", visibleFrom: "md" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * returns the color for a note; passed to the entity subrecord component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param note note to get color for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  getColor = (note: Note) => note?.getColor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  newRecordFactory = this.createNewRecordFactory();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    super(entityMapper, entities, screenWidthObserver, filterService, null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.entity.getType() === "Child") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // When displaying notes for a child, use attendance color highlighting
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.getColor = (note: Note) => note?.getColorForId(this.entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override getData() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.childrenService.getNotesRelatedTo(this.entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override createNewRecordFactory() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const newNote = super.createNewRecordFactory()();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      //TODO: generalize this code - possibly by only using relatedEntities to link other records here? see #1501
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (this.entity.getType() === ChildSchoolRelation.ENTITY_TYPE) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        for (const childId of asArray(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          (this.entity as ChildSchoolRelation).childId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        )) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          if (childId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            newNote.addChild(childId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        for (const schooldId of asArray(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          (this.entity as ChildSchoolRelation).schoolId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        )) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          if (schooldId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            newNote.addSchool(schooldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      for (const e of [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.entity.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ...this.getIndirectlyRelatedEntityIds(this.entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        if (!newNote.relatedEntities.includes(e)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          newNote.relatedEntities.push(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return newNote;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Get entities referenced in the given entity that match the entity types allowed for Note.relatedEntities schema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * and return their ids (including prefix).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private getIndirectlyRelatedEntityIds(entity: Entity): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let relatedIds = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let permittedRelatedTypes = asArray(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Note.schema.get("relatedEntities").additional,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const [property, schema] of entity.getSchema().entries()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (!entity[property]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // empty - skip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (schema.dataType !== EntityDatatype.dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // not referencing other entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      for (const referencedId of asArray(entity[property])) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const referencedType = Entity.extractTypeFromId(referencedId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        if (permittedRelatedTypes.includes(referencedType)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          // entity can have references of multiple entity types of which only some are allowed to be linked to Notes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          relatedIds.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            Entity.createPrefixedId(referencedType, referencedId),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return relatedIds;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  showNoteDetails(note: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.formDialog.openView(note, "NoteDetails");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [entityType]="entityCtr"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [records]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [customColumns]="_columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [filter]="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [newRecordFactory]="newRecordFactory"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  clickMode="none"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  (entityClick)="showNoteDetails($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [getBackgroundColor]="getColor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ObjectTableComponent.html b/documentation/components/ObjectTableComponent.html new file mode 100644 index 0000000000..dd13f9bf67 --- /dev/null +++ b/documentation/components/ObjectTableComponent.html @@ -0,0 +1,593 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/reporting/reporting/object-table/object-table.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + objects +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + columns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + dataSource + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : new MatTableDataSource() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + paginator + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : MatPaginator + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + @ViewChild(MatPaginator, {static: true})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + sort + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : MatSort + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + @ViewChild(MatSort, {static: true})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Input, OnInit, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTableDataSource, MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatSort, MatSortModule } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { NgForOf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatPaginator, MatPaginatorModule } from "@angular/material/paginator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-object-table",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./object-table.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./object-table.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [MatTableModule, NgForOf, MatSortModule, MatPaginatorModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ObjectTableComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() objects: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild(MatSort, { static: true }) sort: MatSort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  dataSource = new MatTableDataSource();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.dataSource.paginator = this.paginator;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.dataSource.sort = this.sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.columns = Object.keys(this.objects[0]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.dataSource.data = this.objects;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  mat-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [dataSource]="dataSource"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  matSort
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  class="full-width"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  i18n-aria-label="Label for table showing report result"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  aria-label="Table showing the report results"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <ng-container *ngFor="let col of columns" [matColumnDef]="col">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ col }}</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <td mat-cell *matCellDef="let row">{{ row[col] }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <tr mat-header-row *matHeaderRowDef="columns"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <tr mat-row *matRowDef="let row; columns: columns"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<mat-paginator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [pageSizeOptions]="[10, 50, 100]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  showFirstLastButtons
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  aria-label="Select page of periodic elements"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</mat-paginator>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./object-table.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PillComponent.html b/documentation/components/PillComponent.html new file mode 100644 index 0000000000..324d892151 --- /dev/null +++ b/documentation/components/PillComponent.html @@ -0,0 +1,344 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/common-components/pill/pill.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-pill",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./pill.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./pill.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class PillComponent {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <ng-content></ng-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./pill.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  padding: sizes.$small sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  border-radius: 100vmax;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  width: max-content;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  display: inline-block;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PrimaryActionComponent.html b/documentation/components/PrimaryActionComponent.html new file mode 100644 index 0000000000..b236f809bb --- /dev/null +++ b/documentation/components/PrimaryActionComponent.html @@ -0,0 +1,579 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/ui/primary-action/primary-action.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The "Primary Action" is always displayed hovering over the rest of the app as a quick action for the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This is a UX concept also used in many Android apps. +see https://material.io/components/buttons-floating-action-button/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(formDialog: FormDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + primaryAction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +primaryAction() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The primary action to be triggered when the user clicks the hovering button.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + noteConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : Note +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { ChangeDetectionStrategy, Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Note } from "../../../child-dev-project/notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormDialogService } from "../../form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * The "Primary Action" is always displayed hovering over the rest of the app as a quick action for the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This is a UX concept also used in many Android apps.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * see {@link https://material.io/components/buttons-floating-action-button/}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-primary-action",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./primary-action.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./primary-action.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class PrimaryActionComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  noteConstructor = Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(private formDialog: FormDialogService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The primary action to be triggered when the user clicks the hovering button.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  primaryAction() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.formDialog.openView(this.createNewNote(), "NoteDetails");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private createNewNote() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return new Note();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mat-fab
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  class="primary-action"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  (click)="primaryAction()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  angularticsCategory="Navigation"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  angularticsAction="primary_action_click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    entity: noteConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    operation: 'create',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <fa-icon icon="file-alt"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./primary-action.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    .primary-action {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  font-size: 180%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  bottom: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  right: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  z-index: 999;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ProgressComponent.html b/documentation/components/ProgressComponent.html new file mode 100644 index 0000000000..fb891e204a --- /dev/null +++ b/documentation/components/ProgressComponent.html @@ -0,0 +1,462 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/features/file/progress/progress.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(config: literal type) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      config + literal type + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + Public + config + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + @Inject(MAT_SNACK_BAR_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MAT_SNACK_BAR_DATA } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AsyncPipe } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-progress",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./progress.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [MatProgressBarModule, AsyncPipe],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class ProgressComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Inject(MAT_SNACK_BAR_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    public config: { message: string; progress: Observable<number> },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <p>{{ config.message }}</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +<mat-progress-bar
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  mode="determinate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [value]="config.progress | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ProgressDashboardComponent.html b/documentation/components/ProgressDashboardComponent.html new file mode 100644 index 0000000000..7fbc4ae030 --- /dev/null +++ b/documentation/components/ProgressDashboardComponent.html @@ -0,0 +1,843 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/features/dashboard-widgets/progress-dashboard-widget/progress-dashboard/progress-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DashboardWidget +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(entityMapper: EntityMapperService, dialog: MatDialog, syncState: SyncStateSubject) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        syncState + SyncStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + dashboardConfigId +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + getRequiredEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getRequiredEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DashboardWidget +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DashboardWidget:39 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + save + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + save() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + showEditComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +showEditComponent() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : ProgressDashboardConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ProgressDashboardConfig } from "./progress-dashboard-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Logging } from "../../../../core/logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EditProgressDashboardComponent } from "../edit-progress-dashboard/edit-progress-dashboard.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { waitForChangeTo } from "../../../../core/session/session-states/session-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SyncState } from "../../../../core/session/session-states/sync-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { firstValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { PercentPipe } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SyncStateSubject } from "../../../../core/session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-progress-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./progress-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./progress-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    PercentPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("ProgressDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ProgressDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override getRequiredEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return ProgressDashboardConfig.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() dashboardConfigId = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  data: ProgressDashboardConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private syncState: SyncStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.data = new ProgressDashboardConfig(this.dashboardConfigId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.loadConfigFromDatabase().catch(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      firstValueFrom(this.syncState.pipe(waitForChangeTo(SyncState.COMPLETED)))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .then(() => this.loadConfigFromDatabase())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .catch(() => this.createDefaultConfig()),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private loadConfigFromDatabase() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .load(ProgressDashboardConfig, this.dashboardConfigId)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .then((config) => (this.data = config));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private createDefaultConfig() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      `ProgressDashboardConfig (${this.dashboardConfigId}) not found. Creating ...`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.data.title = $localize`:The progress, e.g. of a certain activity:Progress of X`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.save();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async save() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    await this.entityMapper.save(this.data);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  showEditComponent() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .open(EditProgressDashboardComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        data: this.data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe(async (next) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (next) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          Object.assign(this.data, next);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          await this.save();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="widget-container">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    icon="list"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    theme="child"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    [subtitle]="data?.title"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    [entries]="data?.parts"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <div class="table-wrapper">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        mat-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        i18n-aria-label="Label for progress dashboard"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        aria-label="Table showing organization progress"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <ng-container matColumnDef="label">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <td *matCellDef="let entry" class="width-1-3 padding-right-small">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            {{ entry.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <ng-container matColumnDef="progress-bar">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <td *matCellDef="let entry" class="full-width">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            <mat-progress-bar
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              class="progress-bar"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              mode="determinate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              [value]="(entry.currentValue / entry.targetValue) * 100"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            ></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <ng-container matColumnDef="progress-value">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <td *matCellDef="let entry" class="progress-cell">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            {{ entry.currentValue }} / {{ entry.targetValue }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <tr hidden>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <th scope="col" i18n="The label of an entry">Label</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <th scope="col" i18n="A visual aid to understand a progress of sorts">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            Progress Bar
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          </th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <th scope="col" i18n="A progress in numbers">Progress Value</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <tr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          mat-row
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          *matRowDef="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            let row;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            columns: ['label', 'progress-bar', 'progress-value']
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <button mat-icon-button (click)="showEditComponent()" class="config-panel">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <fa-icon aria-label="configure" icon="wrench"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./progress-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @use "../../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.progress-bar {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  height: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.progress-cell {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  white-space: nowrap;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  padding-left: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  text-align: end;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.config-panel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  left: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  bottom: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  margin: 4px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.widget-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ProgressDialogComponent.html b/documentation/components/ProgressDialogComponent.html new file mode 100644 index 0000000000..e58072614b --- /dev/null +++ b/documentation/components/ProgressDialogComponent.html @@ -0,0 +1,466 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/common-components/confirmation-dialog/progress-dialog/progress-dialog.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A simple progress indicator dialog +used via the ConfirmationDialogService.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + + Public + data +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(data: literal type) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          data + literal type + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A simple progress indicator dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * used via the {@link ConfirmationDialogService}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./progress-dialog.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [MatProgressBarModule, MatDialogModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class ProgressDialogComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(@Inject(MAT_DIALOG_DATA) public data: { message: string }) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <h1 mat-dialog-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  {{ data.message }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +<div mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PublicFormComponent.html b/documentation/components/PublicFormComponent.html new file mode 100644 index 0000000000..450b60ec85 --- /dev/null +++ b/documentation/components/PublicFormComponent.html @@ -0,0 +1,876 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/public-form/public-form.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(database: PouchDatabase, route: ActivatedRoute, entities: EntityRegistry, entityMapper: EntityMapperService, entityFormService: EntityFormService, configService: ConfigService, entitySchemaService: EntitySchemaService, snackbar: MatSnackBar) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            database + PouchDatabase + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            route + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entitySchemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            snackbar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + submit + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + submit() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + entity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : E + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + fieldGroups + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + form + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EntityForm<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + formConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : PublicFormConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { PouchDatabase } from "../../core/database/pouch-database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ActivatedRoute } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityRegistry } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { PublicFormConfig } from "./public-form-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity, EntityConstructor } from "../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../../core/common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityFormComponent } from "../../core/common-components/entity-form/entity-form/entity-form.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ConfigService } from "../../core/config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntitySchemaService } from "../../core/entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatCardModule } from "@angular/material/card";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FieldGroup } from "../../core/entity-details/form/field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { InvalidFormFieldError } from "../../core/common-components/entity-form/invalid-form-field.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-public-form",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./public-form.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./public-form.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [EntityFormComponent, MatButtonModule, MatCardModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class PublicFormComponent<E extends Entity> implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private entityType: EntityConstructor<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private prefilled: Partial<E> = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  formConfig: PublicFormConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entity: E;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  form: EntityForm<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private database: PouchDatabase,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private route: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entitySchemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private snackbar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!this.database["pouchDB"]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.database.initRemoteDB();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // wait for config to be initialized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.configService.configUpdates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .subscribe(() => this.loadFormConfig());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async submit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      await this.entityFormService.saveChanges(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.form.formGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.snackbar.open($localize`Successfully submitted form`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (e instanceof InvalidFormFieldError) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.snackbar.open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          $localize`Some fields are invalid, please check the form and submit again.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      throw e;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.initForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async reset() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.initForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async loadFormConfig() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const id = this.route.snapshot.paramMap.get("id");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.formConfig = await this.entityMapper.load(PublicFormConfig, id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityType = this.entities.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.formConfig.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ) as EntityConstructor<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.formConfig.prefilled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.prefilled = this.entitySchemaService.transformDatabaseToEntityFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.formConfig.prefilled,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entityType.schema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.fieldGroups = this.formConfig.columns.map((row) => ({ fields: row }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.initForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async initForm() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entity = new this.entityType();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Object.entries(this.prefilled).forEach(([prop, value]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entity[prop] = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.form = await this.entityFormService.createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [].concat(...this.fieldGroups.map((group) => group.fields)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <mat-card>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <mat-card-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <mat-card-title>{{ formConfig?.title }}</mat-card-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <mat-card-subtitle>{{ formConfig?.description }}</mat-card-subtitle>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </mat-card-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @if (formConfig && form) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <app-entity-form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [fieldGroups]="fieldGroups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        [gridLayout]="false"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ></app-entity-form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <mat-card-footer>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        (click)="submit()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        i18n="Submit form button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        Submit Form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <button mat-stroked-button (click)="reset()" i18n="Reset form button">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        Reset
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </mat-card-footer>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      <p i18n>Loading form ...</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </mat-card-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</mat-card>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + ./public-form.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            :host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  max-width: 700px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  margin: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  width: 95%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  height: 50px !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  font-size: large;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  margin-left: 2.5%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  margin-bottom: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/PwaInstallComponent.html b/documentation/components/PwaInstallComponent.html new file mode 100644 index 0000000000..35aceab819 --- /dev/null +++ b/documentation/components/PwaInstallComponent.html @@ -0,0 +1,799 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/pwa-install/pwa-install.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(snackBar: MatSnackBar, pwaInstallService: PwaInstallService, changeDetector: ChangeDetectorRef) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              snackBar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pwaInstallService + PwaInstallService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              changeDetector + ChangeDetectorRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + pwaInstallButtonClicked + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +pwaInstallButtonClicked() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + _showPWAInstallButton + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Public + snackBar + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : MatSnackBar + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + templateIOSInstallInstructions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + @ViewChild('iOSInstallInstructions')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + showPWAInstallButton +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + setshowPWAInstallButton(value: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              value + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ChangeDetectionStrategy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { PwaInstallService, PWAInstallType } from "./pwa-install.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-pwa-install",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./pwa-install.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./pwa-install.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [NgIf, MatButtonModule, Angulartics2Module, FontAwesomeModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class PwaInstallComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @ViewChild("iOSInstallInstructions")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateIOSInstallInstructions: TemplateRef<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  set showPWAInstallButton(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this._showPWAInstallButton = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.changeDetector.detectChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  _showPWAInstallButton = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private pwaInstallType: PWAInstallType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    public snackBar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private pwaInstallService: PwaInstallService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private changeDetector: ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.pwaInstallType = this.pwaInstallService.getPWAInstallType();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.pwaInstallType === PWAInstallType.ShowiOSInstallInstructions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.showPWAInstallButton = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    PwaInstallService.canInstallDirectly?.then(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.showPWAInstallButton = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  pwaInstallButtonClicked() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.pwaInstallType === PWAInstallType.ShowiOSInstallInstructions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.snackBar.openFromTemplate(this.templateIOSInstallInstructions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.pwaInstallService.installPWA().then((choice) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        if (choice.outcome === "accepted") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          this.showPWAInstallButton = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  *ngIf="_showPWAInstallButton"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  mat-flat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  class="pwa-install-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  color="primary"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  angularticsCategory="UserAction"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  angularticsAction="install_app"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  (click)="pwaInstallButtonClicked()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <fa-icon icon="cloud-download-alt" class="standard-icon-with-text"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <span i18n="PWA Install Button Label">Install App</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<ng-template #iOSInstallInstructions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <ng-container i18n="PWA iOS Install Instructions - Line 1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    To install the app
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    style="position: absolute; right: -10px; top: 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (click)="snackBar.dismiss()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <fa-icon icon="window-close" class="nav-icon"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <ol>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <ng-container i18n="PWA iOS Install Instructions - Line 2-1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        tap on
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <fa-icon icon="arrow-up-from-bracket" class="nav-icon"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <ng-container i18n="PWA iOS Install Instructions - Line 2-2">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        at the bottom
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <ng-container i18n="PWA iOS Install Instructions - Line 3-1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        and then tap on
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <fa-icon icon="plus-square" class="nav-icon"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <ng-container i18n="PWA iOS Install Instructions - Line 3-2">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (Add to Homescreen).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </li>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </ol>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + ./pwa-install.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.pwa-install-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  border-top: solid 1px rgba(0, 0, 0, 0.12);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  border-radius: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  overflow: hidden;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  color: white;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ReadonlyFunctionComponent.html b/documentation/components/ReadonlyFunctionComponent.html new file mode 100644 index 0000000000..0cf11d1260 --- /dev/null +++ b/documentation/components/ReadonlyFunctionComponent.html @@ -0,0 +1,574 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/display-readonly-function/readonly-function.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + config +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ViewDirective } from "../../entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityFunctionPipe } from "./entity-function.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("ReadonlyFunction")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-readonly-function",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  template: `{{ entity | entityFunction: config }}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [EntityFunctionPipe],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ReadonlyFunctionComponent extends ViewDirective<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  (entity: Entity) => any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +> {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RecentAttendanceBlocksComponent.html b/documentation/components/RecentAttendanceBlocksComponent.html new file mode 100644 index 0000000000..305576c94d --- /dev/null +++ b/documentation/components/RecentAttendanceBlocksComponent.html @@ -0,0 +1,647 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/child-dev-project/attendance/recent-attendance-blocks/recent-attendance-blocks.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This component lists attendance blocks for a child for recent months filtered by institutions. +The child object the institution needs to be provided. +It also implements a flexible layout to display less attendance blocks on a smaller layout.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(attendanceService: AttendanceService, screenWidthObserver: ScreenWidthObserver) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  attendanceService + AttendanceService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + config +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + attendanceList + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : ActivityAttendance[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + maxAttendanceBlocks + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : 3 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ActivityAttendance } from "../model/activity-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AttendanceService } from "../attendance.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ScreenSize,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { NgForOf, SlicePipe } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AttendanceBlockComponent } from "../attendance-block/attendance-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This component lists attendance blocks for a child for recent months filtered by institutions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The child object the institution needs to be provided.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * It also implements a flexible layout to display less attendance blocks on a smaller layout.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("RecentAttendanceBlocks")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-recent-attendance-blocks",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  template: `
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <app-attendance-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      *ngFor="let att of attendanceList | slice: 0 : maxAttendanceBlocks"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [attendanceData]="att"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [forChild]="entity.getId()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ></app-attendance-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  `,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [NgForOf, SlicePipe, AttendanceBlockComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class RecentAttendanceBlocksComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  attendanceList: ActivityAttendance[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  maxAttendanceBlocks: number = 3;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() config: { filterByActivityType: string };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.screenWidthObserver
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .shared()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe((change) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        switch (change) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          case ScreenSize.xs:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          case ScreenSize.sm: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            this.maxAttendanceBlocks = 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          case ScreenSize.md: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            this.maxAttendanceBlocks = 2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          case ScreenSize.lg: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            this.maxAttendanceBlocks = 3;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          case ScreenSize.xl:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          case ScreenSize.xxl: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            this.maxAttendanceBlocks = 6;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let activities = await this.attendanceService.getActivitiesForChild(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entity.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.config.filterByActivityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      activities = activities.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (a) => a.type.id === this.config.filterByActivityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.attendanceList = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const activityRecords =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      await this.attendanceService.getAllActivityAttendancesForPeriod(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        moment().startOf("month").toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        moment().endOf("month").toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const record of activityRecords) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (activities.find((a) => a.getId() === record.activity?.getId())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.attendanceList.push(record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RelatedEntitiesComponent.html b/documentation/components/RelatedEntitiesComponent.html new file mode 100644 index 0000000000..aba0a886a1 --- /dev/null +++ b/documentation/components/RelatedEntitiesComponent.html @@ -0,0 +1,1452 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity-details/related-entities/related-entities.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Load and display a list of entity subrecords (entities related to the current entity details view).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(entityMapper: EntityMapperService, entityRegistry: EntityRegistry, screenWidthObserver: ScreenWidthObserver, filterService: FilterService, entitySpecialLoader: EntitySpecialLoaderService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entitySpecialLoader + EntitySpecialLoaderService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : "popup" | "navigate" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "popup" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Columns to be displayed in the table

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + editable +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    currently viewed/main entity for which related entities are displayed in this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entity type of the related entities to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + filter +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This filter is applied before displaying the data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + loaderMethod +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + property +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string | string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Property name of the related entities (type given in this.entityType) that holds the entity id +to be matched with the id of the current main entity (given in this.entity). +If not explicitly set, this will be inferred based on the defined relations between the entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    manually setting this is only necessary if you have multiple properties referencing the same entity type +and you want to list only records related to one of them. +For example: if you set entityType = "Project" (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities, +you can set property = "supervisors" to only list those projects where the current User is supervisors, not participant.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Whether inactive/archived records should be shown.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + createNewRecordFactory + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +createNewRecordFactory() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : () => any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + getData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getData() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<E[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + getProperty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getProperty() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : string | [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + initFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + initFilter() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + listenToEntityUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + listenToEntityUpdates() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + _columns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : E[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + entityCtr + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : EntityConstructor<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + setentityType(value: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entity type of the related entities to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + setcolumns(value: ColumnConfig[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Columns to be displayed in the table

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + ColumnConfig[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input, OnInit, Optional } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntitiesTableComponent } from "../../common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { applyUpdate } from "../../entity/model/entity-update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ScreenSize,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  toFormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DataFilter } from "../../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FilterService } from "../../filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityDatatype } from "../../basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  EntitySpecialLoaderService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  LoaderMethod,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "../../entity/entity-special-loader/entity-special-loader.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Load and display a list of entity subrecords (entities related to the current entity details view).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@DynamicComponent("RelatedEntities")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-related-entities",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./related-entities.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [EntitiesTableComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class RelatedEntitiesComponent<E extends Entity> implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** currently viewed/main entity for which related entities are displayed in this component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** entity type of the related entities to be displayed */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() set entityType(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.entityCtr = this.entityRegistry.get(value) as EntityConstructor<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Property name of the related entities (type given in this.entityType) that holds the entity id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * to be matched with the id of the current main entity (given in this.entity).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * If not explicitly set, this will be inferred based on the defined relations between the entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * manually setting this is only necessary if you have multiple properties referencing the same entity type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * and you want to list only records related to one of them.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * For example: if you set `entityType = "Project"` (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * you can set `property = "supervisors"` to only list those projects where the current User is supervisors, not participant.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() property: string | string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The special service or method to load data via an index or other special method.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() loaderMethod: LoaderMethod;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Columns to be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  public set columns(value: ColumnConfig[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!Array.isArray(value)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this._columns = value.map((c) => toFormFieldConfig(c));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.updateColumnsToDisplayForScreenSize();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected _columns: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columnsToDisplay: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This filter is applied before displaying the data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() filter?: DataFilter<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Whether inactive/archived records should be shown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() showInactive: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() clickMode: "popup" | "navigate" = "popup";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() editable: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  data: E[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected entityCtr: EntityConstructor<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    protected entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    protected filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Optional() private entitySpecialLoader: EntitySpecialLoaderService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.screenWidthObserver
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .shared()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .subscribe(() => this.updateColumnsToDisplayForScreenSize());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.property = this.property ?? this.getProperty();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.data = await this.getData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.filter = this.initFilter();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.showInactive === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // show all related docs when visiting an archived entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.showInactive = this.entity.anonymized;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.listenToEntityUpdates();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected getData(): Promise<E[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.loaderMethod && this.entitySpecialLoader) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return this.entitySpecialLoader.loadDataFor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.loaderMethod,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.entityMapper.loadType(this.entityCtr);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected getProperty(): string | string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const relType = this.entity.getType();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const found = [...this.entityCtr.schema].filter(([, field]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const entityDatatype = field.dataType === EntityDatatype.dataType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return entityDatatype && Array.isArray(field.additional)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ? field.additional.includes(relType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        : field.additional === relType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return found.length === 1 ? found[0][0] : found.map(([key]) => key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected initFilter(): DataFilter<E> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const filter: DataFilter<E> = { ...this.filter };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.property) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // only show related entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (typeof this.property === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        Object.assign(filter, this.getFilterForProperty(this.property));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      } else if (this.property.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        filter["$or"] = this.property.map((prop) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          this.getFilterForProperty(prop),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return filter;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private getFilterForProperty(property: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const isArray = this.entityCtr.schema.get(property).isArray;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const filter = isArray
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ? { $elemMatch: { $eq: this.entity.getId() } }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      : this.entity.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return { [property]: filter };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected listenToEntityUpdates() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .receiveUpdates(this.entityCtr)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .subscribe((next) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.data = applyUpdate(this.data, next);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  createNewRecordFactory() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const rec = new this.entityCtr();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.filterService.alignEntityWithFilter(rec, this.filter);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return rec;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private updateColumnsToDisplayForScreenSize() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this._columns) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.columnsToDisplay = this._columns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .filter((column) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        if (column?.hideFromTable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        const numericValue = ScreenSize[column?.visibleFrom];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        if (numericValue === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return this.screenWidthObserver.currentScreenSize() >= numericValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .map((c) => c.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [entityType]="entityCtr"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [records]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [filter]="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [customColumns]="_columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [columnsToDisplay]="columnsToDisplay"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [newRecordFactory]="createNewRecordFactory()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [showInactive]="showInactive"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [clickMode]="clickMode"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  [editable]="editable"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +></app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RelatedEntitiesWithSummaryComponent.html b/documentation/components/RelatedEntitiesWithSummaryComponent.html new file mode 100644 index 0000000000..c7123fae97 --- /dev/null +++ b/documentation/components/RelatedEntitiesWithSummaryComponent.html @@ -0,0 +1,1452 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/entity-details/related-entities-with-summary/related-entities-with-summary.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Load and display a list of related entities +including a summary below the table.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + RelatedEntitiesComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + summaries +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Configuration of what numbers should be summarized below the table.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : "popup" | "navigate" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "popup" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Columns to be displayed in the table

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + editable +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      currently viewed/main entity for which related entities are displayed in this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      entity type of the related entities to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + filter +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This filter is applied before displaying the data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + loaderMethod +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + property +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string | string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Property name of the related entities (type given in this.entityType) that holds the entity id +to be matched with the id of the current main entity (given in this.entity). +If not explicitly set, this will be inferred based on the defined relations between the entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      manually setting this is only necessary if you have multiple properties referencing the same entity type +and you want to list only records related to one of them. +For example: if you set entityType = "Project" (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities, +you can set property = "supervisors" to only list those projects where the current User is supervisors, not participant.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Whether inactive/archived records should be shown.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + updateSummary + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +updateSummary(filteredData: E[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      update the summary or generate a new one. +The summary contains no duplicates and is in a +human-readable format

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      filteredData + E[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + createNewRecordFactory + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +createNewRecordFactory() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : () => any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + getData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + getData() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<E[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + getProperty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + getProperty() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : string | [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + initFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + initFilter() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + listenToEntityUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + listenToEntityUpdates() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + entitiesTable + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntitiesTableComponent<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + @ViewChild(EntitiesTableComponent, {static: true})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + summaryAvg + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + summarySum + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + _columns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : E[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + entityCtr + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityConstructor<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnInit, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { RelatedEntitiesComponent } from "../related-entities/related-entities.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntitiesTableComponent } from "../../common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Load and display a list of related entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * including a summary below the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("RelatedEntitiesWithSummary")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-related-entities-with-summary",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./related-entities-with-summary.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [EntitiesTableComponent, NgIf],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class RelatedEntitiesWithSummaryComponent<E extends Entity = Entity>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  extends RelatedEntitiesComponent<E>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @ViewChild(EntitiesTableComponent, { static: true })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entitiesTable: EntitiesTableComponent<E>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Configuration of what numbers should be summarized below the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() summaries?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    countProperty: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    groupBy?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    total?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    average?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  summarySum = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  summaryAvg = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    await super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entitiesTable.filteredRecordsChange.subscribe((data) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.updateSummary(data),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * update the summary or generate a new one.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The summary contains no duplicates and is in a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * human-readable format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  updateSummary(filteredData: E[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.summaries) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.summarySum = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.summaryAvg = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const summary = new Map<string, { count: number; sum: number }>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const average = new Map<string, number>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    filteredData.forEach((m) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const amount = m[this.summaries.countProperty];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      let groupLabel;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (this.summaries.groupBy) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        groupLabel =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          m[this.summaries.groupBy]?.label ?? m[this.summaries.groupBy];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      summary.set(groupLabel, summary.get(groupLabel) || { count: 0, sum: 0 });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      summary.get(groupLabel).count++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      summary.get(groupLabel).sum += amount;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.summaries.total) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const summarySumArray = Array.from(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        summary.entries(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ([label, { sum }]) => `${label}: ${sum}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.summarySum = summarySumArray.join(", ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.summaries.average) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const summaryAvgArray = Array.from(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        summary.entries(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ([label, { count, sum }]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          const avg = parseFloat((sum / count).toFixed(2));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          average.set(label, avg);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          return `${label}: ${avg}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.summaryAvg = summaryAvgArray.join(", ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (summary.size === 1 && summary.has(undefined)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // display only single summary without group label (this also applies if no groupBy is given)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.summarySum = this.summarySum.replace("undefined: ", "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.summaryAvg = this.summaryAvg.replace("undefined: ", "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [entityType]="entityCtr"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [records]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [filter]="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [customColumns]="_columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [newRecordFactory]="createNewRecordFactory()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +></app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +<div class="margin-top-large">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <ng-container *ngIf="summarySum">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <strong i18n>Total:</strong> {{ summarySum }} <br />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <ng-container *ngIf="summaryAvg">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <strong i18n>Average:</strong> {{ summaryAvg }} <br />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RelatedTimePeriodEntitiesComponent.html b/documentation/components/RelatedTimePeriodEntitiesComponent.html new file mode 100644 index 0000000000..57681b5242 --- /dev/null +++ b/documentation/components/RelatedTimePeriodEntitiesComponent.html @@ -0,0 +1,1444 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/entity-details/related-time-period-entities/related-time-period-entities.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Display a list of entity subrecords (entities related to the current entity details view) +which can be active or past/inactive.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This component is similar to RelatedEntities but provides some additional UI to help users +create a new entry if no currently active entry exists and +show/hide inactive entries from the list.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + RelatedEntitiesComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + single +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : "popup" | "navigate" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "popup" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + editable +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        currently viewed/main entity for which related entities are displayed in this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entity type of the related entities to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + filter +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This filter is applied before displaying the data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + loaderMethod +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + property +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string | string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Property name of the related entities (type given in this.entityType) that holds the entity id +to be matched with the id of the current main entity (given in this.entity). +If not explicitly set, this will be inferred based on the defined relations between the entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        manually setting this is only necessary if you have multiple properties referencing the same entity type +and you want to list only records related to one of them. +For example: if you set entityType = "Project" (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities, +you can set property = "supervisors" to only list those projects where the current User is supervisors, not participant.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + createNewRecordFactory + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + createNewRecordFactory() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : () => any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + getData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getData() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<E[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + getProperty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getProperty() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : string | [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + initFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + initFilter() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + listenToEntityUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + listenToEntityUpdates() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + _columns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : [ + { id: "start", visibleFrom: "md" }, + { id: "end", visibleFrom: "md" }, + isActiveIndicator, + ] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + backgroundColorFn + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + hasCurrentlyActiveEntry + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : E[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + entityCtr + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EntityConstructor<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + getcolumns() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + setcolumns(value: FormFieldConfig[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + FormFieldConfig[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormFieldConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitiesTableComponent } from "../../common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { PillComponent } from "../../common-components/pill/pill.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ChildSchoolRelation } from "../../../child-dev-project/children/model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { RelatedEntitiesComponent } from "../related-entities/related-entities.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { TimePeriod } from "./time-period";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Display a list of entity subrecords (entities related to the current entity details view)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * which can be active or past/inactive.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This component is similar to RelatedEntities but provides some additional UI to help users
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * create a new entry if no currently active entry exists and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * show/hide inactive entries from the list.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("RelatedTimePeriodEntities")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-related-time-period-entities",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./related-time-period-entities.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./related-time-period-entities.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    PillComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class RelatedTimePeriodEntitiesComponent<E extends TimePeriod>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  extends RelatedEntitiesComponent<E>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  // also see super class for Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() single = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() override showInactive = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() override set columns(value: FormFieldConfig[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this._columns = [...value, isActiveIndicator];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override get columns(): FormFieldConfig[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this._columns;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override _columns: FormFieldConfig[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    { id: "start", visibleFrom: "md" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    { id: "end", visibleFrom: "md" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    isActiveIndicator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  backgroundColorFn = (r: E) => r.getColor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  hasCurrentlyActiveEntry: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    await super.ngOnInit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.hasCurrentlyActiveEntry = this.data.some((record) => record.isActive);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override createNewRecordFactory() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const newRelation = super.createNewRecordFactory()();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newRelation.start =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.data?.length && this.data[0].end
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          ? moment(this.data[0].end).add(1, "day").toDate()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          : moment().startOf("day").toDate();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return newRelation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export const isActiveIndicator: FormFieldConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  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`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <app-pill class="hint-badge" *ngIf="!hasCurrentlyActiveEntry && !!data">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Currently there is no active entry. To add a new entry, click on the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <fa-icon class="color-accent" aria-label="add" icon="plus-circle"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  button.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</app-pill>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +<app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [entityType]="entityCtr"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [records]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [filter]="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [customColumns]="_columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [newRecordFactory]="createNewRecordFactory()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [getBackgroundColor]="showInactive ? backgroundColorFn : undefined"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [clickMode]="clickMode"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [(showInactive)]="showInactive"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./related-time-period-entities.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.hint-badge {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  background-color: colors.$primary;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  margin-bottom: sizes.$regular;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ReportRowComponent.html b/documentation/components/ReportRowComponent.html new file mode 100644 index 0000000000..82c1a5c9b4 --- /dev/null +++ b/documentation/components/ReportRowComponent.html @@ -0,0 +1,731 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/reporting/reporting/report-row/report-row.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + rows +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ReportRow[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + dataSource + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : new MatTreeFlatDataSource(this.treeControl, this.treeFlattener) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + displayedColumns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : ["name", "count"] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + getGroupedByString + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : getGroupingInformationString +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + treeControl + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : new FlatTreeControl<FlattenedReportRow>( + (row) => row.level, + (row) => row.isExpandable, + ) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + treeFlattener + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : new MatTreeFlattener<ReportRow, FlattenedReportRow>( + (row, level) => ({ + level: level, + isExpandable: !!row.subRows && row.subRows.length > 0, + ...row, + }), + (row) => row.level, + (row) => row.isExpandable, + (row) => row.subRows, + ) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + rows +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + setrows(rows: ReportRow[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rows + ReportRow[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { getGroupingInformationString, ReportRow } from "../../report-row";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FlatTreeControl } from "@angular/cdk/tree";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatTreeFlatDataSource,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatTreeFlattener,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/material/tree";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +interface FlattenedReportRow extends ReportRow {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  level: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isExpandable: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-report-row",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./report-row.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./report-row.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [MatTableModule, MatButtonModule, FontAwesomeModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class ReportRowComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() set rows(rows: ReportRow[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dataSource.data = rows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  displayedColumns: string[] = ["name", "count"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  getGroupedByString = getGroupingInformationString;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  treeFlattener = new MatTreeFlattener<ReportRow, FlattenedReportRow>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (row, level) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      level: level,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      isExpandable: !!row.subRows && row.subRows.length > 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ...row,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (row) => row.level,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (row) => row.isExpandable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (row) => row.subRows,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  treeControl = new FlatTreeControl<FlattenedReportRow>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (row) => row.level,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (row) => row.isExpandable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <table mat-table [dataSource]="dataSource" class="full-width">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <ng-container matColumnDef="name">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <th mat-header-cell *matHeaderCellDef>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <span style="padding-left: 40px" i18n="Table report header"> Name </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <td
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      mat-cell
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      *matCellDef="let node"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      class="flex-row align-center"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      style="height: 52px"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [style.visibility]="node.isExpandable ? '' : 'hidden'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [style.marginLeft.px]="node.level * 32"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (click)="treeControl.toggle(node)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [attr.aria-label]="'Toggle ' + node.header.label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          class="expand-icon-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          [icon]="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            treeControl.isExpanded(node) ? 'chevron-down' : 'chevron-right'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      {{ node.header.label }} {{ getGroupedByString(node.header.groupedBy) }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <ng-container matColumnDef="count">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <th mat-header-cell *matHeaderCellDef i18n="Table report header">Count</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <td mat-cell *matCellDef="let node">{{ node.header.result }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ./report-row.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +table tr:nth-child(even) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  background-color: colors.$grey-light;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +.expand-icon-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  color: colors.$muted;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ReportingComponent.html b/documentation/components/ReportingComponent.html new file mode 100644 index 0000000000..13075ea2b9 --- /dev/null +++ b/documentation/components/ReportingComponent.html @@ -0,0 +1,1043 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/reporting/reporting/reporting.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(dataAggregationService: DataAggregationService, dataTransformationService: DataTransformationService, sqlReportService: SqlReportService, entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dataAggregationService + DataAggregationService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dataTransformationService + DataTransformationService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            sqlReportService + SqlReportService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + calculateResults + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + calculateResults(selectedReport: ReportEntity, fromDate: Date, toDate: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            selectedReport + ReportEntity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fromDate + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            toDate + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + errorDetails + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string | null + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : null +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + exportableData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + isError + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + mode + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + reportCalculation + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ReportCalculation | null + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : null +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + reports + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ReportEntity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DataAggregationService } from "../data-aggregation.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  getGroupingInformationString,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  GroupByDescription,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../report-row";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DatePipe, JsonPipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ViewTitleComponent } from "../../../core/common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { SelectReportComponent } from "./select-report/select-report.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ReportRowComponent } from "./report-row/report-row.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ObjectTableComponent } from "./object-table/object-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DataTransformationService } from "../../../core/export/data-transformation-service/data-transformation.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ReportEntity } from "../report-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ReportCalculation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  SqlReportService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../sql-report/sql-report.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { firstValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@RouteTarget("Reporting")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-reporting",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./reporting.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./reporting.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ViewTitleComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    SelectReportComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ReportRowComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ObjectTableComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    DatePipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    JsonPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class ReportingComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  reports: ReportEntity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  mode: ReportEntity["mode"]; // "reporting" (default), "exporting", "sql"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  isLoading: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  isError: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  errorDetails: string | null = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  reportCalculation: ReportCalculation | null = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  data: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  exportableData: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private dataAggregationService: DataAggregationService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private dataTransformationService: DataTransformationService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private sqlReportService: SqlReportService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityMapper.loadType(ReportEntity).then((res) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.reports = res.sort((a, b) => a.title?.localeCompare(b.title));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async calculateResults(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    selectedReport: ReportEntity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fromDate: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    toDate: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.isError = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.errorDetails = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.isLoading = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.data = await this.getReportResults(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      selectedReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      fromDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      toDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ).catch((reason) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.isLoading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.isError = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.errorDetails = reason.message || reason;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return Promise.reject(reason.message || reason);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.mode = selectedReport.mode ?? "reporting";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.exportableData =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.mode === "reporting" ? this.flattenReportRows() : this.data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.isLoading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async getReportResults(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    report: ReportEntity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<any[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    switch (report.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      case "exporting":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // Add one day because to date is exclusive
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const dayAfterToDate = moment(to).add(1, "day").toDate();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return this.dataTransformationService.queryAndTransformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          report.aggregationDefinitions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          dayAfterToDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      case "sql":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        let reportData = await this.sqlReportService.query(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          report,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.reportCalculation !== null,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.reportCalculation = await firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.sqlReportService.fetchReportCalculation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            reportData.calculation.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return reportData.data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return this.dataAggregationService.calculateReport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          report.aggregationDefinitions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private flattenReportRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    rows = this.data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): { label: string; result: any }[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const tableRows: { label: string; result: any }[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    rows.forEach((result) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      tableRows.push(this.createExportableRow(result.header));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      tableRows.push(...this.flattenReportRows(result.subRows));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return tableRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private createExportableRow(header: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    groupedBy: GroupByDescription[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    result: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }): { label: string; result: any } {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let resultLabel = header.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const groupByString = getGroupingInformationString(header.groupedBy);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (groupByString) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      resultLabel += " " + groupByString;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return { label: resultLabel, result: header.result };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <app-view-title
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  class="view-section"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  i18n="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Reports concern a group of for example children and include data about these
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    children in a certain date range
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Reports
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<app-select-report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [reports]="reports"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [loading]="isLoading"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [exportableData]="exportableData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  (calculateClick)="calculateResults($event.report, $event.from, $event.to)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  (dataChanged)="reportCalculation = null; data = null"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  class="view-section"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +></app-select-report>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<div style="color: gray; padding: 10px" *ngIf="reportCalculation" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  This report was calculated at:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  {{ reportCalculation?.endDate | date: "dd.MM.yyyy HH:mm" }} <br />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Click again on "Calculate" to re-calculate the report including any changes of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  records since then.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<div class="error-message" *ngIf="isError">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <h3 class="header" i18n>Something went wrong calculating the report</h3>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <div class="content">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <p i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Please try again. If you continue to see this error, contact the technical
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      support team.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <p>Error details:</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <code>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      {{ errorDetails | json }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    </code>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<app-report-row
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  *ngIf="data?.length > 0 && mode === 'reporting'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [rows]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +></app-report-row>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<app-object-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  *ngIf="data?.length > 0 && (mode === 'exporting' || mode === 'sql')"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  [objects]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +></app-object-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + ./reporting.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.work-panel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  padding-top: 20px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  padding-bottom: 20px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  border-radius: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.primary-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  background-color: white !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.view-section {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  margin-bottom: 1em;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.error-message {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  margin-top: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  border-radius: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  border: 1px solid colors.$grey-darker;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  .header {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    border-top-left-radius: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    border-top-right-radius: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    background: colors.$error;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    padding: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    color: colors.$grey-light;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  .content {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    border-bottom-left-radius: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    border-bottom-right-radius: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    padding-left: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    padding-right: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    padding-bottom: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    background: white;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    font-size: small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    color: colors.$text-secondary;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RollCallComponent.html b/documentation/components/RollCallComponent.html new file mode 100644 index 0000000000..fd528834f7 --- /dev/null +++ b/documentation/components/RollCallComponent.html @@ -0,0 +1,1878 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Displays the participants of the given event one by one to mark attendance status.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(enumService: ConfigurableEnumService, entityMapper: EntityMapperService, formDialog: FormDialogService, confirmationDialog: ConfirmationDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + eventEntity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Note + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The event to be displayed and edited.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + sortParticipantsBy +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              (optional) property name of the participant entities by which they are sorted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + complete +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Emitted when the roll call is finished and results can be saved.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + exit +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Emitted when the user wants to dismiss & leave the roll call view.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + finish + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +finish() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + goToFirst + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +goToFirst() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + goToLast + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +goToLast() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + goToNext + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +goToNext() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + goToParticipantWithIndex + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +goToParticipantWithIndex(newIndex: number) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              newIndex + number + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + goToPrevious + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +goToPrevious() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + includeInactive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + includeInactive() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + markAttendance + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +markAttendance(status: AttendanceStatusType) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              status + AttendanceStatusType + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + showDetails + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +showDetails() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + availableStatus + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : AttendanceStatusType[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              options available for selecting an attendance status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + children + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + currentAttendance + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : EventAttendance + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + currentChild + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + currentIndex + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The index, child and attendance that is currently being processed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + inactiveParticipants + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + isDirty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              whether any changes have been made to the model

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + isFirst +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + getisFirst() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + isLast +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + getisLast() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + isFinished +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + getisFinished() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Injectable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { animate, style, transition, trigger } from "@angular/animations";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  AttendanceStatusType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "../../model/attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Note } from "../../../notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EventAttendance } from "../../model/event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../../../../core/logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { sortByAttribute } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FormDialogService } from "../../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgClass, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ChildBlockComponent } from "../../../children/child-block/child-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RollCallTabComponent } from "./roll-call-tab/roll-call-tab.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  HAMMER_GESTURE_CONFIG,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  HammerGestureConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  HammerModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/platform-browser";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import Hammer from "hammerjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfigurableEnumService } from "../../../../core/basic-datatypes/configurable-enum/configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfirmationDialogService } from "../../../../core/common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +// Only allow horizontal swiping
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +class HorizontalHammerConfig extends HammerGestureConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override overrides = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    swipe: { direction: Hammer.DIRECTION_HORIZONTAL },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    pinch: { enable: false },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    rotate: { enable: false },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Displays the participants of the given event one by one to mark attendance status.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-roll-call",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./roll-call.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./roll-call.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  animations: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    trigger("completeRollCall", [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      transition("void => *", [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        style({ backgroundColor: "transparent" }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        animate(1000),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ChildBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgClass,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    RollCallTabComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    HammerModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providers: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      provide: HAMMER_GESTURE_CONFIG,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      useClass: HorizontalHammerConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class RollCallComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The event to be displayed and edited.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() eventEntity: Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * (optional) property name of the participant entities by which they are sorted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() sortParticipantsBy?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Emitted when the roll call is finished and results can be saved.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Output() complete = new EventEmitter<Note>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Emitted when the user wants to dismiss & leave the roll call view.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Output() exit = new EventEmitter();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The index, child and attendance that is currently being processed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  currentIndex = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  currentChild: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  currentAttendance: EventAttendance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * whether any changes have been made to the model
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  isDirty: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** options available for selecting an attendance status */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  availableStatus: AttendanceStatusType[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  children: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  inactiveParticipants: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private enumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (changes.eventEntity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.loadAttendanceStatusTypes();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.loadParticipants();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.setInitialIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (changes.sortParticipantsBy) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.sortParticipants();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Set the index of the first child that expects user input.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * This is the first entry of the list, if the user has never recorded attendance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * for this event. Else it is the first child without any attendance information
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * (i.e. got skipped or the user left at this child)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private setInitialIndex() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let index = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const entry of this.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (!this.eventEntity.getAttendance(entry.getId())?.status?.id) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      index += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // do not jump to end - if all participants are recorded, start with first instead
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (index >= this.children.length) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      index = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.goToParticipantWithIndex(index);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private loadAttendanceStatusTypes() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.availableStatus = this.enumService.getEnumValues<AttendanceStatusType>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async loadParticipants() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.children = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.inactiveParticipants = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const childId of this.eventEntity.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      let child: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        child = await this.entityMapper.load(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Entity.extractTypeFromId(childId),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          childId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          "Could not find child " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            childId +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            " for event " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            this.eventEntity.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.eventEntity.removeChild(childId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (child.isActive) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.children.push(child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.inactiveParticipants.push(child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.sortParticipants();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private sortParticipants() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this.sortParticipantsBy) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.children.sort(sortByAttribute<any>(this.sortParticipantsBy, "asc"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // also sort the participants in the Note entity itself for display in details view later
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.eventEntity.children = this.children.map((e) => e.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  markAttendance(status: AttendanceStatusType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.currentAttendance.status = status;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.isDirty = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.goToNext();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  goToParticipantWithIndex(newIndex: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.currentIndex = newIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.isFinished) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.complete.emit(this.eventEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.currentChild = this.children[this.currentIndex];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.currentAttendance = this.eventEntity.getAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.currentChild.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  goToPrevious() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.currentIndex - 1 >= 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.goToParticipantWithIndex(this.currentIndex - 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  goToNext() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.currentIndex + 1 <= this.children.length) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.goToParticipantWithIndex(this.currentIndex + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  goToFirst() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.goToParticipantWithIndex(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  goToLast() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // jump directly to completed state, i.e. beyond last participant index
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.goToParticipantWithIndex(this.children.length);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  get isFirst(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.currentIndex === 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  get isLast(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.currentIndex === this.children.length - 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  get isFinished(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.currentIndex >= this.children.length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  finish() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.exit.emit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  showDetails() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.formDialog.openView(this.eventEntity, "NoteDetails");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async includeInactive() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const confirmation = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      $localize`Also include archived participants?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      $localize`This event has some participants who are "archived". We automatically remove them from the attendance list for you. Do you want to also include archived participants for this event?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (confirmation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.children = [...this.children, ...this.inactiveParticipants];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.inactiveParticipants = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <!-- Individual Student's Page -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<div *ngIf="children?.length > 0" class="flex-column gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <mat-progress-bar
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mode="determinate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [value]="(currentIndex / children.length) * 100"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div class="progress-nav flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div style="margin-left: -10px">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="goToFirst()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="isFirst"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        class="button-skip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <fa-icon icon="angle-double-left"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="goToPrevious()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="isFirst"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        class="button-skip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <fa-icon icon="angle-left"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="progress-label flex-grow"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [style.visibility]="currentIndex < children.length ? 'visible' : 'hidden'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {{ currentIndex + 1 }} / {{ children.length }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="goToNext()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="isFinished"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        class="button-skip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <fa-icon icon="angle-right"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="goToLast()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="isFinished"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        class="button-skip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <fa-icon icon="angle-double-right"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div *ngIf="inactiveParticipants?.length > 0" style="margin-right: -10px">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="includeInactive()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="isFinished"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        color="warn"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        matTooltip="Excluded some archived participants. Click to include."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <fa-icon icon="warning"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-child-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    class="margin-small"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    *ngIf="!isFinished"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [entity]="currentChild"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [linkDisabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [tooltipDisabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </app-child-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div *ngIf="!isFinished && currentAttendance" class="tab-wrapper">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <app-roll-call-tab
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (swiperight)="goToPrevious()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (swipeleft)="goToNext()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      *ngFor="let child of children; let i = index"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="tab-body"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [class.tab-body-active]="currentIndex === i"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [position]="i - currentIndex"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          class="group-select-option"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          *ngFor="let option of availableStatus"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          (click)="markAttendance(option)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          [ngClass]="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            eventEntity.getAttendance(child).status.id === option.id
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              ? option.style
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              : ''
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            style="display: flex; flex-direction: row; padding: 16px; gap: 16px"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              *ngIf="eventEntity.getAttendance(child).status.id === option.id"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              icon="check"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            <p style="margin: 0">{{ option.label }}</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </app-roll-call-tab>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<!-- Completion Page -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<div *ngIf="isFinished" class="flex-column gap-regular margin-top-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div class="roll-call-complete" @completeRollCall>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <fa-icon icon="check-circle" size="3x"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Attendance completed|shows when the user has registered the attendance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        of all children
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (click)="finish()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Attendance completed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (click)="showDetails()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="finished-screen-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n="Open details of recorded event for review"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Review Details
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (click)="finish()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    color="primary"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    i18n="Back to overview button after finishing a roll call"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Back to Overview
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + ./roll-call.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@use "sass:color";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.group-select-option {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  box-sizing: border-box;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  border: 1px solid;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  border-top: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  &:first-child {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    border-top: 1px solid;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.roll-call-complete {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  flex-direction: column;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  place-content: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  place-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  height: 200px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  gap: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  background-color: color.adjust(colors.$success, $alpha: -0.5);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  border-radius: 4px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.progress-label {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  place-content: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.attendance-progress-bar {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  flex-direction: column;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  margin-top: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  margin-bottom: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.progress-nav {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  margin-top: -4px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  justify-content: space-between;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  align-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.tab-body {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  left: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  right: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  bottom: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  top: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  overflow-x: hidden;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.tab-body-active {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  flex-grow: 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  place-content: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  z-index: 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.tab-wrapper {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  overflow-x: hidden;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RollCallSetupComponent.html b/documentation/components/RollCallSetupComponent.html new file mode 100644 index 0000000000..4724f62a4c --- /dev/null +++ b/documentation/components/RollCallSetupComponent.html @@ -0,0 +1,1577 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/child-dev-project/attendance/add-day-attendance/roll-call-setup/roll-call-setup.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(entityMapper: EntityMapperService, attendanceService: AttendanceService, currentUser: CurrentUserSubject, formDialog: FormDialogService, alertService: AlertService, filerService: FilterService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                attendanceService + AttendanceService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                filerService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + eventSelected +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + createOneTimeEvent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +createOneTimeEvent() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + filterExistingEvents + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +filterExistingEvents(filter: DataFilter<Note>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                filter + DataFilter<Note> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + selectEvent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +selectEvent(event: NoteForActivitySetup) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                event + NoteForActivitySetup + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + setNewDate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + setNewDate(date: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                date + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + showLess + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + showLess() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + showMore + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + showMore() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + allActivities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : RecurringActivity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + date + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : new Date() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + dateField + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : NgModel + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + @ViewChild('dateField')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + entityType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : Note +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + existingEvents + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : NoteForActivitySetup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Readonly + FILTER_VISIBLE_THRESHOLD + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : 4 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                filters are displayed in the UI only if at least this many events are listed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This avoids displaying irrelevant filters for an empty or very short list.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + filterConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [{ id: "category" }, { id: "schools" }] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + filteredExistingEvents + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : NoteForActivitySetup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + showingAll + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + visibleActivities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : RecurringActivity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AttendanceService } from "../../attendance.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Note } from "../../../notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { RecurringActivity } from "../../model/recurring-activity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FormDialogService } from "../../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AlertService } from "../../../../core/alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AlertDisplay } from "../../../../core/alerts/alert-display";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FormsModule, NgModel } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterService } from "../../../../core/filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterConfig } from "../../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatDatepickerModule } from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Angulartics2OnModule } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterComponent } from "../../../../core/filter/filter/filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ActivityCardComponent } from "../../activity-card/activity-card.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { CurrentUserSubject } from "../../../../core/session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DataFilter } from "../../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-roll-call-setup",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./roll-call-setup.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./roll-call-setup.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    Angulartics2OnModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FilterComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ActivityCardComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class RollCallSetupComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  date = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  existingEvents: NoteForActivitySetup[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filteredExistingEvents: NoteForActivitySetup[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() eventSelected = new EventEmitter<Note>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  allActivities: RecurringActivity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  visibleActivities: RecurringActivity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filterConfig: FilterConfig[] = [{ id: "category" }, { id: "schools" }];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityType = Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  showingAll = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild("dateField") dateField: NgModel;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isLoading = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * filters are displayed in the UI only if at least this many events are listed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * This avoids displaying irrelevant filters for an empty or very short list.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  readonly FILTER_VISIBLE_THRESHOLD = 4;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private filerService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.initAvailableEvents();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private async initAvailableEvents() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.isLoading = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.existingEvents =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      await this.attendanceService.getEventsWithUpdatedParticipants(this.date);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.loadActivities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.sortEvents();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filteredExistingEvents = this.existingEvents;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.isLoading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private async loadActivities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.allActivities = await this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .loadType(RecurringActivity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .then((res) => res.filter((a) => a.isActive));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.showingAll) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.visibleActivities = this.allActivities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // TODO implement a generic function that finds the property where a entity has relations to another entity type (e.g. `authors` for `Note` when looking for `User`) to allow dynamic checks
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.visibleActivities = this.allActivities.filter((a) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        a.isAssignedTo(this.currentUser.value?.getId()),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (this.visibleActivities.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.visibleActivities = this.allActivities.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          (a) => a.assignedTo.length === 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (this.visibleActivities.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.visibleActivities = this.allActivities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.showingAll = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newEvents = await Promise.all(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.visibleActivities.map((activity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.createEventForActivity(activity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.existingEvents = this.existingEvents.concat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ...newEvents.filter((e) => !!e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async showMore() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.showingAll = !this.showingAll;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.initAvailableEvents();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async showLess() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.showingAll = !this.showingAll;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.initAvailableEvents();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async setNewDate(date: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.date = date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.initAvailableEvents();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private async createEventForActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    activity: RecurringActivity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<NoteForActivitySetup> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.existingEvents.find((e) => e.relatesTo === activity.getId())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const event = (await this.attendanceService.createEventForActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      activity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    )) as NoteForActivitySetup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.currentUser.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      event.authors = [this.currentUser.value.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    event.isNewFromActivity = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return event;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private sortEvents() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const calculateEventPriority = (event: Note) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      let score = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const activityAssignedUsers = this.allActivities.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (a) => a.getId() === event.relatesTo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      )?.assignedTo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // use parent activities' assigned users and only fall back to event if necessary
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const assignedUsers = activityAssignedUsers ?? event.authors;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!RecurringActivity.isActivityEventNote(event)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        // show one-time events first
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        score += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (assignedUsers.includes(this.currentUser.value?.getId())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        score += 2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return score;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.existingEvents.sort(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (a, b) => calculateEventPriority(b) - calculateEventPriority(a),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  createOneTimeEvent() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newNote = Note.create(new Date());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.currentUser.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      newNote.authors = [this.currentUser.value.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.formDialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .openView(newNote, "NoteDetails")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .subscribe((createdNote: Note) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (createdNote) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.existingEvents.push(createdNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filterExistingEvents(filter: DataFilter<Note>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const predicate = this.filerService.getFilterPredicate(filter);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filteredExistingEvents = this.existingEvents.filter(predicate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selectEvent(event: NoteForActivitySetup) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.dateField.valid) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.eventSelected.emit(event);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.alertService.addWarning(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        $localize`:Alert when selected date is invalid:Invalid Date`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        AlertDisplay.TEMPORARY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +type NoteForActivitySetup = Note & { isNewFromActivity?: boolean };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div class="top-control">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      i18n="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        Event-Record label|Record an event for a particular date that is to be
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        inputted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      >Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      matInput
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      #dateField="ngModel"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      [(ngModel)]="date"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      required
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      [matDatepicker]="datePicker"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (dateChange)="setNewDate($event.value)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-datepicker-toggle
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      [for]="datePicker"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      angularticsCategory="Record Attendance"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      angularticsAction="select_date"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ></mat-datepicker-toggle>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <mat-datepicker #datePicker></mat-datepicker>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <app-filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    *ngIf="existingEvents.length >= FILTER_VISIBLE_THRESHOLD"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    class="flex-row flex-wrap gap-small"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [filterConfig]="filterConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [entityType]="entityType"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [entities]="existingEvents"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [onlyShowRelevantFilterOptions]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (filterObjChange)="filterExistingEvents($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ></app-filter>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<div *ngIf="isLoading" class="process-spinner">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <mat-progress-bar mode="indeterminate"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<div class="cards-list" *ngIf="!isLoading">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <app-activity-card
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    class="pointer"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    *ngFor="let event of filteredExistingEvents"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [event]="event"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    [recurring]="event.isNewFromActivity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="selectEvent(event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </app-activity-card>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<div class="padding-top-regular gap-regular flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="showingAll ? showLess() : showMore()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angularticsCategory="Record Attendance"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angularticsAction="show_more"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    class="padding-right-small"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <span *ngIf="showingAll" i18n="Show less entries of a list">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      Show less
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <span *ngIf="!showingAll" i18n="Show more entries of a list">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      Show more
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    i18n="Not listed|Allows to create a new event"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    mat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    (click)="createOneTimeEvent()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angularticsCategory="Record Attendance"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    angularticsAction="create_onetime_event"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    My event is not listed ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./roll-call-setup.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @use "mixins/grid-layout";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.top-control {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  position: sticky;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  top: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /* make this visible while other contents go "under" this top control */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  z-index: 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /* These small hacks remove the global margin and re-apply them as padding.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +     This way, the margin stays consistent and scrolling works
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +     as intended (there is no overflow left or right)  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  margin-left: -(sizes.$margin-main-view-left);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  padding-left: sizes.$margin-main-view-left;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  margin-right: -(sizes.$margin-main-view-right);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  padding-right: sizes.$margin-main-view-right;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  margin-top: -(sizes.$margin-main-view-top);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  padding-top: sizes.$margin-main-view-top;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  background-color: colors.$background;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.cards-list {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @include grid-layout.adaptive(350px, 414px);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.process-spinner {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  justify-content: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RollCallTabComponent.html b/documentation/components/RollCallTabComponent.html new file mode 100644 index 0000000000..f4877a5b04 --- /dev/null +++ b/documentation/components/RollCallTabComponent.html @@ -0,0 +1,636 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call-tab/roll-call-tab.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  HostBindings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + position +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  HostBindings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + @translateTab + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + animationState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + @HostBinding('@translateTab')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + position +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + setposition(position: number) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  position + number + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, HostBinding, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  animate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  state,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  style,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  transition,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  trigger,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/animations";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * These position states are used internally as animation states for the tab body. Setting the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * position state to left, right, or center will transition the tab body from its current
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * position to its respective state. If there is no current position (void, in the case of a new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * tab body), then there will be no transition animation to its state.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * In the case of a new tab body that should immediately be centered with an animating transition,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * then left-origin-center or right-origin-center can be used, which will use left or right as its
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * pseudo-prior state.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +type PositionState = "left" | "center" | "right";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-roll-call-tab",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  template: "<ng-content></ng-content>",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./roll-call-tab.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  animations: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    trigger("translateTab", [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // Transitions to `none` instead of 0, because some browsers might blur the content.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      state("center, void", style({ transform: "none" })),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // If the tab is either on the left or right, we additionally add a `min-height` of 1px
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // in order to ensure that the element has a height before its state changes. This is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // necessary because Chrome does seem to skip the transition in RTL mode if the element does
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // not have a static height and is not rendered. See related issue: #9465
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      state(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        "left",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        style({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          transform: "translate(-110%)",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          minHeight: "1px",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          visibility: "hidden",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      state(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        "right",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        style({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          transform: "translate(110%)",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          minHeight: "1px",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          visibility: "hidden",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      transition("void => *", []),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      transition(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        "* => left, * => right, left => center, right => center",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        animate("800ms cubic-bezier(0.35, 0, 0.25, 1)"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class RollCallTabComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  set position(position: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let posState: PositionState;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (position < 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      posState = "left";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else if (position > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      posState = "right";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      posState = "center";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.animationState = posState;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @HostBinding("@translateTab") animationState = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./roll-call-tab.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  :host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  display: block !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RoutedViewComponent.html b/documentation/components/RoutedViewComponent.html new file mode 100644 index 0000000000..246bd1b707 --- /dev/null +++ b/documentation/components/RoutedViewComponent.html @@ -0,0 +1,628 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/ui/routed-view/routed-view.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Wrapper component for a primary, full page view +that takes parameters from the route and passes these on to normal @Input properties.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This allows to develop functional feature components in a way to easily reuse them for display +as a full page view or in a modal dialog.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + AbstractViewComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(route: ActivatedRoute, injector: Injector) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    route + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    injector + Injector + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + component + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + config + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + componentInjector + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Injector | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from AbstractViewComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + viewContext + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ViewComponentContext + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from AbstractViewComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Injector } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ActivatedRoute } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ViewConfig } from "../../config/dynamic-routing/view-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponentPipe } from "../../config/dynamic-components/dynamic-component.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { AbstractViewComponent } from "../abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatDialogActions } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Wrapper component for a primary, full page view
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * that takes parameters from the route and passes these on to normal @Input properties.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This allows to develop functional feature components in a way to easily reuse them for display
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * as a full page view or in a modal dialog.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@RouteTarget("RoutedView")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-routed-view",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DynamicComponentPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatDialogActions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./routed-view.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class RoutedViewComponent<T = any> extends AbstractViewComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  component: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  config: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(route: ActivatedRoute, injector: Injector) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super(injector, false);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    route.data.subscribe((data: { component: string } & ViewConfig<T>) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.component = data.component;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // pass all other config properties to the component as config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.config = Object.assign({}, data.config);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // merge updated config properties from route params
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      route.paramMap.subscribe((params) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        const config = this.config;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        for (const key of params.keys) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          config[key] = params.get(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.config = { ...config };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="flex-row flex-wrap">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <div class="flex-grow">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      *ngTemplateOutlet="viewContext?.title?.template"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    *ngTemplateOutlet="viewContext?.actions?.template"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<ng-container
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  *ngComponentOutlet="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    component | dynamicComponent | async;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    inputs: config;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    injector: componentInjector
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/RowDetailsComponent.html b/documentation/components/RowDetailsComponent.html new file mode 100644 index 0000000000..805d42866e --- /dev/null +++ b/documentation/components/RowDetailsComponent.html @@ -0,0 +1,734 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/form-dialog/row-details/row-details.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Displays a single row of a table as a dialog component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(data: DetailsComponentData, formService: EntityFormService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      data + DetailsComponentData + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      formService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + Public + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : DetailsComponentData + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + fieldGroups + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + form + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityForm<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + tempEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + viewOnlyColumns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FormFieldConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "../../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DialogCloseComponent } from "../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFormComponent } from "../../common-components/entity-form/entity-form/entity-form.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { PillComponent } from "../../common-components/pill/pill.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DialogButtonsComponent } from "../dialog-buttons/dialog-buttons.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityArchivedInfoComponent } from "../../entity-details/entity-archived-info/entity-archived-info.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FieldGroup } from "../../entity-details/form/field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFieldEditComponent } from "../../common-components/entity-field-edit/entity-field-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFieldViewComponent } from "../../common-components/entity-field-view/entity-field-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Data interface that must be given when opening the dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface DetailsComponentData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** The row to edit / view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** The columns to edit / view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  columns: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** Additional columns that only provide context information */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  viewOnlyColumns?: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Displays a single row of a table as a dialog component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-row-details",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./row-details.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityFormComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    PillComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DialogButtonsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityArchivedInfoComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityFieldEditComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityFieldViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  viewProviders: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    { provide: ViewComponentContext, useValue: new ViewComponentContext(true) },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class RowDetailsComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  form: EntityForm<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  viewOnlyColumns: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  tempEntity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Inject(MAT_DIALOG_DATA) public data: DetailsComponentData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private formService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.init(this.data)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .then()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .catch((reason) => console.log(reason));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async init(data: DetailsComponentData) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.form = await this.formService.createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      data.columns,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      data.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.enableSaveWithoutChangesIfNew(data.entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.fieldGroups = data.columns.map((col) => ({ fields: [col] }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.tempEntity = this.data.entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.form.formGroup.valueChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .subscribe((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        const dynamicConstructor: any = data.entity.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.tempEntity = Object.assign(new dynamicConstructor(), value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.viewOnlyColumns = data.viewOnlyColumns;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private enableSaveWithoutChangesIfNew(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (entity.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // could check here that at least some fields hold a value but the naive heuristic to allow save of all new seems ok
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.form.formGroup.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <app-dialog-close mat-dialog-close></app-dialog-close>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +<mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <div class="flex-column gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <app-entity-archived-info [entity]="data.entity"></app-entity-archived-info>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <app-entity-form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      *ngIf="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [fieldGroups]="fieldGroups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [entity]="data.entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </app-entity-form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <div *ngFor="let col of viewOnlyColumns">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <app-pill
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        [matTooltip]="col.description"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        [style.background-color]="tempEntity.getColor()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        class="mat-body-strong"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <app-entity-field-view
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          [field]="col"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          [entity]="tempEntity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          showLabel="inline"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ></app-entity-field-view>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      </app-pill>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +<mat-dialog-actions *ngIf="form">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <app-dialog-buttons [form]="form.formGroup" [entity]="data.entity" />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/SearchComponent.html b/documentation/components/SearchComponent.html new file mode 100644 index 0000000000..ee8eaffd7e --- /dev/null +++ b/documentation/components/SearchComponent.html @@ -0,0 +1,1214 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/ui/search/search.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        General search box that provides results out of any kind of entities from the system +as soon as the user starts typing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This is usually displayed in the app header to be available to the user anywhere, allowing to navigate quickly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(router: Router, userRoleGuard: UserRoleGuard, searchService: SearchService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        userRoleGuard + UserRoleGuard + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        searchService + SearchService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + clickOption + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + clickOption(optionElement) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        optionElement + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + searchResults + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + searchResults(next: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        next + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + formControl + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : new FormControl("") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + ILLEGAL_INPUT + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 5 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + INPUT_DEBOUNCE_TIME_MS + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 400 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + MIN_CHARACTERS_FOR_SEARCH + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 2 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + NO_RESULTS + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 3 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + NOTHING_ENTERED + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + results + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Observable<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + SEARCH_IN_PROGRESS + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 2 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + SHOW_RESULTS + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 4 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + state + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : this.NOTHING_ENTERED +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + TOO_FEW_CHARACTERS + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : 1 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ChangeDetectionStrategy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ViewEncapsulation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { concatMap, debounceTime, tap } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormControl, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { UserRoleGuard } from "../../permissions/permission-guard/user-role.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatAutocompleteModule } from "@angular/material/autocomplete";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { AsyncPipe, NgForOf, NgSwitch, NgSwitchCase } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityBlockComponent } from "../../basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SearchService } from "./search.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * General search box that provides results out of any kind of entities from the system
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * as soon as the user starts typing.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This is usually displayed in the app header to be available to the user anywhere, allowing to navigate quickly.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-search",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./search.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./search.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  encapsulation: ViewEncapsulation.None,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatAutocompleteModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgSwitch,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgSwitchCase,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class SearchComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static INPUT_DEBOUNCE_TIME_MS = 400;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MIN_CHARACTERS_FOR_SEARCH = 2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly NOTHING_ENTERED = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly TOO_FEW_CHARACTERS = 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly SEARCH_IN_PROGRESS = 2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly NO_RESULTS = 3;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly SHOW_RESULTS = 4;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly ILLEGAL_INPUT = 5;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  state = this.NOTHING_ENTERED;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  formControl = new FormControl("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  results: Observable<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private userRoleGuard: UserRoleGuard,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private searchService: SearchService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.results = this.formControl.valueChanges.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      debounceTime(SearchComponent.INPUT_DEBOUNCE_TIME_MS),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      tap((next) => (this.state = this.updateState(next))),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      concatMap((next: string) => this.searchResults(next)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      untilDestroyed(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private updateState(next: any): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (typeof next !== "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this.ILLEGAL_INPUT;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (next.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this.NOTHING_ENTERED;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!this.isRelevantSearchInput(next)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this.ILLEGAL_INPUT;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return next.length < this.MIN_CHARACTERS_FOR_SEARCH
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ? this.TOO_FEW_CHARACTERS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      : this.SEARCH_IN_PROGRESS;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async searchResults(next: string): Promise<Entity[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (this.state !== this.SEARCH_IN_PROGRESS) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const entities = await this.searchService.getSearchResults(next);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const filtered = this.prepareResults(entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.state = filtered.length === 0 ? this.NO_RESULTS : this.SHOW_RESULTS;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return filtered;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async clickOption(optionElement) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    await this.router.navigate([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      optionElement.value.getConstructor().route,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      optionElement.value.getId(true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.formControl.setValue("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Check if the input should start an actual search.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Only search for words starting with a char or number -> no searching for space or no input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param searchText
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private isRelevantSearchInput(searchText: string): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return /^[a-zA-Z]+|\d+$/.test(searchText);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private prepareResults(entities: Entity[]): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return entities.filter((entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.userRoleGuard.checkRoutePermissions(entity.getConstructor().route),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="white mat-subtitle-2 remove-margin-bottom full-width">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-form-field class="full-width searchbar">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <fa-icon matIconPrefix class="padding-right-small" icon="search"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="full-width search-input"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      matInput
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      title="Search"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n-placeholder="Search label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      placeholder="Search"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [formControl]="formControl"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [matAutocomplete]="autoResults"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <mat-autocomplete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    #autoResults="matAutocomplete"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    (optionSelected)="clickOption($event.option)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <ng-container [ngSwitch]="state">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        *ngSwitchCase="TOO_FEW_CHARACTERS"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        class="result-hint"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [disabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <p
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          i18n="The user has inserted too few characters to start a search"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          class="remove-margin-bottom"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          Insert at least {{ MIN_CHARACTERS_FOR_SEARCH }} characters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        class="result-hint"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        *ngSwitchCase="SEARCH_IN_PROGRESS"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [disabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <p i18n="A search is in progress" class="remove-margin-bottom">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          Search in progress...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        class="result-hint"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        *ngSwitchCase="NO_RESULTS"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [disabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <p i18n="No search results are available" class="remove-margin-bottom">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          There were no results
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        class="result-hint"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        *ngSwitchCase="ILLEGAL_INPUT"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        [disabled]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <p
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          i18n="Invalid characters were entered into the search field"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          class="remove-margin-bottom"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          Please only enter numbers or letters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-option *ngFor="let res of results | async" [value]="res">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <app-entity-block [entityToDisplay]="res"></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </mat-autocomplete>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./search.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.result-hint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  background-color: colors.$grey-light;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.search-input {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  caret-color: white !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.search-input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.search-input::placeholder {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  color: white !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.searchbar {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  margin-top: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  .mat-mdc-form-field-focus-overlay {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    background-color: transparent !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  .mdc-text-field--filled .mdc-line-ripple::before,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  .mdc-text-field--active .mdc-line-ripple::before,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  .mdc-text-field--filled .mdc-line-ripple::after {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    border-bottom-color: white !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/SelectReportComponent.html b/documentation/components/SelectReportComponent.html new file mode 100644 index 0000000000..0e317760ca --- /dev/null +++ b/documentation/components/SelectReportComponent.html @@ -0,0 +1,989 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/reporting/reporting/select-report/select-report.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + exportableData +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + loading +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + reports +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ReportEntity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + calculateClick +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + dataChanged +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + calculate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +calculate() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + dateChange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +dateChange() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + reportChange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +reportChange() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + fromDate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + isDateRangeReport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          whether the currently selected report includes filter parameters for a "from" - "to" date range

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + selectedReport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ReportEntity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + toDate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { JsonPipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatDatepickerModule } from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ExportDataDirective } from "../../../../core/export/export-data-directive/export-data.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ReportEntity } from "../../report-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-select-report",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./select-report.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./select-report.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ExportDataDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    JsonPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class SelectReportComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() reports: ReportEntity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() loading: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() exportableData: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() calculateClick = new EventEmitter<CalculateReportOptions>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() dataChanged = new EventEmitter<void>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selectedReport: ReportEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  fromDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  toDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** whether the currently selected report includes filter parameters for a "from" - "to" date range */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isDateRangeReport: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (changes.hasOwnProperty("reports")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (this.reports?.length === 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.selectedReport = this.reports[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.checkDateRangeReport();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  calculate(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this.isDateRangeReport) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.fromDate = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.toDate = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.calculateClick.emit({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      report: this.selectedReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      from: this.fromDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      to: this.toDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  reportChange() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dataChanged.emit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.checkDateRangeReport();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  dateChange() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dataChanged.emit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private checkDateRangeReport(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.selectedReport.mode !== "sql") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.isDateRangeReport = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.isDateRangeReport =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.selectedReport.neededArgs.indexOf("from") !== -1 ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.selectedReport.neededArgs.indexOf("to") !== -1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +interface CalculateReportOptions {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  report: ReportEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  from: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  to: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <div *ngIf="!reports || reports.length === 0">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <p i18n>Reports have not been configured for you yet.</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    href="mailto:info@aam-digital.com?subject=Set up reports"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    i18n="Button if no reports are configured yet"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    Ask for a setup call
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +<div *ngIf="reports?.length > 0" class="work-panel">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <div class="flex-row flex-wrap gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <mat-form-field class="flex-grow">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <mat-label i18n>Select Report</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <mat-select
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [(ngModel)]="selectedReport"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [disabled]="loading"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (ngModelChange)="reportChange()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <mat-option *ngFor="let report of reports" [value]="report">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          {{ report.title }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </mat-select>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <mat-form-field *ngIf="isDateRangeReport">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <mat-label i18n>Enter a date range</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <mat-date-range-input [rangePicker]="picker" [disabled]="loading">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          [(ngModel)]="fromDate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          (ngModelChange)="dateChange()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          matStartDate
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          i18n-placeholder="Date selection for the reporting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          placeholder="Start date"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          [(ngModel)]="toDate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          (ngModelChange)="dateChange()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          matEndDate
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          i18n-placeholder="Date selection for the reporting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          placeholder="End date"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      </mat-date-range-input>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <mat-datepicker-toggle
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        [for]="picker"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ></mat-datepicker-toggle>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <mat-date-range-picker #picker></mat-date-range-picker>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      #calculateButton
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      class="primary-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [disabled]="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        !selectedReport ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (isDateRangeReport && !fromDate && !toDate) ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        loading
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (click)="calculate()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      i18n="Calculate the results for a report"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      angularticsCategory="Reporting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      angularticsAction="calculate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [angularticsLabel]="selectedReport?.title"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      matTooltip="Please select a report and a date range"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [matTooltipDisabled]="!calculateButton.disabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      style="pointer-events: all"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Calculate
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      class="primary-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [appExportData]="exportableData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [disabled]="!exportableData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      filename="report"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      style="float: right"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      angularticsCategory="Reporting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      angularticsAction="export"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [angularticsLabel]="selectedReport?.title"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        icon="download"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        class="standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        aria-label="download csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      <ng-container i18n="Button to download data"> Download</ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <div style="clear: both; padding-bottom: 5px"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <mat-progress-bar mode="indeterminate" *ngIf="loading"></mat-progress-bar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ./select-report.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/SetupWizardButtonComponent.html b/documentation/components/SetupWizardButtonComponent.html new file mode 100644 index 0000000000..fa3486ab4d --- /dev/null +++ b/documentation/components/SetupWizardButtonComponent.html @@ -0,0 +1,591 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/admin/setup-wizard/setup-wizard-button/setup-wizard-button.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(entityMapper: EntityMapperService, router: Router) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + navigateToWizard + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +navigateToWizard() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + showSetupWizard + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatButton } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Config } from "../../../config/config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  CONFIG_SETUP_WIZARD_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  SetupWizardConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../setup-wizard-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Logging } from "../../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-setup-wizard-button",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [FaIconComponent, MatButton],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./setup-wizard-button.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./setup-wizard-button.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class SetupWizardButtonComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  showSetupWizard: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .load(Config, CONFIG_SETUP_WIZARD_ID)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .then((r: Config<SetupWizardConfig>) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.updateStatus(r.data);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (!r.data.finished && r.data.openOnStart) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.navigateToWizard();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .catch((e) => Logging.debug("No Setup Wizard Config found"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .receiveUpdates<Config<SetupWizardConfig>>(Config)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        untilDestroyed(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter(({ entity }) => entity.getId() === CONFIG_SETUP_WIZARD_ID),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .subscribe((update) => this.updateStatus(update.entity.data));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private updateStatus(config: SetupWizardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.showSetupWizard = !config.finished;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  navigateToWizard() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.router.navigate(["/admin/setup-wizard"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @if (showSetupWizard) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    mat-flat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    (click)="navigateToWizard()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    class="button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    style="border-radius: 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    i18n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <fa-icon icon="person-digging"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    Setup Wizard
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + ./setup-wizard-button.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            .button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  border-top: solid 1px rgba(0, 0, 0, 0.12);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  border-radius: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  overflow: hidden;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/SetupWizardComponent.html b/documentation/components/SetupWizardComponent.html new file mode 100644 index 0000000000..6083c544f1 --- /dev/null +++ b/documentation/components/SetupWizardComponent.html @@ -0,0 +1,826 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/admin/setup-wizard/setup-wizard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + finishWizard + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + finishWizard() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + onNextStep + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +onNextStep(newStep: number) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              newStep + number + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + completedSteps + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : number[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [0] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + currentStep + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Readonly + LOCAL_STORAGE_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "SETUP_WIZARD_STATUS" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + steps + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : SetupWizardStep[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatStep,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatStepper,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatStepperIcon,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  MatStepperNext,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/material/stepper";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatActionList, MatListItem } from "@angular/material/list";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButton } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Config } from "../../config/config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  CONFIG_SETUP_WIZARD_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  SetupWizardConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  SetupWizardStep,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "./setup-wizard-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MarkdownComponent } from "ngx-markdown";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-setup-wizard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatStepper,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatStep,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatActionList,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatListItem,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    RouterLink,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatStepperNext,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatStepperIcon,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MarkdownComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTooltip,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./setup-wizard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrl: "./setup-wizard.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class SetupWizardComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  readonly LOCAL_STORAGE_KEY = "SETUP_WIZARD_STATUS";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  steps: SetupWizardStep[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  currentStep: number = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  completedSteps: number[] = [0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private configEntity: Config<SetupWizardConfig>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(private entityMapper: EntityMapperService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    await this.loadSetupConfig();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.loadLocalStatus();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async loadSetupConfig() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.configEntity = await this.entityMapper.load<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Config<SetupWizardConfig>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >(Config, CONFIG_SETUP_WIZARD_ID);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.steps = this.configEntity?.data.steps;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Logging.debug("no setup wizard config loaded", e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private loadLocalStatus() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const storedStatus = localStorage.getItem(this.LOCAL_STORAGE_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (storedStatus) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const parsedStatus = JSON.parse(storedStatus);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // set delayed to ensure steps are loaded first
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      setTimeout(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.currentStep = parsedStatus.currentStep;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.completedSteps = parsedStatus.completedSteps;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  onNextStep(newStep: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.currentStep = newStep;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this.completedSteps.includes(newStep)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.completedSteps.push(newStep);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.LOCAL_STORAGE_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      JSON.stringify({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        currentStep: this.currentStep,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        completedSteps: this.completedSteps,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async finishWizard() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.configEntity.data.finished = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    await this.entityMapper.save(this.configEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <mat-stepper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [selectedIndex]="currentStep"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  (selectedIndexChange)="onNextStep($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <!-- overwrite icons to keep simple numbered steps -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <ng-template matStepperIcon="edit" let-index="index">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {{ index + 1 }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <ng-template matStepperIcon="done" let-index="index">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {{ index + 1 }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @for (step of steps; track step; let index = $index; let last = $last) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-step
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [label]="step.title"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [completed]="completedSteps?.includes(index)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <markdown>{{ step.text }}</markdown>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-action-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        @for (action of step.actions; track action.link) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          <button mat-list-item [routerLink]="action.link">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            {{ action.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-action-list>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      @if (!last) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <button mat-raised-button matStepperNext color="accent" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          mat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          routerLink=""
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          (click)="finishWizard()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          matTooltip="We will hide the setup wizard from the main menu as you finish it here. You can still access it from the admin screen."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          i18n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Finish
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </mat-step>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-stepper>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ShortcutDashboardComponent.html b/documentation/components/ShortcutDashboardComponent.html new file mode 100644 index 0000000000..2b5150ccfa --- /dev/null +++ b/documentation/components/ShortcutDashboardComponent.html @@ -0,0 +1,829 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/dashboard-widgets/shortcut-dashboard-widget/shortcut-dashboard/shortcut-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A simple list of shortcuts displayed as a dashboard widget for easy access to important navigation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(routePermissionsService: RoutePermissionsService, locationStrategy: LocationStrategy, clipboard: Clipboard, alertService: AlertService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                routePermissionsService + RoutePermissionsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                locationStrategy + LocationStrategy + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                clipboard + Clipboard + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + shortcuts +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                displayed entries, each representing one line displayed as a shortcut

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + copyAbsoluteLink2Clipboard + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + copyAbsoluteLink2Clipboard(link: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                link + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + _shortcuts + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + shortcuts +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + getshortcuts() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + setshortcuts(items: MenuItem[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                displayed entries, each representing one line displayed as a shortcut

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                items + MenuItem[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MenuItem } from "../../../../core/ui/navigation/menu-item";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FaDynamicIconComponent } from "../../../../core/common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { RoutePermissionsService } from "../../../../core/config/dynamic-routing/route-permissions.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatIconButton } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { LocationStrategy } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AlertService } from "../../../../core/alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Clipboard } from "@angular/cdk/clipboard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A simple list of shortcuts displayed as a dashboard widget for easy access to important navigation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("ShortcutDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-shortcut-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./shortcut-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./shortcut-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FaDynamicIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    RouterLink,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatIconButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTooltip,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ShortcutDashboardComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** displayed entries, each representing one line displayed as a shortcut */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set shortcuts(items: MenuItem[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.routePermissionsService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .filterPermittedRoutes(items)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .then((res) => (this._shortcuts = res));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  get shortcuts(): MenuItem[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this._shortcuts;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _shortcuts: MenuItem[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private routePermissionsService: RoutePermissionsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private locationStrategy: LocationStrategy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private clipboard: Clipboard,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async copyAbsoluteLink2Clipboard(link: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const externalLink =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      window.location.origin + this.locationStrategy.prepareExternalUrl(link);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const success = this.clipboard.copy(externalLink);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (success) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.alertService.addInfo("Link copied: " + externalLink);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  icon="external-link-alt"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  theme="general"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  subtitle="Quick actions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  i18n-subtitle="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    Title of dashboard widget that shows a list of certain actions a user can
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    click on
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  "
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [entries]="_shortcuts"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <div class="table-container">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <table mat-table aria-label="Quick actions">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <!-- Table header only for assistive technologies like screen readers -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <tr hidden>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <th scope="col">Icon</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <th scope="col">Label</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <ng-container matColumnDef="icon">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <td *matCellDef="let row" class="pointer" [routerLink]="row.link">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          <app-fa-dynamic-icon [icon]="row.icon"></app-fa-dynamic-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <ng-container matColumnDef="label">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <td *matCellDef="let row" class="pointer" [routerLink]="row.link">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          {{ row.label }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <ng-container matColumnDef="copy">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        <td *matCellDef="let row" class="text-align-end">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            (click)="copyAbsoluteLink2Clipboard(row.link)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            matTooltip="Copy the link to share or paste it somewhere else"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            <fa-icon [icon]="['far', 'copy']" size="xs"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <tr mat-row *matRowDef="let row; columns: ['icon', 'label', 'copy']"></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./shortcut-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @use "../../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.table-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  margin-left: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  margin-right: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ShowFileComponent.html b/documentation/components/ShowFileComponent.html new file mode 100644 index 0000000000..6efcb98a85 --- /dev/null +++ b/documentation/components/ShowFileComponent.html @@ -0,0 +1,498 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/file/show-file/show-file.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This simple component can be used to open a file in a new window, if the user's browser is blocking popups.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(link: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  link + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + showFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +showFile() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This simple component can be used to open a file in a new window, if the user's browser is blocking popups.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-show-file",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./show-file.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./show-file.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [MatDialogModule, MatButtonModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class ShowFileComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(@Inject(MAT_DIALOG_DATA) private link: string) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  showFile(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    window.open(this.link, "_blank");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <h2 mat-dialog-title i18n="Header of popup">File downloaded</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +<mat-dialog-content class="content">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    (click)="showFile()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    i18n="Button to show a downloaded file"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    Show File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <em i18n="Text in popup"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      >To automatically open files after they have been downloaded, please allow
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      popups for this page in your browser.</em
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./show-file.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  .content {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  text-align: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  max-width: 300px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/SupportComponent.html b/documentation/components/SupportComponent.html new file mode 100644 index 0000000000..478279301b --- /dev/null +++ b/documentation/components/SupportComponent.html @@ -0,0 +1,1365 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/support/support/support.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(syncState: SyncStateSubject, sessionSubject: SessionSubject, currentUserSubject: CurrentUserSubject, sw: SwUpdate, database: PouchDatabase, confirmationDialog: ConfirmationDialogService, http: HttpClient, backupService: BackupService, downloadService: DownloadService, window: Window, location: Location) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    syncState + SyncStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sessionSubject + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    currentUserSubject + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sw + SwUpdate + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    database + PouchDatabase + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http + HttpClient + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    backupService + BackupService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    downloadService + DownloadService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    window + Window + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + downloadLocalDatabase + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + downloadLocalDatabase() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + resetApplication + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + resetApplication() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + sendReport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +sendReport() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + appVersion + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + currentSyncState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + currentUser + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + dbInfo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + lastRemoteLogin + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + lastSync + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + sessionInfo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : SessionInfo + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + storageInfo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + swLog + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "not available" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + swStatus + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + userAgent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LOCATION_TOKEN, WINDOW_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SyncState } from "../../session/session-states/sync-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SwUpdate } from "@angular/service-worker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import * as Sentry from "@sentry/angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfirmationDialogService } from "../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { environment } from "../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SessionInfo, SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { firstValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatExpansionModule } from "@angular/material/expansion";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { PouchDatabase } from "../../database/pouch-database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { BackupService } from "../../admin/backup/backup.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DownloadService } from "../../export/download-service/download.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SyncStateSubject } from "../../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SyncService } from "../../database/sync.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { KeycloakAuthService } from "../../session/auth/keycloak/keycloak-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { CurrentUserSubject } from "../../session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-support",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./support.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./support.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [MatExpansionModule, MatButtonModule, MatTooltipModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class SupportComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  sessionInfo: SessionInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  currentUser: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  currentSyncState: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  lastSync: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  lastRemoteLogin: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  storageInfo: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  swStatus: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  swLog = "not available";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  userAgent: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  appVersion: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  dbInfo: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private syncState: SyncStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private sessionSubject: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private currentUserSubject: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private sw: SwUpdate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private database: PouchDatabase,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private http: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private backupService: BackupService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private downloadService: DownloadService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Inject(WINDOW_TOKEN) private window: Window,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Inject(LOCATION_TOKEN) private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.userAgent = this.window.navigator.userAgent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.sessionInfo = this.sessionSubject.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.currentUser = this.currentUserSubject.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.appVersion = environment.appVersion;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initCurrentSyncState();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initLastSync();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initLastRemoteLogin();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initStorageInfo();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initSwStatus();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.initDbInfo();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initCurrentSyncState() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    switch (this.syncState.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      case SyncState.COMPLETED:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.currentSyncState = "synced";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      case SyncState.STARTED:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.currentSyncState = "in progress";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.currentSyncState = "unsynced";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initLastSync() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.lastSync = localStorage.getItem(SyncService.LAST_SYNC_KEY) || "never";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initLastRemoteLogin() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.lastRemoteLogin =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      localStorage.getItem(KeycloakAuthService.LAST_AUTH_KEY) || "never";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initStorageInfo() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const storage = this.window.navigator?.storage;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (storage && "estimate" in storage) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      storage.estimate().then((estimate) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        const used = estimate.usage / 1048576;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        const available = estimate.quota / 1048576;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.storageInfo = `${used.toFixed(2)}MBs / ${available.toFixed(2)}MBs`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initSwStatus() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.sw.isEnabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.swStatus = "enabled";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.swStatus = "not enabled";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.window.navigator.serviceWorker.ready
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .then(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        firstValueFrom(this.http.get("/ngsw/state", { responseType: "text" })),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .then((res) => (this.swLog = res));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initDbInfo() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this.database || !this.database.getPouchDB()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.dbInfo = "db not initialized";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .getPouchDB()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .info()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .then(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        (res) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          (this.dbInfo = `${res.doc_count} (update sequence ${res.update_seq})`),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  sendReport() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // This is sent even without submitting the crash report.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Sentry.captureMessage("report information", {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      user: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        id: this.sessionInfo?.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        email: this.sessionInfo?.email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        name: this.sessionInfo?.name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      level: "debug",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      extra: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        currentUser: this.currentUser?.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        currentSyncState: this.currentSyncState,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        lastSync: this.lastSync,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        lastRemoteLogin: this.lastRemoteLogin,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        swStatus: this.swStatus,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        userAgent: this.userAgent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        swLog: this.swLog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        storageInfo: this.storageInfo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        dbInfo: this.dbInfo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        timestamp: new Date().toISOString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Sentry.showReportDialog({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      user: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        name: this.sessionInfo?.name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        email: this.sessionInfo?.email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      title: $localize`:Title user feedback dialog:Support request`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      subtitle: $localize`:Subtitle user feedback dialog:Please describe the problem you are facing.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      subtitle2: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async resetApplication() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const choice = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "Reset Application",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "Are you sure you want to reset the application? This will delete all application data from your device and you will have to synchronize again.",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!choice) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const dbs = await this.window.indexedDB.databases();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await Promise.all(dbs.map(({ name }) => this.destroyDatabase(name)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const registrations =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.window.navigator.serviceWorker.getRegistrations();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const unregisterPromises = registrations.map((reg) => reg.unregister());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await Promise.all(unregisterPromises);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    localStorage.clear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.location.pathname = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async downloadLocalDatabase() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const backup = await this.backupService.getDatabaseExport();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await this.downloadService.triggerDownload(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      backup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "json",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "aamdigital_data_" + new Date().toISOString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private destroyDatabase(name: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return new Promise((resolve, reject) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const del = this.window.indexedDB.deleteDatabase(name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      del.onsuccess = resolve;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      del.onerror = reject;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <h1 i18n>Technical User Support Details</h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<p id="table-description" class="text-secondary" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  The following details of your device and app can help the user support
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  troubleshoot when you are having technical issues.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<table class="support-table" aria-describedby="table-description">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <thead>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <th>Detail</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <th>Value</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </thead>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <tbody class="support-table--body">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Session</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ sessionInfo?.id ?? "-" }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Username</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ sessionInfo?.email ?? "-" }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>User Profile</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        @if (currentUser) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          {{ sessionInfo?.entityId }} ({{ currentUser?.toString() }})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>App version</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ appVersion }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Device info</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ userAgent }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Current sync state</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ currentSyncState }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Last sync</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ lastSync }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Last remote login</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ lastRemoteLogin }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Storage usage</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ storageInfo || "No information" }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Database documents</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ dbInfo }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>Service Worker</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <td>{{ swStatus }}</td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </tbody>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<mat-expansion-panel class="mat-elevation-z0">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <mat-panel-title class="tech-details">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      Service Worker Logs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </mat-panel-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-expansion-panel-header>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <div class="sw-logs tech-details">{{ swLog }}</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</mat-expansion-panel>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<div class="flex-row gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <button mat-raised-button (click)="sendReport()" i18n>Send Details</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    matTooltip="Download a backup of all data in your local database."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    i18n-matTooltip="Support Panel - Download local db tooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (click)="downloadLocalDatabase()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    i18n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Download Local Database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <button mat-raised-button color="warn" (click)="resetApplication()" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Reset Application
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./support.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +$table-odd-color: colors.$grey-light;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +$table-even-color: colors.$grey-medium;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +$table-border-color: colors.$border-color;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +$table-border: 1px solid $table-border-color;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +$table-padding-horizontal: 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +$table-padding-vertical: 16px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +$table-padding: $table-padding-vertical $table-padding-horizontal;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  max-width: sizes.$max-text-width;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  margin: 0 auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  display: block;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.support-table {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border-collapse: collapse;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border-spacing: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  margin-bottom: sizes.$large;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  &--body {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    > tr:nth-of-type(odd) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      background-color: $table-odd-color;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      border-top: $table-border;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      border-bottom: $table-border;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    > tr:nth-of-type(even) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      background-color: $table-even-color;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    > tr td:first-child {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      width: 25%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    > tr td:nth-child(2) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      width: 75%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  th {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    padding: $table-padding;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    text-align: left;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  td {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    padding: $table-padding;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.tech-details {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  color: colors.$hint-text;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.mat-expansion-panel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  background-color: transparent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border: 1px colors.$hint-text solid;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  margin-bottom: sizes.$large;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.sw-logs {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  overflow: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  white-space: pre;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/SyncStatusComponent.html b/documentation/components/SyncStatusComponent.html new file mode 100644 index 0000000000..6856c01a9c --- /dev/null +++ b/documentation/components/SyncStatusComponent.html @@ -0,0 +1,552 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/ui/sync-status/sync-status/sync-status.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A small indicator component that displays an icon when there is currently synchronization +with the remote server going on in the background.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This component also triggers a blocking dialog box when an initial sync is detected that prevents +user login (because user accounts need to be synced first).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(syncState: SyncStateSubject, dbIndexingService: DatabaseIndexingService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      syncState + SyncStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      dbIndexingService + DatabaseIndexingService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + backgroundProcesses + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : this._backgroundProcesses + .asObservable() + .pipe(debounceTime(1000)) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      background processes to be displayed to users, with short delay to avoid flickering

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { ChangeDetectionStrategy, Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SyncState } from "../../../session/session-states/sync-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DatabaseIndexingService } from "../../../entity/database-indexing/database-indexing.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { BackgroundProcessState } from "../background-process-state.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { debounceTime } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { BackgroundProcessingIndicatorComponent } from "../background-processing-indicator/background-processing-indicator.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SyncStateSubject } from "../../../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * A small indicator component that displays an icon when there is currently synchronization
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * with the remote server going on in the background.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * This component also triggers a blocking dialog box when an initial sync is detected that prevents
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * user login (because user accounts need to be synced first).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-sync-status",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./sync-status.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [BackgroundProcessingIndicatorComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  changeDetection: ChangeDetectionStrategy.OnPush,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class SyncStatusComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private indexingProcesses: BackgroundProcessState[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private _backgroundProcesses = new BehaviorSubject<BackgroundProcessState[]>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** background processes to be displayed to users, with short delay to avoid flickering */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  backgroundProcesses = this._backgroundProcesses
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    .asObservable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    .pipe(debounceTime(1000));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private syncState: SyncStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private dbIndexingService: DatabaseIndexingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.dbIndexingService.indicesRegistered
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .subscribe((indicesStatus) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.indexingProcesses = indicesStatus;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.updateBackgroundProcessesList();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.syncState
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .subscribe(() => this.updateBackgroundProcessesList());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Build and emit an updated array of current background processes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private updateBackgroundProcessesList() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let currentProcesses: BackgroundProcessState[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.syncState.value === SyncState.STARTED) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      currentProcesses.push({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        title: $localize`Synchronizing database`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        pending: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      currentProcesses.push({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        title: $localize`Database up-to-date`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        pending: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    currentProcesses = currentProcesses.concat(this.indexingProcesses);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._backgroundProcesses.next(currentProcesses);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <!--
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     This file is part of ndb-core.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     ndb-core is free software: you can redistribute it and/or modify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     it under the terms of the GNU General Public License as published by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     the Free Software Foundation, either version 3 of the License, or
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     (at your option) any later version.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     ndb-core is distributed in the hope that it will be useful,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     GNU General Public License for more details.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     You should have received a copy of the GNU General Public License
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ~     along with ndb-core.  If not, see <http://www.gnu.org/licenses/>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +<app-background-processing-indicator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [backgroundProcesses]="backgroundProcesses"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +</app-background-processing-indicator>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/TemplateTooltipComponent.html b/documentation/components/TemplateTooltipComponent.html new file mode 100644 index 0000000000..686de8e033 --- /dev/null +++ b/documentation/components/TemplateTooltipComponent.html @@ -0,0 +1,749 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/common-components/template-tooltip/template-tooltip.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This is the component that the tooltip is shown. It serves the following purposes:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Rendering the actual tooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Animating when the tooltip appears
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • giving each tooltip the same border and background
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Usage is intended for internal use only. To display a custom tooltip, +refer to the Template Tooltip Directive

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        HostBindings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(zone: NgZone, el: ElementRef) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        zone + NgZone + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        el + ElementRef<HTMLElement> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + contentTemplate +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This provides finer control on the content to be visible on the tooltip +This template will be injected in ToolTipRenderer directive in the consumer template +<ng-template #template> + content..... +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + hide +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + show +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        HostBindings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + @appear + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + animation + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + @HostBinding('@appear')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + Readonly + SELECTOR + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "app-template-tooltip" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  HostBinding,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  NgZone,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  animate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  state,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  style,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  transition,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  trigger,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/animations";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgTemplateOutlet } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This is the component that the tooltip is shown. It serves the following purposes:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * - Rendering the actual tooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * - Animating when the tooltip appears
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * - giving each tooltip the same border and background
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Usage is intended for internal use only. To display a custom tooltip,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * refer to the {@link ./template-tooltip.directive.ts Template Tooltip Directive}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: TemplateTooltipComponent.SELECTOR,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  template: '<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./template-tooltip.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  animations: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    trigger("appear", [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      state(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        "void",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        style({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          transform: "scale(0)",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      state(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        "*",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        style({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          transform: "scale(1)",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      transition(":enter", [animate("100ms")]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [NgTemplateOutlet],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class TemplateTooltipComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static readonly SELECTOR = "app-template-tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This provides finer control on the content to be visible on the tooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This template will be injected in ToolTipRenderer directive in the consumer template
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * <ng-template #template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *  content.....
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() contentTemplate: TemplateRef<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Output() hide = new EventEmitter<void>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Output() show = new EventEmitter<void>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(zone: NgZone, el: ElementRef<HTMLElement>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    zone.runOutsideAngular(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      el.nativeElement.addEventListener("mouseenter", () => this.show.emit());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      el.nativeElement.addEventListener("mouseleave", (ev) => this.hide.emit());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @HostBinding("@appear") animation = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./template-tooltip.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  background-color: colors.$background-neutral;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  border-radius: 4px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  border: 1px solid colors.$border-color;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  transform-origin: center 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  display: block;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @include mat-elevation.elevation(3);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/TodoCompletionComponent.html b/documentation/components/TodoCompletionComponent.html new file mode 100644 index 0000000000..c25a608d11 --- /dev/null +++ b/documentation/components/TodoCompletionComponent.html @@ -0,0 +1,499 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/todos/todo-completion/todo-completion/todo-completion.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Todo + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + complete +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + uncomplete +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Todo } from "../../model/todo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DisplayTodoCompletionComponent } from "../display-todo-completion/display-todo-completion.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-todo-completion",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./todo-completion.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./todo-completion.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DisplayTodoCompletionComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class TodoCompletionComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() entity: Todo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() complete = new EventEmitter();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() uncomplete = new EventEmitter();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  *ngIf="!entity.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  (click)="complete.emit()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <fa-icon icon="check" class="margin-right-small"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <span i18n>Complete Task</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +<div *ngIf="entity.completed" class="flex-row align-center gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <app-display-todo-completion
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [value]="entity.completed"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ></app-display-todo-completion>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    (click)="uncomplete.emit()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    matTooltip="mark as incomplete again"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    i18n-matTooltip="todo uncomplete button tooltip"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <fa-icon icon="undo-alt"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ./todo-completion.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/TodoDetailsComponent.html b/documentation/components/TodoDetailsComponent.html new file mode 100644 index 0000000000..a327ef258a --- /dev/null +++ b/documentation/components/TodoDetailsComponent.html @@ -0,0 +1,806 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/todos/todo-details/todo-details.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(data: DetailsComponentData, dialogRef: MatDialogRef, todoService: TodoService, entityFormService: EntityFormService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            data + DetailsComponentData + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dialogRef + MatDialogRef<any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            todoService + TodoService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityFormService + EntityFormService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Todo + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + close +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + completeTodo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + completeTodo() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + uncompleteTodo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +uncompleteTodo() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + form + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EntityForm<Todo> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + formColumns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Inject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Todo } from "../model/todo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DetailsComponentData } from "../../../core/form-dialog/row-details/row-details.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { TodoService } from "../todo.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../../../core/common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { TodoCompletionComponent } from "../todo-completion/todo-completion/todo-completion.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DialogCloseComponent } from "../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityFormComponent } from "../../../core/common-components/entity-form/entity-form/entity-form.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DialogButtonsComponent } from "../../../core/form-dialog/dialog-buttons/dialog-buttons.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FieldGroup } from "../../../core/entity-details/form/field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-todo-details",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./todo-details.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: ["./todo-details.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    EntityFormComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    TodoCompletionComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    DialogButtonsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class TodoDetailsComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entity: Todo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Output() close = new EventEmitter<Todo>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  formColumns: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  form: EntityForm<Todo>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    @Inject(MAT_DIALOG_DATA) data: DetailsComponentData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private dialogRef: MatDialogRef<any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private todoService: TodoService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entity = data.entity as Todo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.formColumns = [{ fields: data.columns }];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async ngOnInit(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.form = await this.entityFormService.createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [].concat(...this.formColumns.map((group) => group.fields)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async completeTodo() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.form.formGroup.dirty) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // we assume the user always wants to save pending changes rather than discard them
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      await this.entityFormService.saveChanges(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.form.formGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.todoService.completeTodo(this.entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.dialogRef.close();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  uncompleteTodo() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.todoService.uncompleteTodo(this.entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <h1 *ngIf="!entity.isNew" mat-dialog-title>{{ entity.subject }}</h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<h1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  *ngIf="entity.isNew"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  mat-dialog-title
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  i18n="Todo details heading for new record"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Creating new item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<app-dialog-close mat-dialog-close=""></app-dialog-close>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <app-entity-form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    [fieldGroups]="formColumns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    [form]="form"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ></app-entity-form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</mat-dialog-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +<mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <app-todo-completion
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    (complete)="completeTodo()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    (uncomplete)="uncompleteTodo()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    *ngIf="!entity.isNew"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    style="margin-right: 8px"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ></app-todo-completion>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  <app-dialog-buttons *ngIf="form" [form]="form.formGroup" [entity]="entity" />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +</mat-dialog-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + ./todo-details.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            .heading-new {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +.complete-button-absolute {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  position: absolute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  right: 48px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/TodoListComponent.html b/documentation/components/TodoListComponent.html new file mode 100644 index 0000000000..45969479f1 --- /dev/null +++ b/documentation/components/TodoListComponent.html @@ -0,0 +1,2762 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/todos/todo-list/todo-list.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + EntityListComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(screenWidthObserver: ScreenWidthObserver, router: Router, activatedRoute: ActivatedRoute, entityMapperService: EntityMapperService, entityActionsService: EntityActionsService, entities: EntityRegistry, dialog: MatDialog, duplicateRecord: DuplicateRecordService, currentUser: CurrentUserSubject, formDialog: FormDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              activatedRoute + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityActionsService + EntityActionsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              duplicateRecord + DuplicateRecordService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + allEntities +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : "navigate" | "popup" | "none" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "navigate" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + columnGroups +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : ColumnGroupsConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : (FormFieldConfig | string)[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + defaultSort +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + entityConstructor +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + exportConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + filters +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + loaderMethod +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              initial / default state whether to include archived records in the list

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + title +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Outputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + addNewClick +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + elementClick +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : EventEmitter + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + addNew + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + addNew() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + onRowClick + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + onRowClick(entity: Todo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + Todo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + showDetails + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +showDetails(entity: Todo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + Todo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + anonymizeRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + anonymizeRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + applyFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +applyFilter(filterValue: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              filterValue + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + archiveRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + archiveRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + deleteRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + deleteRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + duplicateRecords + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +duplicateRecords() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + getEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + getEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Template method that can be overwritten to change the loading logic.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<T[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + Async + loadEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + loadEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + openFilterOverlay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +openFilterOverlay() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Calling this function will display the filters in a popup

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + clickMode + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : "navigate" | "popup" | "none" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "none" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + defaultSort + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : { + active: "deadline", + direction: "asc", + } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + entityConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : Todo +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + showInactive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + defaultColumnGroup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + filteredData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + filterFreetext + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + filterObj + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + filterString + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + groups + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : GroupConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + isDesktop + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + mobileColumnGroup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + selectedColumnGroupIndex_ + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + selectedRows + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from EntityListComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Todo } from "../model/todo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { PrebuiltFilterConfig } from "../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { TodoDetailsComponent } from "../todo-details/todo-details.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityListComponent } from "../../../core/entity-list/entity-list/entity-list.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  DataFilter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FilterSelectionOption,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ScreenWidthObserver } from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ActivatedRoute, Router, RouterLink } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DuplicateRecordService } from "../../../core/entity-list/duplicate-records/duplicate-records.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { CurrentUserSubject } from "../../../core/session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../../../core/logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  NgStyle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  NgTemplateOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Angulartics2OnModule } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FilterComponent } from "../../../core/filter/filter/filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { TabStateModule } from "../../../utils/tab-state/tab-state.module";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ViewTitleComponent } from "../../../core/common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ExportDataDirective } from "../../../core/export/export-data-directive/export-data.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DisableEntityOperationDirective } from "../../../core/permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityCreateButtonComponent } from "../../../core/common-components/entity-create-button/entity-create-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityActionsService } from "app/core/entity/entity-actions/entity-actions.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { AbilityModule } from "@casl/angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ViewActionsComponent } from "../../../core/common-components/view-actions/view-actions.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityActionsMenuComponent } from "../../../core/entity-details/entity-actions-menu/entity-actions-menu.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@RouteTarget("TodoList")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-todo-list",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    "../../../core/entity-list/entity-list/entity-list.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgStyle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Angulartics2OnModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgTemplateOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTabsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    FilterComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    TabStateModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ViewTitleComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ExportDataDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    RouterLink,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    EntityCreateButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    AbilityModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    EntityActionsMenuComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ViewActionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class TodoListComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  extends EntityListComponent<Todo>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  // TODO: make this component obsolete by generalizing Entity and EntityList so that we can define a viewDetailsComponent on the entity that gets opened as popup? #2511
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override entityConstructor = Todo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override clickMode: "navigate" | "popup" | "none" = "none";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override defaultSort: Sort = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    active: "deadline",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    direction: "asc",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override showInactive = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    activatedRoute: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entityActionsService: EntityActionsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    duplicateRecord: DuplicateRecordService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    super(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      screenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      activatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      dialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      duplicateRecord,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entityActionsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      null,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.addPrebuiltFilters();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private addPrebuiltFilters() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.setFilterDefaultToCurrentUser();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const prebuiltFilter of this.filters.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (filter) => filter.type === "prebuilt",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    )) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      switch (prebuiltFilter.id) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        case "due-status": {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          this.buildFilterDueStatus(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            prebuiltFilter as PrebuiltFilterConfig<Todo>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        default: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            "[TodoList] No filter options available for prebuilt filter: " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              prebuiltFilter.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          prebuiltFilter["options"] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private setFilterDefaultToCurrentUser() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const assignedToFilter = this.filters.find((c) => c.id === "assignedTo");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (assignedToFilter && !assignedToFilter.default) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // filter based on currently logged-in user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.currentUser
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .subscribe((entity) => (assignedToFilter.default = entity?.getId()));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private buildFilterDueStatus(filter: PrebuiltFilterConfig<Todo>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    filter.options = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      filterCurrentlyActive,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        key: "overdue",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: $localize`:Filter-option for todos:Overdue`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        filter: { isOverdue: true },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        key: "completed",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: $localize`:Filter-option for todos:Completed`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        filter: { completed: { $exists: true } },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        key: "open",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: $localize`:Filter-option for todos:All Open`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        filter: { completed: undefined },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      { key: "", label: $localize`Any`, filter: {} },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    filter.label = filter.label ?? $localize`Tasks due`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    filter.default = filter.default ?? "current";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override addNew() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.showDetails(new Todo());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  override onRowClick(entity: Todo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.showDetails(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  showDetails(entity: Todo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.formDialog.openFormPopup(entity, undefined, TodoDetailsComponent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +const filterCurrentlyActive: FilterSelectionOption<Todo> = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  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>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <!-- Desktop version -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<div *ngIf="isDesktop">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <!-- Header bar; contains the title on the left and controls on the right -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-view-title [ngStyle]="offsetFilterStyle">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {{ title }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div class="flex-row gap-regular">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <app-entity-create-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [entityType]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (entityCreate)="addNew()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ></app-entity-create-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button mat-icon-button color="primary" [matMenuTriggerFor]="additional">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <fa-icon icon="ellipsis-v"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <!-- Filters -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div class="flex-row gap-regular flex-wrap">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div *ngTemplateOutlet="filterDialog"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <app-filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      *ngIf="!!allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="flex-row gap-regular flex-wrap"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [filterConfig]="filters"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [entityType]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [entities]="allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [useUrlQueryParams]="true"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [(filterObj)]="filterObj"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ></app-filter>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <!-- Bulk Actions -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <ng-container *ngTemplateOutlet="bulkActions"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <!-- Tab Groups-->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div class="mat-elevation-z1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div *ngIf="groups.length > 1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <mat-tab-group
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [(selectedIndex)]="selectedColumnGroupIndex"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        appTabStateMemo
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <mat-tab
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          *ngFor="let item of groups"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          [label]="item.name"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          angularticsAction="list_column_view"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          [angularticsLabel]="item.name"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ></mat-tab>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </mat-tab-group>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <ng-container *ngTemplateOutlet="subrecord"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<!-- Mobile Version -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<div *ngIf="!isDesktop">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-view-title [disableBackButton]="true">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <h2>{{ title }}</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </app-view-title>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div class="flex-row full-width">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <div *ngTemplateOutlet="filterDialog"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button mat-icon-button color="primary" [matMenuTriggerFor]="additional">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        <fa-icon icon="ellipsis-v"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </app-view-actions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div *ngIf="selectedRows" class="bulk-action-spacing">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <ng-container *ngTemplateOutlet="bulkActions"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <ng-container *ngTemplateOutlet="subrecord"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<!-- Templates and menus for both mobile and desktop -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<ng-template #filterDialog>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <mat-form-field class="full-width filter-field">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <mat-label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n="Filter placeholder|Allows the user to filter through entities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >Filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="full-width"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      matInput
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n-placeholder="Examples of things to filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      placeholder="e.g. name, age"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (ngModelChange)="applyFilter($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [(ngModel)]="filterString"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      *ngIf="filterString"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      matIconSuffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      aria-label="Clear"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (click)="filterString = ''; applyFilter('')"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <fa-icon icon="times"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<ng-template #subrecord>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [entityType]="entityConstructor"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [records]="allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [customColumns]="columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [editable]="false"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [clickMode]="clickMode"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (entityClick)="onRowClick($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [columnsToDisplay]="columnsToDisplay"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [filter]="filterObj"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [sortBy]="defaultSort"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [(selectedRecords)]="selectedRows"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [selectable]="!!selectedRows"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [showInactive]="showInactive"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (filteredRecordsChange)="filteredData = $event"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [filterFreetext]="filterFreetext"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ></app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<mat-menu #additional>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div class="hide-desktop">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (click)="addNew()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      angularticsCategory="UserAction"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [angularticsAction]="title.toLowerCase().replace(' ', '_') + '_add_new'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      *appDisabledEntityOperation="{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        entity: entityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        operation: 'create',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        aria-label="add element"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        icon="plus-circle"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <span i18n="Add a new entity to a list of multiple entities">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Add New
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <button mat-menu-item (click)="openFilterOverlay()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        aria-label="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        icon="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <span i18n="Show filter options popup for list"> Filter options </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [appExportData]="allEntities"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [exportConfig]="exportConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [filename]="title.replace(' ', '')"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    angularticsAction="list_csv_export"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      aria-label="download csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      icon="download"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <span i18n="Download list contents as CSV"> Download all data (.csv) </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [appExportData]="filteredData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [exportConfig]="exportConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [filename]="title.replace(' ', '')"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    angularticsAction="list_csv_export"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      aria-label="download csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      icon="download"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <span i18n="Download list contents as CSV"> Download current (.csv) </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [angularticsCategory]="entityConstructor?.ENTITY_TYPE"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    angularticsAction="import_file"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [routerLink]="['/import']"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [queryParams]="{ entityType: entityConstructor?.ENTITY_TYPE }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      aria-label="import file"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      icon="file-import"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <span i18n> Import from file </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    (click)="selectedRows = []"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    matTooltip="Select multiple records for bulk actions like duplicating or deleting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    matTooltipPosition="before"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="color-accent standard-icon-with-text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      aria-label="bulk actions"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      icon="list-check"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <span i18n> Bulk Actions </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mat-menu-item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [routerLink]="['/admin/entity', entityConstructor.ENTITY_TYPE]"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [queryParams]="{ mode: 'list' }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    queryParamsHandling="merge"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    *ngIf="'update' | ablePure: 'Config' | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <fa-icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="standard-icon-with-text color-accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      icon="tools"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <span i18n>Edit Data Structure</span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <ng-content select="[mat-menu-item]"></ng-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-menu>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +<ng-template #bulkActions>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  <div *ngIf="!!selectedRows" class="bulk-action-button">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Actions on <b>{{ selectedRows.length }}</b> selected records:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      class="flex-row gap-small bulk-action-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      matTooltip="Select rows for an action on multiple records"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      i18n-matTooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="archiveRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Archive
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="anonymizeRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Anonymize
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="deleteRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (click)="duplicateRecords()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        [disabled]="selectedRows.length === 0"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        i18n="bulk action button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Duplicate
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      <button mat-raised-button (click)="selectedRows = undefined" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Cancel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/TodosDashboardComponent.html b/documentation/components/TodosDashboardComponent.html new file mode 100644 index 0000000000..eb5c24dbd2 --- /dev/null +++ b/documentation/components/TodosDashboardComponent.html @@ -0,0 +1,820 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/todos/todos-dashboard/todos-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + DashboardWidget +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(formDialog: FormDialogService, currentUser: CurrentUserSubject) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + + getRequiredEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + getRequiredEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DashboardWidget +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DashboardWidget:29 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + openEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +openEntity(entity: Todo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + Todo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + dataMapper + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + filterEntries + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + sortEntries + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + startDateLabel + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : Todo.schema.get("startDate").label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Todo } from "../model/todo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { TodoDetailsComponent } from "../todo-details/todo-details.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DashboardListWidgetComponent } from "../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DatePipe, NgStyle } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { CurrentUserSubject } from "../../../core/session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DashboardWidget } from "../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("TodosDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-todos-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./todos-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./todos-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgStyle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    DatePipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class TodosDashboardComponent extends DashboardWidget {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static override getRequiredEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return Todo.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  dataMapper: (data: Todo[]) => Todo[] = (data) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    data.filter(this.filterEntries).sort(this.sortEntries);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  startDateLabel: string = Todo.schema.get("startDate").label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filterEntries = (todo: Todo) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !todo.completed &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      todo.assignedTo.includes(this.currentUser.value?.getId()) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      moment(todo.startDate).isSameOrBefore(moment(), "days")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  sortEntries = (a: Todo, b: Todo) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // list overdue todos first
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (a.isOverdue && b.isOverdue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return a.deadline?.getTime() - b.deadline?.getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else if (a.isOverdue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return -1; // a first
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else if (b.isOverdue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return 1; // b first
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (a.startDate ?? a.deadline)?.getTime() -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (b.startDate ?? b.deadline)?.getTime()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  openEntity(entity: Todo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.formDialog.openFormPopup(entity, undefined, TodoDetailsComponent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <app-dashboard-list-widget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  icon="tasks"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  subtitle="Tasks due"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  i18n-subtitle="subtitle|dashboard showing open todos"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  theme="note"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityType="Todo"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [dataMapper]="dataMapper"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <table mat-table aria-label="Notes needing follow-up">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <!-- Table header only for assistive technologies like screen readers -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <tr hidden="true">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <th scope="col">Subject</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <th scope="col">Deadline</th>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <ng-container matColumnDef="subject">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <td *matCellDef="let todo" class="subject-cell row-indicator">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        {{ todo.subject }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <ng-container matColumnDef="deadline">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      <td
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        *matCellDef="let todo"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        class="deadline"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        matTooltip="{{ startDateLabel }}: {{ todo.startDate | date }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [matTooltipDisabled]="!todo.startDate"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        {{ todo.deadline | date }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      </td>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    </ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    <tr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      mat-row
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      *matRowDef="let row; columns: ['subject', 'deadline']"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      class="dashboard-table-row row-view"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (click)="openEntity(row)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      [ngStyle]="{ '--row-indicator-color': row.isOverdue ? 'red' : '' }"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ></tr>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  </table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</app-dashboard-list-widget>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ./todos-dashboard.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @use "../../../core/dashboard/dashboard-widget-base";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +.row-view {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  & > td:first-child {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    padding-left: 2 * sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  & > td:last-child {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    padding-right: sizes.$small;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/TodosRelatedToEntityComponent.html b/documentation/components/TodosRelatedToEntityComponent.html new file mode 100644 index 0000000000..8fc871a6fc --- /dev/null +++ b/documentation/components/TodosRelatedToEntityComponent.html @@ -0,0 +1,1529 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/todos/todos-related-to-entity/todos-related-to-entity.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + RelatedEntitiesComponent +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(formDialog: FormDialogService, dbIndexingService: DatabaseIndexingService, entityMapper: EntityMapperService, entities: EntityRegistry, screenWidthObserver: ScreenWidthObserver, filterService: FilterService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  formDialog + FormDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  dbIndexingService + DatabaseIndexingService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + clickMode +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : "popup" | "navigate" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "popup" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + columns +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Columns to be displayed in the table

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + editable +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  currently viewed/main entity for which related entities are displayed in this component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entity type of the related entities to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + filter +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This filter is applied before displaying the data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + loaderMethod +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : LoaderMethod + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The special service or method to load data via an index or other special method.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + property +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string | string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Property name of the related entities (type given in this.entityType) that holds the entity id +to be matched with the id of the current main entity (given in this.entity). +If not explicitly set, this will be inferred based on the defined relations between the entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  manually setting this is only necessary if you have multiple properties referencing the same entity type +and you want to list only records related to one of them. +For example: if you set entityType = "Project" (to display a list of projects here) and the Project entities have a properties "participants" and "supervisors" both storing references to User entities, +you can set property = "supervisors" to only list those projects where the current User is supervisors, not participant.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + showInactive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Whether inactive/archived records should be shown.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + getData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getData() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + getNewEntryFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getNewEntryFunction() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Todo + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + showDetails + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +showDetails(entity: Todo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entity + Todo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + createNewRecordFactory + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +createNewRecordFactory() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : () => any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + getProperty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getProperty() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : string | [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + initFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + initFilter() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : DataFilter<E> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + listenToEntityUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + listenToEntityUpdates() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + _columns + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : [ + { id: "deadline" }, + { id: "subject" }, + { id: "startDate" }, + { id: "assignedTo" }, + { id: "description", visibleFrom: "xl" }, + { id: "repetitionInterval", visibleFrom: "xl" }, + { id: "relatedEntities", hideFromTable: true }, + { id: "completed", hideFromForm: true }, + ] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + backgroundColorFn + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + entityCtr + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : Todo +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + filter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : DataFilter<Todo> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : { isActive: true } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + columnsToDisplay + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + data + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : E[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from RelatedEntitiesComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Todo } from "../model/todo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DatabaseIndexingService } from "../../../core/entity/database-indexing/database-indexing.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { TodoDetailsComponent } from "../todo-details/todo-details.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DataFilter } from "../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { RelatedEntitiesComponent } from "../../../core/entity-details/related-entities/related-entities.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ScreenWidthObserver } from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FilterService } from "../../../core/filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("TodosRelatedToEntity")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-todos-related-to-entity",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./todos-related-to-entity.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./todos-related-to-entity.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [EntitiesTableComponent, MatSlideToggleModule, FormsModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class TodosRelatedToEntityComponent extends RelatedEntitiesComponent<Todo> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override entityCtr = Todo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override _columns: FormFieldConfig[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "deadline" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "subject" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "startDate" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "assignedTo" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "description", visibleFrom: "xl" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "repetitionInterval", visibleFrom: "xl" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "relatedEntities", hideFromTable: true },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    { id: "completed", hideFromForm: true },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  // TODO: filter by current user as default in UX? --> custom filter component or some kind of variable interpolation?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override filter: DataFilter<Todo> = { isActive: true };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  backgroundColorFn = (r: Todo) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!r.isActive) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return "#e0e0e0";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return r.getColor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private dbIndexingService: DatabaseIndexingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super(entityMapper, entities, screenWidthObserver, filterService, null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override getData() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (Array.isArray(this.property)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return super.getData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // TODO: move this generic index creation into schema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.dbIndexingService.generateIndexOnProperty(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      "todo_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      Todo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.property as keyof Todo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      "deadline",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const entityId = this.entity.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.dbIndexingService.queryIndexDocs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      Todo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      "todo_index/by_" + this.property,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        startkey: [entityId, "\uffff"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        endkey: [entityId],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        descending: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public getNewEntryFunction(): () => Todo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const newEntry = new Todo();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      newEntry.relatedEntities = [this.entity.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return newEntry;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  showDetails(entity: Todo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.formDialog.openFormPopup(entity, this.columns, TodoDetailsComponent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <app-entities-table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [entityType]="entityCtr"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [records]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [customColumns]="_columns"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [newRecordFactory]="getNewEntryFunction()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  clickMode="none"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [filter]="filter"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  (entityClick)="showDetails($event)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [getBackgroundColor]="backgroundColorFn"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +></app-entities-table>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./todos-related-to-entity.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/UiComponent.html b/documentation/components/UiComponent.html new file mode 100644 index 0000000000..4f83b5c50f --- /dev/null +++ b/documentation/components/UiComponent.html @@ -0,0 +1,1091 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/ui/ui/ui.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The main user interface component as root element for the app structure +which also ties different components together into the overall app layout.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(screenWidthObserver: ScreenWidthObserver, siteSettingsService: SiteSettingsService, loginState: LoginStateSubject, sessionManager: SessionManagerService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    screenWidthObserver + ScreenWidthObserver + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    siteSettingsService + SiteSettingsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    loginState + LoginStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sessionManager + SessionManagerService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + closeSidenavOnMobile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +closeSidenavOnMobile() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + isLoggedIn + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +isLoggedIn() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Check if user is logged in.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + logout + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + logout() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Trigger logout of user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + sideNav + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + @ViewChild('sideNav')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    reference to sideNav component in template, required for toggling the menu on user actions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + sideNavMode + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : MatDrawerMode + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    display mode for the menu to make it responsive and usable on smaller screens

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + siteSettings + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : new SiteSettings() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    latest version of the site settings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, ViewChild } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatDrawerMode, MatSidenavModule } from "@angular/material/sidenav";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ScreenWidthObserver } from "../../../utils/media/screen-size-observer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatToolbarModule } from "@angular/material/toolbar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { RouterLink, RouterOutlet } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SearchComponent } from "../search/search.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SyncStatusComponent } from "../sync-status/sync-status/sync-status.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LanguageSelectComponent } from "../../language/language-select/language-select.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { NavigationComponent } from "../navigation/navigation/navigation.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { PwaInstallComponent } from "../../pwa-install/pwa-install.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { AppVersionComponent } from "../latest-changes/app-version/app-version.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { PrimaryActionComponent } from "../primary-action/primary-action.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SiteSettingsService } from "../../site-settings/site-settings.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DisplayImgComponent } from "../../../features/file/display-img/display-img.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SiteSettings } from "../../site-settings/site-settings";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LoginStateSubject } from "../../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LoginState } from "../../session/session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SessionManagerService } from "../../session/session-service/session-manager.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SetupWizardButtonComponent } from "../../admin/setup-wizard/setup-wizard-button/setup-wizard-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * The main user interface component as root element for the app structure
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * which also ties different components together into the overall app layout.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-ui",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./ui.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./ui.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatToolbarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    RouterLink,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    SearchComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    SyncStatusComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    LanguageSelectComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatSidenavModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NavigationComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    PwaInstallComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    AppVersionComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    RouterOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    PrimaryActionComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DisplayImgComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    SetupWizardButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class UiComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** display mode for the menu to make it responsive and usable on smaller screens */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  sideNavMode: MatDrawerMode;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** reference to sideNav component in template, required for toggling the menu on user actions */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @ViewChild("sideNav") sideNav;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** latest version of the site settings*/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  siteSettings = new SiteSettings();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private screenWidthObserver: ScreenWidthObserver,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private siteSettingsService: SiteSettingsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private loginState: LoginStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private sessionManager: SessionManagerService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.screenWidthObserver
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .platform()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .subscribe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        (isDesktop) => (this.sideNavMode = isDesktop ? "side" : "over"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.siteSettingsService.siteSettings.subscribe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (s) => (this.siteSettings = s),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Check if user is logged in.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  isLoggedIn(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.loginState.value === LoginState.LOGGED_IN;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Trigger logout of user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async logout() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.sessionManager.logout();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  closeSidenavOnMobile() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.sideNavMode === "over") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.sideNav.close();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <!--
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     This file is part of ndb-core.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     ndb-core is free software: you can redistribute it and/or modify
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     it under the terms of the GNU General Public License as published by
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     the Free Software Foundation, either version 3 of the License, or
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     (at your option) any later version.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     ndb-core is distributed in the hope that it will be useful,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     GNU General Public License for more details.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     You should have received a copy of the GNU General Public License
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ~     along with ndb-core.  If not, see <http://www.gnu.org/licenses/>.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<!-- HEADER TOOLBAR -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<mat-toolbar color="primary" class="ui-toolbar">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <!-- Left items -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <div class="flex-row align-center">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <span *ngIf="isLoggedIn() && sideNavMode === 'over'">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <button mat-icon-button (click)="sideNav.toggle()">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <fa-icon class="header-icon" icon="bars"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <a
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      *ngIf="sideNavMode !== 'over'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      [routerLink]="['']"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      class="header-title"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      angulartics2On="click"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      angularticsCategory="Navigation"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      angularticsAction="navbar_site_title_link"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      {{ siteSettings.siteName }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </a>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <!--top right icons and search-->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    class="flex-row align-center flex-grow-1-3 justify-content-end gap-small"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <app-search
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      class="hide-mobile full-width"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      *ngIf="isLoggedIn()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ></app-search>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <app-sync-status></app-sync-status>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <app-language-select
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      *ngIf="siteSettings.displayLanguageSelect"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ></app-language-select>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</mat-toolbar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<!-- MAIN NAVIGATION + CONTENT -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<mat-sidenav-container (backdropClick)="closeSidenavOnMobile()" autosize>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-sidenav
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    #sideNav
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    *ngIf="isLoggedIn()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [autoFocus]="false"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [mode]="sideNavMode"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    [opened]="sideNavMode === 'side'"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    class="sidenav-menu"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    disableClose
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      class="flex-column justify-space-between full-height overflow-y-hidden"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <app-display-img
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        *ngIf="siteSettings.logo"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        [entity]="siteSettings"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        imgProperty="logo"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        class="site-logo"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ></app-display-img>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <app-navigation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        class="overflow-auto-y"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        (click)="closeSidenavOnMobile()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ></app-navigation>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <div class="flex-grow"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      <div class="flex-column">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <app-setup-wizard-button></app-setup-wizard-button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <app-pwa-install></app-pwa-install>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <div class="flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            (click)="closeSidenavOnMobile()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            mat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            routerLink="user-account"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            i18n="Navigate to user profile page"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            class="footer-cell width-1-2"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            <fa-icon icon="user"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            Profile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            mat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            (click)="logout()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            i18n="Sign out of the app"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            class="footer-cell width-1-2"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            <fa-icon icon="sign-out-alt"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            Sign out
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        <div class="flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            class="footer-cell"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            routerLink="/support"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            (click)="closeSidenavOnMobile()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            <fa-icon icon="info-circle" class="info-icon"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            mat-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            class="footer-cell full-width"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            style="height: 100%"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            (click)="version.showLatestChanges()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            <app-version #version></app-version>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-sidenav>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  <mat-sidenav-content class="sidenav-content">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    <router-outlet></router-outlet>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  </mat-sidenav-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +</mat-sidenav-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +<app-primary-action *ngIf="isLoggedIn()"></app-primary-action>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ./ui.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @use "@angular/material/core/style/elevation" as mat-elevation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@use "variables/sizes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@use "variables/colors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@use "variables/breakpoints";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * outermost elements; make them as tall as possible.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Consumes all of the available screen
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +html,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +body {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /* height: 100%; */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**  Toolbar  **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Directive for the only toolbar row.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Both of these directives are required to make the shadow show
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.ui-toolbar {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  z-index: 2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  justify-content: space-between;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @include mat-elevation.elevation(2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.search-field {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Use a fixed width here because
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * the form field does not work with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * relative / computed sizes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  width: 450px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.header-icon {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  color: white;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  font-size: 15pt;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**  App content  **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +:host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  background-color: colors.$background;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  display: grid;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  grid-template-columns: 1fr;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  grid-template-rows: auto 1fr;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  height: 100vh;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  This only targets iOs devices. Note that (just like the line below), this is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  a hacky solution. While it is practically guaranteed that only iOs will have this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  property, it is not guaranteed that iOs will keep this property for ever.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @supports (-webkit-touch-callout: none) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    /* mobile viewport bug fix.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      The viewport height on iOs is not necessarily the visible screen size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      There might be a bar on the top of the screen. The following line
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      fixes this, but since this is no official css feature, this line should
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      be replaced as soon as a nicer solution exists.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    height: -webkit-fill-available;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.sidenav-menu {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  background-color: colors.$background-secondary;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**  Main content  **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +mat-sidenav-container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  background: none;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * reset the styles from the anchor element
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.header-title {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  color: white;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  text-decoration: none;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Remove the right border so that the background color
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * merges into the main element
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.mat-drawer-side {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border-right: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.site-logo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  width: 180px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  padding: 8px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  margin: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.footer-cell {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border-top: solid 1px rgba(0, 0, 0, 0.12);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border-radius: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  place-content: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  place-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  min-width: fit-content;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  &:not(:last-child) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    border-right: solid 1px rgba(0, 0, 0, 0.12);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  box-sizing: border-box;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.info-icon {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  margin: auto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  font-size: 20px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.info-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  width: 48px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border-right: solid 1px rgba(0, 0, 0, 0.12);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  border-radius: 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  overflow: hidden;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +.justify-content-end {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  justify-content: end;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/UserAccountComponent.html b/documentation/components/UserAccountComponent.html new file mode 100644 index 0000000000..c7f7e2ee67 --- /dev/null +++ b/documentation/components/UserAccountComponent.html @@ -0,0 +1,672 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/user/user-account/user-account.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      User account form to allow the user to view and edit information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(currentUser: CurrentUserSubject, sessionInfo: SessionSubject) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + checkIfPasswordChangeAllowed + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +checkIfPasswordChangeAllowed() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + passwordChangeDisabled + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + tooltipText + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { environment } from "../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SessionType } from "../../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { TabStateModule } from "../../../utils/tab-state/tab-state.module";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AccountPageComponent } from "../../session/auth/keycloak/account-page/account-page.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { CurrentUserSubject } from "../../session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AsyncPipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityBlockComponent } from "../../basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * User account form to allow the user to view and edit information.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-user-account",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./user-account.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./user-account.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTabsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    TabStateModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    AccountPageComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class UserAccountComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  passwordChangeDisabled = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  tooltipText: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    protected currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    protected sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.checkIfPasswordChangeAllowed();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  checkIfPasswordChangeAllowed() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.passwordChangeDisabled = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.tooltipText = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (environment.session_type !== SessionType.synced) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.passwordChangeDisabled = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.tooltipText = $localize`:Password reset disabled tooltip:Password change is not allowed in demo mode.`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else if (!navigator.onLine) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.tooltipText = $localize`:Password reset disabled tooltip:Password change is not possible while being offline.`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <mat-tab-group appTabStateMemo>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  <mat-tab i18n-label="User-Account label" label="User Account">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      class="min-width-1-3 margin-top-large flex-column gap-regular"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      [matTooltip]="tooltipText"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <mat-form-field class="full-width">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <mat-label i18n>Username</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <input
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          i18n-placeholder="Username placeholder"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          placeholder="Username"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          matInput="text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          id="username"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          type="text"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          [value]="(sessionInfo | async)?.email"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          disabled
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        <mat-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          {{ (sessionInfo | async)?.name }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        </mat-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <app-account-page [disabled]="passwordChangeDisabled"></app-account-page>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <hr />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    <h2 i18n>Your profile:</h2>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @if (currentUser | async) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <app-entity-block
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        [entityToDisplay]="currentUser | async"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        class="entity-box"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ></app-entity-block>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } @else if ((sessionInfo | async)?.entityId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <div i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        Couldn't find the record that your user account is linked to ({{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          (sessionInfo | async)?.entityId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        }}).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } @else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      <div i18n>Your user account is not linked to any record.</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  </mat-tab>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +</mat-tab-group>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + ./user-account.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      .min-width-1-3 {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  max-width: 600px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +.entity-box {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  border: 1px solid lightgrey;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  border-radius: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  width: fit-content;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  padding: 10px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/UserSecurityComponent.html b/documentation/components/UserSecurityComponent.html new file mode 100644 index 0000000000..8235fe9725 --- /dev/null +++ b/documentation/components/UserSecurityComponent.html @@ -0,0 +1,1340 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/user/user-security/user-security.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(authService: KeycloakAuthService, sessionInfo: SessionSubject, fb: FormBuilder, alertService: AlertService, http: HttpClient) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        authService + KeycloakAuthService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        fb + FormBuilder + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        http + HttpClient + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + createAccount + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +createAccount() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + disableForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +disableForm() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + editForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +editForm() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + getFormValues + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +getFormValues() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Partial<KeycloakUserDto> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + toggleAccount + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +toggleAccount(enabled: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        enabled + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + updateAccount + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +updateAccount() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + availableRoles + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Role[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + editing + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : true +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + form + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + user + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : KeycloakUserDto + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + userIsPermitted + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  FormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  KeycloakAuthService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  KeycloakUserDto,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Role,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "../../session/auth/keycloak/keycloak-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { AlertService } from "../../alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { catchError } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { environment } from "../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("UserSecurity")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-user-security",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./user-security.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./user-security.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class UserSecurityComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  form: FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  availableRoles: Role[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  user: KeycloakUserDto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  editing = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  userIsPermitted = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private authService: KeycloakAuthService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private http: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form = this.fb.group({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      username: [{ value: "", disabled: true }],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      email: ["", [Validators.required, Validators.email]],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      roles: new FormControl<Role[]>([], Validators.required),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      sessionInfo.value?.roles.includes(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        KeycloakAuthService.ACCOUNT_MANAGER_ROLE,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.userIsPermitted = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // automatically skip trailing and leading whitespaces when the form changes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.valueChanges.pipe(untilDestroyed(this)).subscribe((next) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (next.email?.startsWith(" ") || next.email?.endsWith(" ")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.form.get("email").setValue(next.email.trim());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.authService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .getRoles()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe((roles) => this.initializeRoles(roles));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private initializeRoles(roles: Role[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.availableRoles = roles;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!this.user) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // assign "user_app" as default role for new users
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const userAppRole = roles.find(({ name }) => name === "user_app");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (userAppRole) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.form.get("roles").setValue([userAppRole]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!this.userIsPermitted) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.get("username").setValue(this.entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.authService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .getUser(this.entity.getId(true))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .pipe(catchError(() => this.authService.getUser(this.entity.getId())))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        next: (res) => this.assignUser(res),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        error: () => undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private assignUser(user: KeycloakUserDto) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.user = user;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.initializeForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (this.user) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.disableForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private initializeForm() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.get("email").setValue(this.user.email);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .get("roles")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .setValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.user.roles.map((role) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.availableRoles.find((r) => r.id === role.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.markAsPristine();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  toggleAccount(enabled: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let message = $localize`:Snackbar message:Account has been disabled, user will not be able to login anymore.`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (enabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      message = $localize`:Snackbar message:Account has been activated, user can login again.`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.updateKeycloakUser({ enabled }, message);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  editForm() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.editing = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (this.user.enabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.form.enable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  disableForm() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.editing = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.initializeForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  createAccount() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const user = this.getFormValues();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!user) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    user.enabled = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (user) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.authService.createUser(user).subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        next: () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.alertService.addInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            $localize`:Snackbar message:Account created. An email has been sent to ${
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              this.form.get("email").value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.user = user as KeycloakUserDto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.disableForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        error: ({ error }) => this.form.setErrors({ failed: error.message }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  updateAccount() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const update = this.getFormValues();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // only send values that have changed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    Object.keys(this.form.controls).forEach((control) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.form.get(control).pristine ? delete update[control] : undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (update) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.updateKeycloakUser(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        update,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        $localize`:Snackbar message:Successfully updated user`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private updateKeycloakUser(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    update: Partial<KeycloakUserDto>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.authService.updateUser(this.user.id, update).subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      next: () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.alertService.addInfo(message);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        Object.assign(this.user, update);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.disableForm();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (update.roles?.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          // roles changed, user might have more permissions now
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.triggerSyncReset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      error: ({ error }) => this.form.setErrors({ failed: error.message }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getFormValues(): Partial<KeycloakUserDto> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (this.form.invalid) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.form.markAllAsTouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.setErrors({});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.form.getRawValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private triggerSyncReset() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .post(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        `${environment.DB_PROXY_PREFIX}/${environment.DB_NAME}/clear_local`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        next: () => undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        // request fails if no permission backend is used - this is fine
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        error: () => undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <em
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  *ngIf="!userIsPermitted"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  i18n="Placeholder text when permissions are missing"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  You account does not have the required permissions to see this page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</em>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +<div *ngIf="userIsPermitted" class="flex-column">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div *ngIf="!user" class="buttons-wrapper align-self-start">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <p
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n="notice about user without account"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="field-hint field-warning"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      There is no user account set up for this user yet. Enable this user to log
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      into the app by filling the details below.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      *ngIf="editing && !user"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      type="submit"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="createAccount()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [disabled]="form.disabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="invite-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [color]="form.valid ? 'accent' : ''"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      [class.invite-button-animate]="form.valid"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n="button to invite a new user"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Create account & send invitation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <div
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    class="padding-bottom-small flex-row gap-small align-self-end flex-wrap"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    *ngIf="user"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      *ngIf="editing && user?.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      color="warn"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="toggleAccount(false)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      matTooltip="User will not be able to login again, no information will be lost"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n="button to update disable a user"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Deactivate user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      *ngIf="editing && !user?.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="toggleAccount(true)"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      matTooltip="User can login again with the previously used credentials"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n="button to enable a user"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Activate user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      *ngIf="editing && user?.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      color="accent"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="action-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="updateAccount()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n="Save button for forms"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Save
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      *ngIf="editing"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="action-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="disableForm()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n="Cancel button for forms"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Cancel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      *ngIf="!editing"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      mat-raised-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      class="action-button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (click)="editForm()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      i18n="Edit button for forms"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Edit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <p
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    *ngIf="user && !user.enabled"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    i18n="Hint in user account page"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    class="field-hint field-warning"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    User is currently disabled and will not be able to login to the app
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </p>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  <form [formGroup]="form">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <mat-label i18n="label of email input">Email</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <input matInput type="text" formControlName="email" />
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <mat-error *ngIf="form.hasError('email', 'email')" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          Please enter a valid email
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <mat-error *ngIf="form.hasError('required', 'email')" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          This field is required
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      <mat-form-field style="width: 100%">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <mat-label i18n="label of roles input">Roles</mat-label>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <mat-select formControlName="roles" multiple>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <mat-select-trigger>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            <span *ngFor="let role of form.get('roles').value"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              >{{ role.name }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            </span>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          </mat-select-trigger>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          <mat-option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            *ngFor="let role of availableRoles"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            [value]="role"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            [matTooltip]="role.description"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            {{ role.description }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            <em style="font-size: x-small">{{ role.name }}</em>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          </mat-option>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </mat-select>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <mat-hint i18n="hint about assigning user roles" class="field-hint">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          You should select at least one user role. Otherwise this user will not
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          even be able to access the basic app layout like the menu.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </mat-hint>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        <mat-error *ngIf="form.hasError('required', 'roles')" i18n>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          This field is required
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        </mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      </mat-form-field>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    <mat-error *ngIf="form.getError('failed')">{{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      form.getError("failed")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }}</mat-error>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  </form>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + ./user-security.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        .buttons-wrapper {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  padding-bottom: 2em;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.field-hint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.field-warning {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  color: #f44336;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@keyframes buttonPulse {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  0% {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    transform: scale(1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  50% {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    transform: scale(1.05);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  100% {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    transform: scale(1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.invite-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  margin: 0 12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.invite-button-animate {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  animation: buttonPulse 1s forwards;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ViewActionsComponent.html b/documentation/components/ViewActionsComponent.html new file mode 100644 index 0000000000..90a9ab42b5 --- /dev/null +++ b/documentation/components/ViewActionsComponent.html @@ -0,0 +1,488 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/common-components/view-actions/view-actions.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Building block for views, providing a consistent layout to action buttons and menus +for both dialog and routed views.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + AfterViewInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(viewContext: ViewComponentContext) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          viewContext + ViewComponentContext + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + template + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + @ViewChild('template')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  AfterViewInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Optional,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { NgTemplateOutlet } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Building block for views, providing a consistent layout to action buttons and menus
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * for both dialog and routed views.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-view-actions",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./view-actions.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [NgTemplateOutlet],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class ViewActionsComponent implements AfterViewInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @ViewChild("template") template: TemplateRef<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(@Optional() protected viewContext: ViewComponentContext) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngAfterViewInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.viewContext) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      setTimeout(() => (this.viewContext.actions = this));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <ng-template #template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <ng-content></ng-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@if (!viewContext) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  <ng-container *ngTemplateOutlet="template"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ViewDistanceComponent.html b/documentation/components/ViewDistanceComponent.html new file mode 100644 index 0000000000..8bf12c918d --- /dev/null +++ b/documentation/components/ViewDistanceComponent.html @@ -0,0 +1,736 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/location/view-distance/view-distance.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Displays the distance between two entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(changeDetector: ChangeDetectorRef) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            changeDetector + ChangeDetectorRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + config +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + distanceFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { ChangeDetectorRef, Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ViewDirective } from "../../../core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Coordinates } from "../coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { getKmDistance } from "../map-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ReadonlyFunctionComponent } from "../../../core/common-components/display-readonly-function/readonly-function.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Config for displaying the distance between two entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface ViewDistanceConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The name of the `GeoResult`/`Coordinates` property of the first entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  coordinatesProperties: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The updates of coordinates of the second entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * A `ReplaySubject` works best for this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  compareCoordinates: Observable<Coordinates[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Displays the distance between two entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@DynamicComponent("DisplayDistance")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-view-distance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  template: `
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    <app-readonly-function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [config]="distanceFunction"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ></app-readonly-function>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  `,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [ReadonlyFunctionComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class ViewDistanceComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  extends ViewDirective<Geolocation, ViewDistanceConfig>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(private changeDetector: ChangeDetectorRef) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  distanceFunction = (_entity: Entity) => "-";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.config.compareCoordinates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .subscribe((coordinates) => this.setDistanceFunction(coordinates));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private setDistanceFunction(compareCoordinates: Coordinates[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.distanceFunction = (e: Entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const distances = this.getAllDistances(compareCoordinates, e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (distances.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const closest = Math.min(...distances).toFixed(2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return $localize`:distance with unit|e.g. 5 km:${closest} km`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return "-";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // somehow changes to `displayFunction` don't trigger the change detection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.changeDetector.detectChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private getAllDistances(compareCoordinates: Coordinates[], e: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const results: number[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (const prop of this.config.coordinatesProperties) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      for (const coord of compareCoordinates) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (e[prop]?.geoLookup && coord) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          results.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            getKmDistance((e[prop] as GeoLocation).geoLookup, coord),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return results;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ViewFileComponent.html b/documentation/components/ViewFileComponent.html new file mode 100644 index 0000000000..a3cbfab009 --- /dev/null +++ b/documentation/components/ViewFileComponent.html @@ -0,0 +1,799 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/file/view-file/view-file.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This component should be used as viewComponent when a property stores files. +If a file is stored, this component allows to view it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(fileService: FileService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              fileService + FileService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + config +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + showFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +showFile(event: Event) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              event + Event + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Public + fileService + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : FileService + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ViewDirective } from "../../../core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FileService } from "../file.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * This component should be used as `viewComponent` when a property stores files.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * If a file is stored, this component allows to view it.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("ViewFile")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-view-file",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./view-file.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["../edit-file/edit-file.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [MatButtonModule, NgIf],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class ViewFileComponent extends ViewDirective<string> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(public fileService: FileService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  showFile(event: Event) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // Prevent event bubbling
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    event.stopPropagation();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.fileService.showFile(this.entity, this.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <button mat-button class="filename" *ngIf="value" (click)="showFile($event)">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  {{ value }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + ../edit-file/edit-file.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              /* let click events on disabled input be handled by parent element (because browsers completely eat them up otherwise)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + https://stackoverflow.com/a/32925830/1473411  */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +input[disabled] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  pointer-events: none;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.clickable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.clickable * {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  cursor: pointer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +.filename {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  font-style: italic;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ViewLocationComponent.html b/documentation/components/ViewLocationComponent.html new file mode 100644 index 0000000000..25c856c266 --- /dev/null +++ b/documentation/components/ViewLocationComponent.html @@ -0,0 +1,583 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/location/view-location/view-location.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + ViewDirective +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + config +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:10 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:6 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:7 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:8 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:9 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from ViewDirective +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in ViewDirective:13 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ViewDirective } from "../../../core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@DynamicComponent("ViewLocation")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-view-location",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./view-location.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [FaIconComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ViewLocationComponent extends ViewDirective<GeoLocation> {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                {{ value?.locationString }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@if (value?.geoLookup) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  <fa-icon icon="location-dot"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/ViewTitleComponent.html b/documentation/components/ViewTitleComponent.html new file mode 100644 index 0000000000..4b3f6af5e2 --- /dev/null +++ b/documentation/components/ViewTitleComponent.html @@ -0,0 +1,936 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/common-components/view-title/view-title.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Building block for views, providing a consistent layout to a title section +for both dialog and routed views.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + AfterViewInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  HostBindings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(router: Router, location: Location, viewContext: ViewComponentContext) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  viewContext + ViewComponentContext + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + disableBackButton +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Optional) do not show button to navigate back to the parent page

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + displayInPlace +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + title +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The page title to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  HostBindings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + class + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "mat-title" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + navigateBack + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + navigateBack() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + extraClasses + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "mat-title" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + @HostBinding('class')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + navigateToParentBehaviour + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  whether instead of a basic back to previous page navigation the back button should navigate to logical parent page

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Readonly + parentUrl + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + template + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + @ViewChild('template')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  AfterViewInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  HostBinding,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Optional,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { getUrlWithoutParams } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Location, NgIf, NgTemplateOutlet } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Building block for views, providing a consistent layout to a title section
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * for both dialog and routed views.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-view-title",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./view-title.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./view-title.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgTemplateOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class ViewTitleComponent implements AfterViewInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @ViewChild("template") template: TemplateRef<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** The page title to be displayed */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** (Optional) do not show button to navigate back to the parent page */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() disableBackButton: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * whether instead of a basic back to previous page navigation the back button should navigate to logical parent page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  navigateToParentBehaviour: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  readonly parentUrl: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    @Optional() protected viewContext: ViewComponentContext,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.parentUrl = this.findParentUrl();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.viewContext?.isDialog) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.disableBackButton = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngAfterViewInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.viewContext && !this.displayInPlace) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      setTimeout(() => (this.viewContext.title = this));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private findParentUrl(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const currentUrl = getUrlWithoutParams(this.router);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const lastUrlSegmentStart = currentUrl.lastIndexOf("/");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (lastUrlSegmentStart < 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // do not navigate to root
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return currentUrl.substring(0, lastUrlSegmentStart);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async navigateBack() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.navigateToParentBehaviour && this.parentUrl) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      await this.router.navigate([this.parentUrl]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.location.back();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @HostBinding("class") extraClasses = "mat-title";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() displayInPlace!: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <ng-template #template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <div class="container flex-row">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      *ngIf="(parentUrl || !navigateToParentBehaviour) && !disableBackButton"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      mat-icon-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      (click)="navigateBack()"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      i18n-matTooltip="Generic back button"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      matTooltip="Back"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <fa-icon icon="arrow-left"></fa-icon>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </button>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    <h1 class="remove-margin-bottom flex-grow">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      <ng-content></ng-content>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    </h1>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  </div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@if (!viewContext || displayInPlace) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  <ng-container *ngTemplateOutlet="template"></ng-container>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + ./view-title.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  .container {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  align-items: center;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  margin-bottom: 0 !important;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +.back-button {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  position: relative;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  left: -12px;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/components/WidgetContentComponent.html b/documentation/components/WidgetContentComponent.html new file mode 100644 index 0000000000..7e5c0940e7 --- /dev/null +++ b/documentation/components/WidgetContentComponent.html @@ -0,0 +1,333 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/dashboard/dashboard-widget/widget-content/widget-content.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-widget-content",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  template: `<ng-content></ng-content>`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["widget-content.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class WidgetContentComponent {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + widget-content.component.scss +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    :host {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  width: 100%;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  display: flex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  flex-direction: column;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Legend +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Component +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Html element with directive +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/contributing.html b/documentation/contributing.html new file mode 100644 index 0000000000..ba244d75c5 --- /dev/null +++ b/documentation/contributing.html @@ -0,0 +1,225 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Welcome!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Aam Digital is open source because we believe in building things together +and letting people benefit from and adapt things rather than everybody reinventing their own wheel.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      In order to build great software for small social impact organisations +we welcome anybody willing to contribute. +We are a small core team of full-time developers as well as a few regular volunteer contributors. +So whether you want to extend our code for your own use case or just help out - +we welcome any contributions to make this project better!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get started

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      To get started, please have a look at our Developer Documentation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Work through the Tutorial.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • This walks you through the setup and basic understanding of the project and also gives an overview of the technologies and frameworks involved.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Feel free to skip over steps that seem trivial to you, we tried to make this very beginner friendly.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      3. Check our workflow regarding pull requests: How to contribute code
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      4. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      5. Don't hesitate to ask questions!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      6. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get in touch

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Do get in touch with us by creating an issue here or +writing to info@aam-digital.com.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Our main communication channels in the team are

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • GitHub issues and pull requests. +Feel free to open one yourself also to ask a question.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Slack. Write us an e-mail to get an invitation to our workspace.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Where can I help?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Have a look at our issues on GitHub. +Some of them are explicitly label as suitable issues for a new contributor to work on: Community Help Wanted. +If you are not sure whether you should work on a certain issue, just post a short comment in the issue to clarify.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Whenever you start working on an issue, please assign yourself on the GitHub issue and change the "status" within the project to "In Progress".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      We organize our work using GitHub Projects' kanban boards and issue labels:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Project Board
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Get an overview of all issues (across all repositories) and their status here, we use a kanban-style board where issues are moved through the columns based on their status.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • The issues in the board are sorted by priority (most important on top).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Please do not work on issues in the "Triage / Analysis" status, these topics still required a clearer definition and approval from the core team.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Labels
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Our labels are scoped into a few logical groups (e.g. "Status" or "Type" related labels), do check the descriptions shown beside the label name in the list of GitHub labels.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • The same labels are maintained across all our repositories.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/coverage.html b/documentation/coverage.html new file mode 100644 index 0000000000..9e2bd84723 --- /dev/null +++ b/documentation/coverage.html @@ -0,0 +1,8097 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        FileTypeIdentifierStatements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/app.component.ts + componentAppComponent + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/activities-overview/activities-overview.component.ts + componentActivitiesOverviewComponent + 35 % + (7/20) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/activity-attendance-section/activity-attendance-section.component.ts + componentActivityAttendanceSectionComponent + 0 % + (0/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/activity-card/activity-card.component.ts + componentActivityCardComponent + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/add-day-attendance/add-day-attendance.component.ts + componentAddDayAttendanceComponent + 7 % + (1/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/add-day-attendance/roll-call-setup/roll-call-setup.component.ts + componentRollCallSetupComponent + 5 % + (1/20) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call-tab/roll-call-tab.component.ts + componentRollCallTabComponent + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts + componentRollCallComponent + 36 % + (8/22) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts + injectableHorizontalHammerConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance-block/attendance-block.component.ts + componentAttendanceBlockComponent + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance-calendar/attendance-calendar.component.ts + componentAttendanceCalendarComponent + 0 % + (0/18) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance-components.ts + variableattendanceComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance-details/attendance-details.component.ts + componentAttendanceDetailsComponent + 0 % + (0/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance-manager/attendance-manager.component.ts + componentAttendanceManagerComponent + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance-status-select/attendance-status-select.component.ts + componentAttendanceStatusSelectComponent + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance-summary/attendance-summary.component.ts + componentAttendanceSummaryComponent + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/attendance.service.ts + injectableAttendanceService + 33 % + (3/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-day-block/attendance-day-block.component.ts + componentAttendanceDayBlockComponent + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.ts + componentAttendanceWeekDashboardComponent + 40 % + (4/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.ts + interfaceAttendanceWeekRow + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/demo-data/demo-activity-events-generator.service.ts + classDemoEventsConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/demo-data/demo-activity-events-generator.service.ts + injectableDemoActivityEventsGeneratorService + 71 % + (5/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/demo-data/demo-activity-generator.service.ts + injectableDemoActivityGeneratorService + 71 % + (5/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/edit-attendance/edit-attendance.component.ts + componentEditAttendanceComponent + 47 % + (8/17) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/activity-attendance.ts + classActivityAttendance + 64 % + (27/42) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/activity-attendance.ts + functiongenerateEventWithAttendance + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/attendance-status.ts + interfaceAttendanceStatusType + 100 % + (6/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/attendance-status.ts + variableATTENDANCE_STATUS_CONFIG_ID + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/attendance-status.ts + variableNullAttendanceStatusType + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/calculate-average-event-attendance.ts + interfaceAverageAttendanceStats + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/calculate-average-event-attendance.ts + functioncalculateAverageAttendance + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/event-attendance.datatype.ts + injectableEventAttendanceDatatype + 46 % + (6/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/event-attendance.datatype.ts + injectableEventAttendanceMapDatatype + 53 % + (7/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/event-attendance.ts + classEventAttendance + 20 % + (1/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/event-attendance.ts + classEventAttendanceMap + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/event-note.ts + classEventNote + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/model/recurring-activity.ts + classRecurringActivity + 63 % + (7/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/attendance/recent-attendance-blocks/recent-attendance-blocks.component.ts + componentRecentAttendanceBlocksComponent + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/child-block/child-block-tooltip/child-block-tooltip.component.ts + componentChildBlockTooltipComponent + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/child-block/child-block.component.ts + componentChildBlockComponent + 28 % + (2/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/child-details/grouped-child-attendance/grouped-child-attendance.component.ts + componentGroupedChildAttendanceComponent + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/child-school-overview/child-school-overview.component.ts + componentChildSchoolOverviewComponent + 20 % + (5/24) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/children-components.ts + variablechildrenComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/children.service.ts + injectableChildrenService + 55 % + (5/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/aser/demo-aser-generator.service.ts + injectableDemoAserGeneratorService + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/aser/skill-levels.ts + variablemathLevels + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/aser/skill-levels.ts + variablereadingLevels + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/demo-child-generator.service.ts + classDemoChildConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/demo-child-generator.service.ts + injectableDemoChildGenerator + 33 % + (3/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/demo-child-school-relation-generator.service.ts + injectableDemoChildSchoolRelationGenerator + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/demo-school-generator.service.ts + classDemoSchoolConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/demo-school-generator.service.ts + injectableDemoSchoolGenerator + 42 % + (3/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/educational-material/demo-educational-material-generator.service.ts + classDemoEducationMaterialConfig + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/educational-material/demo-educational-material-generator.service.ts + injectableDemoEducationalMaterialGeneratorService + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/educational-material/materials.ts + variablematerials + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/fixtures/centers.ts + variablecentersUnique + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/fixtures/centers.ts + variablecentersWithProbability + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/fixtures/dropout-types.ts + variabledropoutTypes + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/fixtures/languages.ts + variablelanguages + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/fixtures/religions.ts + variablereligions + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/health-check/demo-health-check-generator.service.ts + injectableDemoHealthCheckGeneratorService + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/health-check/height-weight.ts + variableheightRangeForAge + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/health-check/height-weight.ts + variableweightRangeForAge + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/observations/demo-historical-data-generator.ts + classDemoHistoricalDataConfig + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/observations/demo-historical-data-generator.ts + injectableDemoHistoricalDataGenerator + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/demo-data-generators/observations/rating-answers.ts + variableratingAnswers + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/display-participants-count/display-participants-count.component.ts + componentDisplayParticipantsCountComponent + 11 % + (1/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/model/childSchoolRelation.ts + classChildSchoolRelation + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/children/model/genders.ts + variablegenders + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/dashboard-widgets/important-notes-dashboard/important-notes-dashboard.component.ts + componentImportantNotesDashboardComponent + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/dashboard-widgets/notes-dashboard/notes-dashboard.component.ts + componentNotesDashboardComponent + 50 % + (5/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/dashboard-widgets/notes-dashboard/notes-dashboard.component.ts + interfaceEntityWithRecentNoteInfo + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/dashboard-widgets/notes-dashboard/notes-dashboard.component.ts + interfaceNotesDashboardConfig + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/dashboard-widgets/notes-dashboard/notes-dashboard.component.ts + functionstatsToEntityWithRecentNoteInfo + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/demo-data/demo-note-generator.service.ts + classDemoNoteConfig + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/demo-data/demo-note-generator.service.ts + injectableDemoNoteGeneratorService + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/demo-data/notes_group-stories.ts + variablenoteGroupStories + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/demo-data/notes_individual-stories.ts + variablenoteIndividualStories + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/demo-data/remarks.ts + variableabsenceRemarks + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/model/interaction-type.interface.ts + interfaceInteractionType + 100 % + (2/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/model/interaction-type.interface.ts + variableINTERACTION_TYPE_CONFIG_ID + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/model/note.ts + classNote + 50 % + (13/26) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/note-attendance-block/note-attendance-count-block.component.ts + componentNoteAttendanceCountBlockComponent + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/note-details/note-details.component.ts + componentNoteDetailsComponent + 11 % + (2/17) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/notes-components.ts + variablenotesComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/notes-manager/notes-manager.component.ts + componentNotesManagerComponent + 0 % + (0/16) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/notes-manager/notes-manager.component.ts + interfaceNotesManagerConfig + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/notes/notes-related-to-entity/notes-related-to-entity.component.ts + componentNotesRelatedToEntityComponent + 39 % + (9/23) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/warning-level.ts + functiongetWarningLevelColor + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/child-dev-project/warning-level.ts + variablewarningLevels + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-details/admin-entity-details.component.ts + componentAdminEntityDetailsComponent + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-field/admin-edit-description-only-field/admin-edit-description-only-field.component.ts + componentAdminEditDescriptionOnlyFieldComponent + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-field/admin-entity-field.component.ts + componentAdminEntityFieldComponent + 11 % + (2/18) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-field/admin-entity-field.component.ts + interfaceSimpleDropdownValue + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-field/anonymize-options/anonymize-options.component.ts + componentAnonymizeOptionsComponent + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-field/configure-entity-field-validator/configure-entity-field-validator.component.ts + componentConfigureEntityFieldValidatorComponent + 50 % + (3/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-field/default-value-options/default-value-options.component.ts + componentDefaultValueOptionsComponent + 0 % + (0/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-form/admin-entity-form.component.ts + componentAdminEntityFormComponent + 18 % + (3/16) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-details/admin-entity-panel-component/admin-entity-panel-component.component.ts + componentAdminEntityPanelComponentComponent + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-list/admin-entity-list.component.ts + componentAdminEntityListComponent + 0 % + (0/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity-types/admin-entity-types.component.ts + componentAdminEntityTypesComponent + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity.service.ts + injectableAdminEntityService + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.ts + componentAdminEntityGeneralSettingsComponent + 0 % + (0/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.ts + interfaceSimpleDropdownValue + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-entity/admin-entity.component.ts + componentAdminEntityComponent + 0 % + (0/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-overview/admin-overview.component.ts + componentAdminOverviewComponent + 70 % + (7/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/admin-overview/admin-overview.service.ts + injectableAdminOverviewService + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/backup/backup.service.ts + injectableBackupService + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/building-blocks/admin-section-header/admin-section-header.component.ts + componentAdminSectionHeaderComponent + 50 % + (4/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/building-blocks/admin-tabs/admin-tab-template.directive.ts + directiveAdminTabTemplateDirective + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/building-blocks/admin-tabs/admin-tab-template.directive.ts + interfaceAdminTabTemplateContext + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/building-blocks/admin-tabs/admin-tabs.component.ts + componentAdminTabsComponent + 22 % + (2/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/setup-wizard/setup-wizard-button/setup-wizard-button.component.ts + componentSetupWizardButtonComponent + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/setup-wizard/setup-wizard-config.ts + interfaceSetupWizardConfig + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/setup-wizard/setup-wizard-config.ts + interfaceSetupWizardStep + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/setup-wizard/setup-wizard-config.ts + variableCONFIG_SETUP_WIZARD_ID + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/setup-wizard/setup-wizard-config.ts + variabledefaultSetupWizardConfig + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/admin/setup-wizard/setup-wizard.component.ts + componentSetupWizardComponent + 0 % + (0/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/alerts/alert-config.ts + interfaceAlertConfig + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/alerts/alert-config.ts + interfaceExtendedAlertConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/alerts/alert-stories-helper.component.ts + componentAlertStoriesHelperComponent + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/alerts/alert.service.ts + injectableAlertService + 85 % + (6/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/analytics/analytics.service.ts + injectableAnalyticsService + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/analytics/usage-analytics-config.ts + interfaceUsageAnalyticsConfig + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/analytics/usage-analytics-config.ts + variableUSAGE_ANALYTICS_CONFIG_ID + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/boolean/boolean.datatype.ts + injectableBooleanDatatype + 9 % + (1/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/boolean/display-checkmark/display-checkmark.component.ts + componentDisplayCheckmarkComponent + 28 % + (2/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/boolean/edit-boolean/boolean-input/boolean-input.component.ts + componentBooleanInputComponent + 0 % + (0/33) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/boolean/edit-boolean/edit-boolean.component.ts + componentEditBooleanComponent + 90 % + (9/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum-datatype/configurable-enum.datatype.ts + injectableConfigurableEnumDatatype + 25 % + (3/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum-directive/configurable-enum.directive.ts + directiveConfigurableEnumDirective + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum-ordering.ts + interfaceHasOrdinal + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum-ordering.ts + functionhasOrdinalValue + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum-ordering.ts + functionimposeTotalOrdering + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum-testing.ts + functioncreateTestingConfigurableEnumService + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum-testing.ts + variabledemoEnums + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum.interface.ts + interfaceConfigurableEnumValue + 100 % + (6/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum.interface.ts + variableEMPTY + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum.service.ts + injectableConfigurableEnumService + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum.ts + classConfigurableEnum + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configurable-enum.ts + classDuplicateEnumOptionException + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/configure-enum-popup/configure-enum-popup.component.ts + componentConfigureEnumPopupComponent + 0 % + (0/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/demo-configurable-enum-generator.service.ts + injectableDemoConfigurableEnumGeneratorService + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/display-configurable-enum/display-configurable-enum.component.ts + componentDisplayConfigurableEnumComponent + 25 % + (2/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/edit-configurable-enum/edit-configurable-enum.component.ts + componentEditConfigurableEnumComponent + 75 % + (9/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/configurable-enum/enum-dropdown/enum-dropdown.component.ts + componentEnumDropdownComponent + 0 % + (0/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date-only/date-only.datatype.ts + injectableDateOnlyDatatype + 18 % + (2/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date-only/date-only.datatype.ts + functionmigrateIsoDatesToInferredDateOnly + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date-with-age/date-with-age.datatype.ts + injectableDateWithAgeDatatype + 18 % + (2/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date-with-age/dateWithAge.ts + classDateWithAge + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date-with-age/display-age/display-age.component.ts + componentDisplayAgeComponent + 25 % + (2/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date-with-age/edit-age/edit-age.component.ts + componentEditAgeComponent + 81 % + (9/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/date-import-config/date-import-config.component.ts + componentDateImportConfigComponent + 12 % + (1/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/date-range-filter/date-range-filter-panel/date-range-filter-panel.component.ts + componentDateRangeFilterPanelComponent + 0 % + (0/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/date-range-filter/date-range-filter-panel/date-range-filter-panel.component.ts + functioncalculateDateRange + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/date-range-filter/date-range-filter-panel/date-range-filter-panel.component.ts + variabledefaultDateFilters + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/date-range-filter/date-range-filter.component.ts + componentDateRangeFilterComponent + 0 % + (0/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/date.datatype.ts + injectableDateDatatype + 27 % + (3/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/display-date/display-date.component.ts + componentDisplayDateComponent + 37 % + (3/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/date/edit-date/edit-date.component.ts + componentEditDateComponent + 90 % + (9/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts + componentDiscreteImportConfigComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/discrete/discrete.datatype.ts + classDiscreteDatatype + 45 % + (5/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/entity/display-entity/display-entity.component.ts + componentDisplayEntityComponent + 11 % + (1/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/entity/edit-entity/edit-entity.component.ts + componentEditEntityComponent + 71 % + (10/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/entity/entity-block/entity-block.component.ts + componentEntityBlockComponent + 25 % + (2/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/entity/entity-import-config/entity-import-config.component.ts + componentEntityImportConfigComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/entity/entity.datatype.ts + injectableEntityDatatype + 16 % + (2/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/month/display-month/display-month.component.ts + componentDisplayMonthComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/month/edit-month/edit-month.component.ts + componentEditMonthComponent + 81 % + (9/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/month/edit-month/edit-month.component.ts + variableMY_FORMATS + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/month/month.datatype.ts + injectableMonthDatatype + 18 % + (2/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/number/display-dynamic-percentage/display-calculated-value.component.ts + componentDisplayCalculatedValueComponent + 40 % + (4/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/number/display-percentage/display-percentage.component.ts + componentDisplayPercentageComponent + 10 % + (1/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/number/display-unit/display-unit.component.ts + componentDisplayUnitComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/number/edit-number/edit-number.component.ts + componentEditNumberComponent + 90 % + (9/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/number/number.datatype.ts + injectableNumberDatatype + 45 % + (5/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/schema-embed/schema-embed.datatype.ts + classSchemaEmbedDatatype + 61 % + (8/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/string/display-text/display-text.component.ts + componentDisplayTextComponent + 28 % + (2/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/string/edit-long-text/edit-long-text.component.ts + componentEditLongTextComponent + 90 % + (9/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/string/edit-text/edit-text.component.ts + componentEditTextComponent + 90 % + (9/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/string/long-text.datatype.ts + injectableLongTextDatatype + 54 % + (6/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/basic-datatypes/string/string.datatype.ts + injectableStringDatatype + 54 % + (6/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/basic-autocomplete/basic-autocomplete.component.ts + componentBasicAutocompleteComponent + 8 % + (5/58) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/basic-autocomplete/basic-autocomplete.component.ts + interfaceSelectableOption + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/basic-autocomplete/custom-form-control.directive.ts + directiveCustomFormControlDirective + 0 % + (0/32) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/border-highlight/border-highlight.directive.ts + directiveBorderHighlightDirective + 12 % + (1/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/confirmation-dialog.service.ts + injectableConfirmationDialogService + 60 % + (3/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts + componentConfirmationDialogComponent + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts + interfaceConfirmationDialogButton + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts + interfaceConfirmationDialogConfig + 100 % + (5/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts + variableOkButton + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts + variableYesNoButtons + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts + variableYesNoCancelButtons + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/confirmation-dialog/progress-dialog/progress-dialog.component.ts + componentProgressDialogComponent + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/description-only/edit-description-only/edit-description-only.component.ts + componentEditDescriptionOnlyComponent + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/dialog-close/dialog-close.component.ts + componentDialogCloseComponent + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/display-readonly-function/entity-function.pipe.ts + pipeEntityFunctionPipe + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/display-readonly-function/readonly-function.component.ts + componentReadonlyFunctionComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/edit-text-with-autocomplete/edit-text-with-autocomplete.component.ts + componentEditTextWithAutocompleteComponent + 43 % + (10/23) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/entities-table.component.ts + componentEntitiesTableComponent + 34 % + (15/44) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/entities-table.component.ts + interfaceTableRow + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/entity-inline-edit-actions/entity-inline-edit-actions.component.ts + componentEntityInlineEditActionsComponent + 37 % + (3/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/list-paginator/list-paginator.component.ts + componentListPaginatorComponent + 0 % + (0/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/table-sort/table-sort.ts + functioncompareValues + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/table-sort/table-sort.ts + functiongetComparableValue + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/table-sort/table-sort.ts + functiontableSort + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/value-accessor/value-accessor.ts + functiongetReadableValue + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/value-accessor/value-accessor.ts + functionisConfigurableEnum + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entities-table/value-accessor/value-accessor.ts + functiontransformToReadableFormat + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-create-button/entity-create-button.component.ts + componentEntityCreateButtonComponent + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-field-edit/entity-field-edit.component.ts + componentEntityFieldEditComponent + 57 % + (4/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-field-label/entity-field-label.component.ts + componentEntityFieldLabelComponent + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-field-view/entity-field-view.component.ts + componentEntityFieldViewComponent + 50 % + (3/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-fields-menu/entity-fields-menu.component.ts + componentEntityFieldsMenuComponent + 0 % + (0/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/FormConfig.ts + interfaceFormFieldConfig + 100 % + (7/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/FormConfig.ts + functiontoFormFieldConfig + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/dynamic-form-validators/dynamic-validators.service.ts + injectableDynamicValidatorsService + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/dynamic-form-validators/dynamic-validators.service.ts + functionpatternWithMessage + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/entity-form.service.ts + injectableEntityFormService + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/entity-form.service.ts + interfaceEntityForm + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/entity-form/entity-form.component.ts + componentEntityFormComponent + 50 % + (3/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/invalid-form-field.error.ts + classInvalidFormFieldError + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-form/unique-id-validator/unique-id-validator.ts + functionuniqueIdValidator + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-select/entity-select.component.ts + componentEntitySelectComponent + 40 % + (8/20) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-select/entity-select.component.ts + functionapplyTextToCreatedEntity + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-select/entity-select.component.ts + functionisMulti + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/entity-type-label/entity-type-label.pipe.ts + pipeEntityTypeLabelPipe + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/error-hint/error-hint.component.ts + componentErrorHintComponent + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/fa-dynamic-icon/fa-dynamic-icon.component.ts + componentFaDynamicIconComponent + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/fa-dynamic-icon/fa-dynamic-icon.component.ts + variableiconAliases + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/help-button/help-button.component.ts + componentHelpButtonComponent + 100 % + (2/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/input-file/input-file.component.ts + componentInputFileComponent + 28 % + (2/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/input-file/input-file.component.ts + interfaceParsedData + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/pill/pill.component.ts + componentPillComponent + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/template-tooltip/template-tooltip.component.ts + componentTemplateTooltipComponent + 25 % + (2/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/template-tooltip/template-tooltip.directive.ts + directiveTemplateTooltipDirective + 83 % + (5/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/view-actions/view-actions.component.ts + componentViewActionsComponent + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/common-components/view-title/view-title.component.ts + componentViewTitleComponent + 36 % + (4/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config-fix.ts + variabledefaultJsonConfig + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.app-initializer.ts + variableAPP_INITIALIZER_PROPAGATE_CONFIG_UPDATES + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + injectableConfigService + 40 % + (4/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateChildrenListConfig + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateEntityArrayDatatype + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateEntityAttributesWithId + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateEntityDetailsInputEntityType + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateEntitySchemaDefaultValue + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateFormFieldConfigView2ViewComponent + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateFormHeadersIntoFieldGroups + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateHistoricalDataComponent + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.service.ts + variablemigrateMenuItemConfig + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/config.ts + classConfig + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/default-config/default-attendance-status-types.ts + variabledefaultAttendanceStatusTypes + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/default-config/default-interaction-types.ts + variabledefaultInteractionTypes + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/demo-config-generator.service.ts + injectableDemoConfigGeneratorService + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-components/dynamic-component-config.interface.ts + interfaceDynamicComponentConfig + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-components/dynamic-component.decorator.ts + variableDynamicComponent + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-components/dynamic-component.directive.ts + directiveDynamicComponentDirective + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-components/dynamic-component.pipe.ts + pipeDynamicComponentPipe + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-routing/empty/application-loading.component.ts + componentApplicationLoadingComponent + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-routing/not-found/not-found.component.ts + componentNotFoundComponent + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-routing/route-permissions.service.ts + injectableRoutePermissionsService + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-routing/router.service.ts + injectableRouterService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-routing/view-config.interface.ts + interfaceViewConfig + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/dynamic-routing/view-config.interface.ts + variablePREFIX_VIEW_CONFIG + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/migrate-add-entity-attributes.ts + functionapplyDefaultFieldsForEntityConfig + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/migrate-add-entity-attributes.ts + functionmigrateAddMissingEntityAttributes + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/migrate-add-entity-attributes.ts + variableDEFAULT_ENTITIES + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/registry/dynamic-registry.ts + classRegistry + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/config/testing-config-service.ts + functioncreateTestingConfigService + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/core-components.ts + variablecoreComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.ts + componentDashboardListWidgetComponent + 33 % + (5/15) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/dashboard/dashboard-widget/dashboard-widget.component.ts + componentDashboardWidgetComponent + 25 % + (2/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/dashboard/dashboard-widget/dashboard-widget.ts + classDashboardWidget + 100 % + (2/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/dashboard/dashboard-widget/widget-content/widget-content.component.ts + componentWidgetContentComponent + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/dashboard/dashboard/dashboard.component.ts + componentDashboardComponent + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/dashboard/dashboard/dashboard.component.ts + interfaceDashboardConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/database/database.ts + classDatabase + 83 % + (10/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/database/pouch-database.ts + classDatabaseException + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/database/pouch-database.ts + injectablePouchDatabase + 95 % + (19/20) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/database/query-data-source.ts + classQueryDataSource + 83 % + (5/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/database/sync.service.ts + injectableSyncService + 57 % + (4/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/default-value-strategy.interface.ts + classDefaultValueStrategy + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/default-value-strategy.interface.ts + functiongetConfigsByMode + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/default-value.service.ts + injectableDefaultValueService + 20 % + (1/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/default-value.service.ts + interfaceEmptyDefaultValueHint + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/default-value.service.ts + interfaceFullDefaultValueHint + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/dynamic-placeholder-value.service.ts + injectableDynamicPlaceholderValueService + 20 % + (1/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/inherited-value-button/inherited-value-button.component.ts + componentInheritedValueButtonComponent + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/default-values/inherited-value.service.ts + injectableInheritedValueService + 50 % + (3/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/create-entity-of-type.ts + functioncreateEntityOfType + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/demo-data-generating-progress-dialog.component.ts + componentDemoDataGeneratingProgressDialogComponent + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/demo-data-generator.ts + classDemoDataGenerator + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/demo-data-initializer.service.ts + injectableDemoDataInitializerService + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/demo-data.app-initializer.ts + variableAPP_INITIALIZER_DEMO_DATA + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/demo-data.module.ts + variabledemoDataGeneratorProviders + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/demo-data.service.ts + classDemoDataServiceConfig + 100 % + (2/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/demo-data.service.ts + injectableDemoDataService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/faker.ts + classCustomFaker + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/demo-data/faker.ts + variablefaker + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/EntityDetailsConfig.ts + interfaceEntityDetailsConfig + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/EntityDetailsConfig.ts + interfacePanel + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/EntityDetailsConfig.ts + interfacePanelComponent + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/EntityDetailsConfig.ts + interfacePanelConfig + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/abstract-entity-details/abstract-entity-details.component.ts + directiveAbstractEntityDetailsComponent + 11 % + (1/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/entity-actions-menu/entity-action.interface.ts + interfaceEntityAction + 75 % + (6/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/entity-actions-menu/entity-actions-menu.component.ts + componentEntityActionsMenuComponent + 37 % + (3/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/entity-actions-menu/entity-actions-menu.service.ts + injectableEntityActionsMenuService + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/entity-archived-info/entity-archived-info.component.ts + componentEntityArchivedInfoComponent + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/entity-details/entity-details.component.ts + componentEntityDetailsComponent + 22 % + (2/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/form/field-group.ts + interfaceFieldGroup + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/form/form.component.ts + componentFormComponent + 12 % + (1/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/form/form.component.ts + interfaceFormConfig + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/form/unsaved-changes.service.ts + injectableUnsavedChangesService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/related-entities-with-summary/related-entities-with-summary.component.ts + componentRelatedEntitiesWithSummaryComponent + 41 % + (10/24) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/related-entities/related-entities.component.ts + componentRelatedEntitiesComponent + 40 % + (8/20) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/related-time-period-entities/related-time-period-entities.component.ts + componentRelatedTimePeriodEntitiesComponent + 27 % + (6/22) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/related-time-period-entities/related-time-period-entities.component.ts + variableisActiveIndicator + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-details/related-time-period-entities/time-period.ts + classTimePeriod + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceBasicFilterConfig + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceBooleanFilterConfig + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceColumnGroupsConfig + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceConfigurableEnumFilterConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceDateRangeFilterConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceDateRangeFilterConfigOption + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceEntityListConfig + 87 % + (7/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfaceGroupConfig + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfacePrebuiltFilterConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/EntityListConfig.ts + interfacePrebuiltFilterConfig + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/duplicate-records/duplicate-records.service.ts + injectableDuplicateRecordService + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity-list/entity-list/entity-list.component.ts + componentEntityListComponent + 13 % + (5/37) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/database-entity.decorator.ts + classEntityRegistry + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/database-entity.decorator.ts + functionDatabaseEntity + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/database-entity.decorator.ts + variableentityRegistry + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/database-field.decorator.ts + functionaddPropertySchema + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/database-field.decorator.ts + functionDatabaseField + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/database-field.decorator.ts + functiongetEntitySchema + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/database-indexing/database-indexing.service.ts + injectableDatabaseIndexingService + 75 % + (6/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/default-datatype/default.datatype.ts + classDefaultDatatype + 90 % + (10/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/default-datatype/edit-component-story-utils.ts + functiongenerateFormFieldStory + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/default-datatype/edit-component.ts + directiveEditComponent + 100 % + (10/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/default-datatype/view.directive.ts + directiveViewDirective + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-actions/cascading-entity-action.ts + classCascadingActionResult + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-actions/cascading-entity-action.ts + classCascadingEntityAction + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-actions/entity-actions.service.ts + injectableEntityActionsService + 71 % + (5/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-actions/entity-anonymize.service.ts + injectableEntityAnonymizeService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-actions/entity-delete.service.ts + injectableEntityDeleteService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-config.service.ts + injectableEntityConfigService + 40 % + (4/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-config.ts + interfaceEntityConfig + 100 % + (10/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-mapper/entity-mapper.service.ts + injectableEntityMapperService + 70 % + (7/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-mapper/mock-entity-mapper-service.ts + classMockEntityMapperService + 47 % + (8/17) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-mapper/mock-entity-mapper-service.ts + functionmockEntityMapper + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-special-loader/entity-special-loader.service.ts + injectableEntitySpecialLoaderService + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/entity-special-loader/historical-data/historical-data.service.ts + injectableHistoricalDataService + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/latest-entity-loader.ts + classLatestEntityLoader + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/model/entity-update.ts + interfaceUpdatedEntity + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/model/entity-update.ts + functionapplyUpdate + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/model/entity.ts + classEntity + 84 % + (22/26) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/model/update-metadata.datatype.ts + injectableUpdateMetadataDatatype + 53 % + (7/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/model/update-metadata.ts + classUpdateMetadata + 60 % + (3/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/schema/default-value-config.ts + interfaceDefaultValueConfig + 100 % + (5/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/schema/entity-schema-field.ts + interfaceEntitySchemaField + 93 % + (15/16) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/entity/schema/entity-schema.service.ts + injectableEntitySchemaService + 90 % + (9/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/data-transformation-service/data-transformation.service.ts + injectableDataTransformationService + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/data-transformation-service/data-transformation.service.ts + interfaceExportRow + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/data-transformation-service/export-column-config.ts + interfaceExportColumnConfig + 100 % + (5/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/download-service/download.service.ts + injectableDownloadService + 71 % + (5/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/export-data-directive/export-data.directive.ts + directiveExportDataDirective + 62 % + (5/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/query.service.ts + injectableQueryService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/query.service.ts + interfaceAttendanceInfo + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/export/query.service.ts + interfaceAttendanceReport + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filter-generator/filter-generator.service.ts + injectableFilterGeneratorService + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filter-generator/filter-predicate.ts + functionentityFilterPredicate + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filter-overlay/filter-overlay.component.ts + componentFilterOverlayComponent + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filter-overlay/filter-overlay.component.ts + interfaceFilterOverlayData + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filter.service.ts + injectableFilterService + 60 % + (3/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filter/filter.component.ts + componentFilterComponent + 66 % + (8/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filters/booleanFilter.ts + classBooleanFilter + 72 % + (8/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filters/configurableEnumFilter.ts + classConfigurableEnumFilter + 72 % + (8/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filters/dateFilter.ts + classDateFilter + 27 % + (3/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filters/entityFilter.ts + classEntityFilter + 72 % + (8/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filters/filters.ts + classFilter + 25 % + (2/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filters/filters.ts + classSelectableFilter + 90 % + (10/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/filters/filters.ts + interfaceFilterSelectionOption + 100 % + (5/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/filter/list-filter/list-filter.component.ts + componentListFilterComponent + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/form-dialog/dialog-buttons/dialog-buttons.component.ts + componentDialogButtonsComponent + 0 % + (0/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/form-dialog/form-dialog.service.ts + injectableFormDialogService + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/form-dialog/row-details/row-details.component.ts + componentRowDetailsComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/form-dialog/row-details/row-details.component.ts + interfaceDetailsComponentData + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/column-mapping.ts + interfaceColumnMapping + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-additional-actions/additional-import-action.ts + interfaceAdditionalImportAction + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-additional-actions/import-additional-actions.component.ts + componentImportAdditionalActionsComponent + 7 % + (1/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-column-mapping/import-column-mapping.component.ts + componentImportColumnMappingComponent + 30 % + (4/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-column-mapping/import-column-mapping.component.ts + interfaceMappingDialogData + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-column-mapping/import-column-mapping.service.ts + injectableImportColumnMappingService + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-confirm-summary/import-confirm-summary.component.ts + componentImportConfirmSummaryComponent + 20 % + (1/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-confirm-summary/import-confirm-summary.component.ts + interfaceImportDialogData + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-entity-type/import-entity-type.component.ts + componentImportEntityTypeComponent + 50 % + (3/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-file/import-file.component.ts + componentImportFileComponent + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-history/import-history.component.ts + componentImportHistoryComponent + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-metadata.ts + classImportMetadata + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-metadata.ts + interfaceImportSettings + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import-review-data/import-review-data.component.ts + componentImportReviewDataComponent + 0 % + (0/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import.service.ts + injectableImportService + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import/import-sample-raw-data.ts + variableIMPORT_SAMPLE_ADDITIONAL_ACTIONS + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import/import-sample-raw-data.ts + variableIMPORT_SAMPLE_COLUMN_MAPPING + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import/import-sample-raw-data.ts + variableIMPORT_SAMPLE_LINKABLE_DATA + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import/import-sample-raw-data.ts + variableIMPORT_SAMPLE_PREVIOUS_IMPORTS + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import/import-sample-raw-data.ts + variableIMPORT_SAMPLE_RAW_DATA + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/import/import/import.component.ts + componentImportComponent + 14 % + (2/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/TranslatableMatPaginator.ts + functionTranslatableMatPaginator + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/TranslatableMatPaginator.ts + variablematRangeLabelIntl + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/accept-language.interceptor.ts + interceptorAcceptLanguageInterceptor + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/date-adapter-with-formatting.ts + injectableDateAdapterWithFormatting + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/date-adapter-with-formatting.ts + variableDATE_FORMATS + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/language-select/language-select.component.ts + componentLanguageSelectComponent + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/language-statics.ts + variableDEFAULT_LANGUAGE + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/language-statics.ts + variableLANGUAGE_LOCAL_STORAGE_KEY + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/language.service.ts + injectableLanguageService + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/languages.ts + variableavailableLocales + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/language/languages.ts + variableLOCALE_ENUM_ID + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/logging/logging.service.ts + classLoggingService + 100 % + (11/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/logging/logging.service.ts + interfaceSentryBreadcrumbHint + 42 % + (3/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/logging/logging.service.ts + functionenhanceSentryBreadcrumb + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/logging/logging.service.ts + variableLogging + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/ability/ability.service.ts + injectableAbilityService + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/ability/entity-ability.ts + injectableEntityAbility + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/ability/testing-entity-ability-factory.ts + variableentityAbilityFactory + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/demo-permission-generator.service.ts + injectableDemoPermissionGeneratorService + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-directive/disable-entity-operation.directive.ts + directiveDisableEntityOperationDirective + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-directive/disabled-wrapper.component.ts + componentDisabledWrapperComponent + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-enforcer/permission-enforcer.service.ts + injectablePermissionEnforcerService + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-guard/abstract-permission.guard.ts + guardAbstractPermissionGuard + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-guard/entity-permission.guard.ts + guardEntityPermissionGuard + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-guard/user-role.guard.ts + injectableUserRoleGuard + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-types.ts + interfaceDatabaseRules + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/permissions/permission-types.ts + variableactions + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/pwa-install/pwa-install.component.ts + componentPwaInstallComponent + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/pwa-install/pwa-install.service.ts + injectablePwaInstallService + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth.guard.ts + variableAuthGuard + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/keycloak/account-page/account-page.component.ts + componentAccountPageComponent + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/keycloak/keycloak-auth.service.ts + injectableKeycloakAuthService + 47 % + (8/17) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/keycloak/keycloak-auth.service.ts + interfaceKeycloakUserDto + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/keycloak/keycloak-auth.service.ts + interfaceRole + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/keycloak/remote-login-not-available.error.ts + classRemoteLoginNotAvailableError + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/local/local-auth.service.ts + injectableLocalAuthService + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/session-info.ts + injectableSessionSubject + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/auth/session-info.ts + interfaceSessionInfo + 85 % + (6/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/current-user-subject.ts + injectableCurrentUserSubject + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/login/login.component.ts + componentLoginComponent + 11 % + (1/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/not-available-offline.error.ts + classNotAvailableOfflineError + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/session-service/session-manager.service.ts + injectableSessionManagerService + 50 % + (5/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/session-states/session-utils.ts + functionwaitForChangeTo + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/session-type.ts + injectableLoginStateSubject + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/session-type.ts + injectableSyncStateSubject + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/session-utils.ts + interfaceParsedJWT + 20 % + (1/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/session/session-utils.ts + functionparseJwt + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/site-settings/demo-site-settings-generator.service.ts + injectableDemoSiteSettingsGeneratorService + 60 % + (3/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/site-settings/site-settings.service.ts + injectableSiteSettingsService + 33 % + (4/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/site-settings/site-settings.ts + classSiteSettings + 7 % + (1/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/support/support/support.component.ts + componentSupportComponent + 0 % + (0/16) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/abstract-view/abstract-view.component.ts + classAbstractViewComponent + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/abstract-view/abstract-view.component.ts + classViewComponentContext + 20 % + (1/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/dialog-view/dialog-view.component.ts + componentDialogViewComponent + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/dialog-view/dialog-view.component.ts + interfaceDialogViewData + 25 % + (1/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/latest-changes/app-version/app-version.component.ts + componentAppVersionComponent + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/latest-changes/changelog.ts + classChangelog + 100 % + (7/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/latest-changes/changelog/MarkedRendererCustom.ts + classMarkedRendererCustom + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/latest-changes/changelog/changelog.component.ts + componentChangelogComponent + 71 % + (5/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/latest-changes/latest-changes-dialog.service.ts + injectableLatestChangesDialogService + 66 % + (4/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/latest-changes/latest-changes.service.ts + injectableLatestChangesService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/latest-changes/update-manager.service.ts + injectableUpdateManagerService + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/navigation/menu-item.ts + interfaceMenuItem + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/navigation/menu-item.ts + interfaceNavigationMenuConfig + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/navigation/navigation/navigation.component.ts + componentNavigationComponent + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/primary-action/primary-action.component.ts + componentPrimaryActionComponent + 50 % + (2/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/routed-view/routed-view.component.ts + componentRoutedViewComponent + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/search/search.component.ts + componentSearchComponent + 6 % + (1/15) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/search/search.service.ts + injectableSearchService + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/sync-status/background-process-state.interface.ts + interfaceBackgroundProcessState + 100 % + (6/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/sync-status/background-processing-indicator/background-processing-indicator.component.ts + componentBackgroundProcessingIndicatorComponent + 50 % + (4/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/sync-status/sync-status/sync-status.component.ts + componentSyncStatusComponent + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/ui/ui/ui.component.ts + componentUiComponent + 75 % + (6/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/user/demo-user-generator.service.ts + injectableDemoUserGeneratorService + 85 % + (6/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/user/demo-user-generator.service.ts + variableTEST_USER + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/user/user-account/user-account.component.ts + componentUserAccountComponent + 20 % + (1/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/user/user-security/user-security.component.ts + componentUserSecurityComponent + 0 % + (0/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/core/user/user.routing.ts + variablerouting + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/dynamic-components.ts + classComponentRegistry + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/dynamic-components.ts + variablecomponentRegistry + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/coming-soon/beta-feature/beta-feature.component.ts + componentBetaFeatureComponent + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/coming-soon/coming-soon-dialog.service.ts + injectableComingSoonDialogService + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/coming-soon/coming-soon/coming-soon.component.ts + componentComingSoonComponent + 83 % + (5/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/config-setup/config-field.raw.ts + interfaceConfigFieldRaw + 11 % + (1/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/config-setup/config-import-parser.service.ts + injectableConfigImportParserService + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/config-setup/config-import-parser.service.ts + functiondeleteEmptyProperties + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/config-setup/config-import-parser.service.ts + functionextendArray + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/config-setup/config-import/config-import.component.ts + componentConfigImportComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/conflict-resolution/auto-resolution/auto-resolution.service.ts + injectableAutoResolutionService + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/conflict-resolution/auto-resolution/conflict-resolution-strategy.ts + interfaceConflictResolutionStrategy + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/conflict-resolution/auto-resolution/conflict-resolution-strategy.ts + variableCONFLICT_RESOLUTION_STRATEGY + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/conflict-resolution/compare-rev/compare-rev.component.ts + componentCompareRevComponent + 92 % + (13/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/conflict-resolution/conflict-resolution-components.ts + variableconflictResolutionComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/conflict-resolution/conflict-resolution-list/conflict-resolution-list.component.ts + componentConflictResolutionListComponent + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts + componentBirthdayDashboardComponent + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts + interfaceBirthdayDashboardConfig + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts + interfaceEntityPropertyMap + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts + interfaceEntityWithBirthday + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.ts + componentEntityCountDashboardComponent + 27 % + (3/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.ts + interfaceEntityCountDashboardConfig + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.ts + functionextractHumanReadableLabel + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/progress-dashboard-widget/demo-progress-dashboard-widget-generator.service.ts + injectableDemoProgressDashboardWidgetGeneratorService + 50 % + (3/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/progress-dashboard-widget/edit-progress-dashboard/edit-progress-dashboard.component.ts + componentEditProgressDashboardComponent + 10 % + (1/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/progress-dashboard-widget/edit-progress-dashboard/edit-progress-dashboard.component.ts + interfaceEditProgressDashboardComponentData + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/progress-dashboard-widget/progress-dashboard/progress-dashboard-config.ts + classProgressDashboardConfig + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/progress-dashboard-widget/progress-dashboard/progress-dashboard-config.ts + interfaceProgressDashboardPart + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/progress-dashboard-widget/progress-dashboard/progress-dashboard.component.ts + componentProgressDashboardComponent + 0 % + (0/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/dashboard-widgets/shortcut-dashboard-widget/shortcut-dashboard/shortcut-dashboard.component.ts + componentShortcutDashboardComponent + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/couchdb-file.service.ts + injectableCouchdbFileService + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/display-img/display-img.component.ts + componentDisplayImgComponent + 0 % + (0/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/edit-file/edit-file.component.ts + componentEditFileComponent + 50 % + (10/20) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/edit-photo/edit-photo.component.ts + componentEditPhotoComponent + 40 % + (9/22) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/edit-photo/image-popup/image-popup.component.ts + componentImagePopupComponent + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/file-components.ts + variablefileComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/file-utils.ts + functionresizeImage + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/file.datatype.ts + injectableFileDatatype + 36 % + (4/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/file.service.ts + classFileService + 71 % + (5/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/mock-file.service.ts + injectableMockFileService + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/observable-queue/observable-queue.ts + classObservableQueue + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/progress/progress.component.ts + componentProgressComponent + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/show-file/show-file.component.ts + componentShowFileComponent + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/file/view-file/view-file.component.ts + componentViewFileComponent + 20 % + (2/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/address-edit/address-edit.component.ts + componentAddressEditComponent + 40 % + (4/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/address-edit/address-edit.component.ts + functionmatchGeoResults + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/address-search/address-search.component.ts + componentAddressSearchComponent + 33 % + (4/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/coordinates.ts + interfaceCoordinates + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/edit-location/edit-location.component.ts + componentEditLocationComponent + 100 % + (10/10) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/geo.service.ts + injectableGeoService + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/geo.service.ts + interfaceGeoResult + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/location-components.ts + variablelocationComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/location-input/location-input.component.ts + componentLocationInputComponent + 2 % + (1/34) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/location.datatype.ts + injectableLocationDatatype + 33 % + (4/12) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/location.datatype.ts + interfaceGeoLocation + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-config.ts + interfaceMapConfig + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-config.ts + variableMAP_CONFIG_KEY + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-popup/map-popup.component.ts + componentMapPopupComponent + 12 % + (1/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-popup/map-popup.component.ts + interfaceMapPopupConfig + 22 % + (2/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-utils.ts + functiongetHueForEntity + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-utils.ts + functiongetKmDistance + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-utils.ts + functiongetLocationProperties + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-utils.ts + variableiconDefault + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-utils.ts + variableiconRetinaUrl + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-utils.ts + variableiconUrl + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map-utils.ts + variableshadowUrl + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map/map-properties-popup/map-properties-popup.component.ts + componentMapPropertiesPopupComponent + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/map/map.component.ts + componentMapComponent + 0 % + (0/14) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/view-distance/view-distance.component.ts + componentViewDistanceComponent + 22 % + (2/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/view-distance/view-distance.component.ts + interfaceViewDistanceConfig + 100 % + (3/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/location/view-location/view-location.component.ts + componentViewLocationComponent + 14 % + (1/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/markdown-page/MarkdownPageConfig.ts + interfaceMarkdownPageConfig + 100 % + (2/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/markdown-page/markdown-page/markdown-page.component.ts + componentMarkdownPageComponent + 100 % + (2/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/matching-entities/matching-entities-components.ts + variablematchingEntitiesComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/matching-entities/matching-entities/matching-entities-config.ts + interfaceMatchingEntitiesConfig + 100 % + (7/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/matching-entities/matching-entities/matching-entities-config.ts + interfaceMatchingSideConfig + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/matching-entities/matching-entities/matching-entities-config.ts + interfaceNewMatchAction + 80 % + (4/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/matching-entities/matching-entities/matching-entities.component.ts + componentMatchingEntitiesComponent + 5 % + (1/20) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/matching-entities/matching-entities/matching-entities.component.ts + interfaceMatchingSide + 33 % + (3/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/public-form/demo-public-form-generator.service.ts + injectableDemoPublicFormGeneratorService + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/public-form/public-form-config.ts + classPublicFormConfig + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/public-form/public-form.component.ts + componentPublicFormComponent + 0 % + (0/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/data-aggregation.service.ts + injectableDataAggregationService + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/data-aggregation.service.ts + interfaceAggregation + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/demo-report-config-generator.service.ts + injectableDemoReportConfigGeneratorService + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/demo-report-config-generator.service.ts + variabledemoReports + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-config.ts + classReportConfig + 100 % + (6/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-config.ts + interfaceAggregationReport + 33 % + (1/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-config.ts + interfaceExportingReport + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-config.ts + interfaceSqlReport + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-config.ts + variableReportEntity + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-row.ts + interfaceGroupByDescription + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-row.ts + interfaceReportRow + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-row.ts + functiongetGroupingInformationString + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/report-row.ts + functiongetValueDescription + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/reporting-components.ts + variablereportingComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/reporting/object-table/object-table.component.ts + componentObjectTableComponent + 0 % + (0/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/reporting/report-row/report-row.component.ts + componentReportRowComponent + 0 % + (0/7) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/reporting/report-row/report-row.component.ts + interfaceFlattenedReportRow + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/reporting/reporting.component.ts + componentReportingComponent + 0 % + (0/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/reporting/select-report/select-report.component.ts + componentSelectReportComponent + 7 % + (1/13) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/reporting/select-report/select-report.component.ts + interfaceCalculateReportOptions + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/sql-report/sql-report.service.ts + injectableSqlReportService + 40 % + (2/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/sql-report/sql-report.service.ts + interfaceReportCalculation + 0 % + (0/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/sql-report/sql-report.service.ts + interfaceReportData + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/reporting/sql-report/sqs-schema.ts + classSqsSchema + 16 % + (1/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/model/demo-todo-generator.service.ts + classDemoTodoConfig + 0 % + (0/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/model/demo-todo-generator.service.ts + injectableDemoTodoGeneratorService + 33 % + (2/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/model/demo-todo-generator.service.ts + variablestories + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/model/todo-completion.ts + interfaceTodoCompletion + 100 % + (4/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/model/todo-default-configs.ts + variabletodoDefaultConfigs + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/model/todo.ts + classTodo + 27 % + (3/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/custom-interval/custom-interval.component.ts + componentCustomIntervalComponent + 0 % + (0/5) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/display-recurring-interval/display-recurring-interval.component.ts + componentDisplayRecurringIntervalComponent + 12 % + (1/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/edit-recurring-interval/edit-recurring-interval.component.ts + componentEditRecurringIntervalComponent + 66 % + (10/15) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/time-interval.datatype.ts + classTimeIntervalDatatype + 63 % + (7/11) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/time-interval.ts + classTimeInterval + 75 % + (3/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/time-interval.ts + functiongenerateLabelFromInterval + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/time-interval.ts + variabletimeunitLabelMap + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/recurring-interval/time-interval.ts + variabletimeUnitsPrimary + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todo-completion/display-todo-completion/display-todo-completion.component.ts + componentDisplayTodoCompletionComponent + 11 % + (1/9) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todo-completion/todo-completion/todo-completion.component.ts + componentTodoCompletionComponent + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todo-details/todo-details.component.ts + componentTodoDetailsComponent + 0 % + (0/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todo-list/todo-list.component.ts + componentTodoListComponent + 9 % + (4/42) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todo-list/todo-list.component.ts + variablefilterCurrentlyActive + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todo.service.ts + injectableTodoService + 0 % + (0/4) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todos-dashboard/todos-dashboard.component.ts + componentTodosDashboardComponent + 0 % + (0/8) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todos-related-to-entity/todos-related-to-entity.component.ts + componentTodosRelatedToEntityComponent + 29 % + (7/24) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/features/todos/todos.module.ts + variabledynamicComponents + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/route-target.ts + variableRouteTarget + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/custom-number-validators.ts + variableCustomNumberValidators + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/di-tokens.ts + variableLOCATION_TOKEN + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/di-tokens.ts + variableNAVIGATOR_TOKEN + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/di-tokens.ts + variableWINDOW_TOKEN + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/flatten-array/flatten-array.pipe.ts + pipeFlattenArrayPipe + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/generate-id-from-label/generate-id-from-label.ts + functiongenerateIdFromLabel + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/media/screen-size-observer.service.ts + injectableScreenWidthObserver + 83 % + (5/6) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/media/screen-size-observer.service.ts + variableLG + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/media/screen-size-observer.service.ts + variableMD + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/media/screen-size-observer.service.ts + variableMOBILE_THRESHOLD + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/media/screen-size-observer.service.ts + variableSM + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/media/screen-size-observer.service.ts + variableXL + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/media/screen-size-observer.service.ts + variableXXL + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/performance-analysis-logging.ts + functionPerformanceAnalysisLogging + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/storybook-base.module.ts + variableentityFormStorybookDefaultParameters + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/style-utils.ts + functionaddAlphaToHexColor + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/style-utils.ts + functiongetHue + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/tab-state/tab-state-memo.directive.ts + directiveTabStateMemoDirective + 50 % + (1/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/test-utils/TestEntity.ts + classTestEntity + 6 % + (1/15) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/test-utils/custom-matcher-utils.ts + functionmakeCustomMatcher + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/test-utils/observable-utils.ts + classObservableMatchersImpl + 0 % + (0/2) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/test-utils/observable-utils.ts + interfaceObservableMatchers + 66 % + (2/3) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/test-utils/observable-utils.ts + functionexpectObservable + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functionaddToGroup + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functionasArray + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functioncalculateAge + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functioncompareEnums + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functiondateToString + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functionequals + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functiongetParentUrl + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functiongetUrlWithoutParams + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functiongroupBy + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functionisValidDate + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functionreadFile + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functionserviceProvider + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/app/utils/utils.ts + functionsortByAttribute + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/bootstrap-environment.ts + functioninitEnvironmentConfig + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/bootstrap-i18n.ts + functioninitLanguage + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/environments/environment.prod.ts + variableenvironment + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/environments/environment.ts + variableenvironment + 100 % + (1/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + src/main.ts + functionbootstrap + 0 % + (0/1) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/dependencies.html b/documentation/dependencies.html new file mode 100644 index 0000000000..f99a94b733 --- /dev/null +++ b/documentation/dependencies.html @@ -0,0 +1,278 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/animations : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/cdk : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/common : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/compiler : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/core : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/forms : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/localize : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/material : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/material-moment-adapter : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/platform-browser : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/platform-browser-dynamic : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/router : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @angular/service-worker : ^18.2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @aytek/material-color-picker : ^1.0.4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @casl/ability : ^6.7.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @casl/angular : ^8.2.7
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @faker-js/faker : ^8.4.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @fortawesome/angular-fontawesome : ^0.15.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @fortawesome/fontawesome-svg-core : ^6.6.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @fortawesome/free-regular-svg-icons : ^6.6.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @fortawesome/free-solid-svg-icons : ^6.6.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @ngneat/until-destroy : ^10.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + @sentry/angular : ^8.26.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + angulartics2 : ^14.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + assert : ^2.1.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + crypto-es : ^2.1.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + deep-object-diff : ^1.1.9
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + hammerjs : ^2.0.8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + json-query : ^2.2.2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + keycloak-angular : ^16.0.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + keycloak-js : ^25.0.4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + leaflet : ^1.9.4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + lodash-es : ^4.17.21
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + md5 : ^2.3.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + moment : 2.29.4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + ngx-markdown : ^18.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + ngx-papaparse : ^8.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + pouchdb-adapter-memory : ^9.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + pouchdb-browser : ^9.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + process : ^0.11.10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + reflect-metadata : ^0.2.2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + rxjs : ^7.8.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + stream-browserify : ^3.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + tslib : ^2.6.3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + util : ^0.12.5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + uuid : ^10.0.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + webpack : ^5.94.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • + zone.js : ^0.14.10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/AbstractEntityDetailsComponent.html b/documentation/directives/AbstractEntityDetailsComponent.html new file mode 100644 index 0000000000..9add24e8b9 --- /dev/null +++ b/documentation/directives/AbstractEntityDetailsComponent.html @@ -0,0 +1,693 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/entity-details/abstract-entity-details/abstract-entity-details.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This component can be used to display an entity in more detail. +As an abstract base component, this provides functionality to load an entity +and leaves the UI and special functionality to components that extend this class, like EntityDetailsComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(entityMapperService: EntityMapperService, entities: EntityRegistry, ability: EntityAbility, router: Router, unsavedChanges: UnsavedChangesService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            unsavedChanges + UnsavedChangesService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entityType +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + Async + loadEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + loadEntity() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + subscribeToEntityChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + subscribeToEntityChanges() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + entityConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + isLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Directive, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityAbility } from "../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Subscription } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UnsavedChangesService } from "../form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This component can be used to display an entity in more detail.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * As an abstract base component, this provides functionality to load an entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * and leaves the UI and special functionality to components that extend this class, like EntityDetailsComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Directive()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export abstract class AbstractEntityDetailsComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  isLoading: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private changesSubscription: Subscription;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityConstructor: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    protected unsavedChanges: UnsavedChangesService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (changes.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityConstructor = this.entities.get(this.entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (changes.id) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      await this.loadEntity();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.subscribeToEntityChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  protected subscribeToEntityChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const fullId = Entity.createPrefixedId(this.entityType, this.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.changesSubscription?.unsubscribe();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.changesSubscription = this.entityMapperService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .receiveUpdates(this.entityConstructor)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter(({ entity }) => entity.getId() === fullId),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter(({ type }) => type !== "remove"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        untilDestroyed(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .subscribe(({ entity }) => (this.entity = entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  protected async loadEntity() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.isLoading = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.id === "new") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (this.ability.cannot("create", this.entityConstructor)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.router.navigate([""]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entity = new this.entityConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entity = await this.entityMapperService.load(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.isLoading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/AdminTabTemplateDirective.html b/documentation/directives/AdminTabTemplateDirective.html new file mode 100644 index 0000000000..ccda1f2b36 --- /dev/null +++ b/documentation/directives/AdminTabTemplateDirective.html @@ -0,0 +1,430 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/admin/building-blocks/admin-tabs/admin-tab-template.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + appAdminTabTemplate +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + ngTemplateContextGuard + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + ngTemplateContextGuard(dir: AdminTabTemplateDirective<TContext>, ctx) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • TContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              dir + AdminTabTemplateDirective<TContext> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ctx + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Directive, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +// following guide from https://medium.com/@thomas.laforge/ngtemplateoutlet-type-checking-5d2dcb07a2c6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +// to ensure typing of ng-template context
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +interface AdminTabTemplateContext<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  $implicit: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  index: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "ng-template[appAdminTabTemplate]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class AdminTabTemplateDirective<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input("appAdminTabTemplate") tabs!: T[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static ngTemplateContextGuard<TContext>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    dir: AdminTabTemplateDirective<TContext>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ctx: unknown,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): ctx is AdminTabTemplateContext<TContext> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/BorderHighlightDirective.html b/documentation/directives/BorderHighlightDirective.html new file mode 100644 index 0000000000..ec2305c73f --- /dev/null +++ b/documentation/directives/BorderHighlightDirective.html @@ -0,0 +1,729 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/border-highlight/border-highlight.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A directive that applies a colored border to the left side of an element. +The color can either be supplied directly via the primary input, i.e.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div appBorderHighlight="red">Highlight me!</div>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                or via a class with a name:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div appBorderHighlight borderClass="some-class">Highlight me!</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                HostBindings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + appBorderHighlight +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + borderClass +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                HostBindings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + class + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : this.CLASS_NAME +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + style.border-color + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string | boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "transparent" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + borderColor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string | boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "transparent" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + @HostBinding('style.border-color')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Readonly + CLASS_NAME + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "border-left-highlight" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + elementClass + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : this.CLASS_NAME +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + @HostBinding('class')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + color +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + setcolor(value: string | undefined) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                value + string | undefined + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + borderClass +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + setborderClass(value: string | undefined) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                value + string | undefined + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Directive, HostBinding, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A directive that applies a colored border to the left side of an element.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The color can either be supplied directly via the primary input, i.e.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```html
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * <div appBorderHighlight="red">Highlight me!</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * or via a class with a name:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```html
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * <div appBorderHighlight borderClass="some-class">Highlight me!</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "[appBorderHighlight]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class BorderHighlightDirective {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  readonly CLASS_NAME = "border-left-highlight";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @HostBinding("class")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  elementClass = this.CLASS_NAME;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @HostBinding("style.border-color")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  borderColor: string | boolean = "transparent";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input("appBorderHighlight") set color(value: string | undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.borderColor = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.elementClass = this.CLASS_NAME;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set borderClass(value: string | undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.elementClass = this.CLASS_NAME + " " + value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.borderColor = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/ConfigurableEnumDirective.html b/documentation/directives/ConfigurableEnumDirective.html new file mode 100644 index 0000000000..a200094ca4 --- /dev/null +++ b/documentation/directives/ConfigurableEnumDirective.html @@ -0,0 +1,629 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/basic-datatypes/configurable-enum/configurable-enum-directive/configurable-enum.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Enumerate over all ConfigurableEnumConfig values for the given enum config id.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Works similar to *ngFor: +<div *appConfigurableEnum="let item of 'interaction-type'"></div> +will create one div for each option defined in the config for "enum:interaction-type".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(templateRef: TemplateRef, viewContainerRef: ViewContainerRef, enumService: ConfigurableEnumService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  templateRef + TemplateRef<any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  viewContainerRef + ViewContainerRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + appConfigurableEnumOf +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Sets the string id of the enum config id.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Static + ngTemplateContextGuard + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + ngTemplateContextGuard(directive: ConfigurableEnumDirective, context) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Make sure the template checker knows the type of the context with which the +template of this directive will be rendered +See https://angular.io/guide/structural-directives#typing-the-directives-context

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  directive + ConfigurableEnumDirective + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  context + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + appConfigurableEnumOf +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + setappConfigurableEnumOf(enumConfigId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Sets the string id of the enum config id.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enumConfigId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Directive, Input, TemplateRef, ViewContainerRef } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ConfigurableEnumService } from "../configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ConfigurableEnumValue } from "../configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Enumerate over all {@link ConfigurableEnumConfig} values for the given enum config id.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Works similar to `*ngFor`:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * `<div *appConfigurableEnum="let item of 'interaction-type'"></div>`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * will create one div for each option defined in the config for "enum:interaction-type".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "[appConfigurableEnum]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class ConfigurableEnumDirective {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Sets the string id of the enum config id.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param enumConfigId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() set appConfigurableEnumOf(enumConfigId: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const options = this.enumService.getEnumValues(enumConfigId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const item of options) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.viewContainerRef.createEmbeddedView(this.templateRef, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        $implicit: item,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * For implementation details see
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * https://www.talkinghightech.com/en/create-ngfor-directive/ and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * https://angular.io/guide/structural-directives#write-a-structural-directive
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private templateRef: TemplateRef<any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private viewContainerRef: ViewContainerRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private enumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Make sure the template checker knows the type of the context with which the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * template of this directive will be rendered
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * See {@link https://angular.io/guide/structural-directives#typing-the-directives-context}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param directive
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param context
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static ngTemplateContextGuard(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    directive: ConfigurableEnumDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    context: unknown,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): context is { $implicit: ConfigurableEnumValue } {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/CustomFormControlDirective.html b/documentation/directives/CustomFormControlDirective.html new file mode 100644 index 0000000000..e27cadb062 --- /dev/null +++ b/documentation/directives/CustomFormControlDirective.html @@ -0,0 +1,2009 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/common-components/basic-autocomplete/custom-form-control.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ControlValueAccessor + MatFormFieldControl + OnDestroy + DoCheck +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    HostBindings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(elementRef: ElementRef, errorStateMatcher: ErrorStateMatcher, ngControl: NgControl, parentForm: NgForm, parentFormGroup: FormGroupDirective) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    elementRef + ElementRef<HTMLElement> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    errorStateMatcher + ErrorStateMatcher + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ngControl + NgControl + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parentForm + NgForm + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parentFormGroup + FormGroupDirective + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + aria-describedby +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + disabled +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + placeholder +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + required +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    HostBindings

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + id + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + blur + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +blur() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + focus + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +focus() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + onContainerClick + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +onContainerClick(event: MouseEvent) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    event + MouseEvent + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + registerOnChange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +registerOnChange(fn: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    fn + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + registerOnTouched + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +registerOnTouched(fn: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    fn + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + setDescribedByIds + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +setDescribedByIds(ids: string[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ids + string[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + setDisabledState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +setDisabledState(isDisabled: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    isDisabled + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + writeValue + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +writeValue(val: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    val + T + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + _disabled + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + _value + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + controlType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "custom-control" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + elementRef + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ElementRef<HTMLElement> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + errorState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + errorStateMatcher + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : ErrorStateMatcher + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + focused + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + id + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : `custom-form-control-${CustomFormControlDirective.nextId++}` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + @HostBinding()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + nextId + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : 0 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + ngControl + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : NgControl + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + onChange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + onTouched + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : () => {...} +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + parentForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : NgForm + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + parentFormGroup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FormGroupDirective + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + stateChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : new Subject<void>() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + touched + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + required +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + getrequired() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + setrequired(req: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    req + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + empty +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + getempty() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + shouldLabelFloat +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + getshouldLabelFloat() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + disabled +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + getdisabled() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + setdisabled(value: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + getvalue() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + setvalue(value: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + T + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  AbstractControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ControlValueAccessor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  FormGroupDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  NgControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  NgForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  Validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatFormFieldControl } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  Directive,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  DoCheck,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  HostBinding,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  OnDestroy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Subject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { coerceBooleanProperty } from "@angular/cdk/coercion";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ErrorStateMatcher } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Directive()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export abstract class CustomFormControlDirective<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  implements ControlValueAccessor, MatFormFieldControl<T>, OnDestroy, DoCheck
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static nextId = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @HostBinding()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  id = `custom-form-control-${CustomFormControlDirective.nextId++}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  // eslint-disable-next-line @angular-eslint/no-input-rename
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input("aria-describedby") userAriaDescribedBy: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() placeholder: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  get required() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this._required;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  set required(req: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this._required = coerceBooleanProperty(req);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.stateChanges.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private _required = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  stateChanges = new Subject<void>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  focused = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  touched = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  errorState = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  controlType = "custom-control";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  onChange = (_: any) => {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  onTouched = () => {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  get empty() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return !this.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  get shouldLabelFloat() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.focused || !this.empty;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  get disabled(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this._disabled;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  set disabled(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this._disabled = coerceBooleanProperty(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.stateChanges.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  _disabled = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() get value(): T {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this._value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  set value(value: T) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this._value = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.onChange(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.stateChanges.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  _value: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    public elementRef: ElementRef<HTMLElement>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    public errorStateMatcher: ErrorStateMatcher,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    public ngControl: NgControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    public parentForm: NgForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    public parentFormGroup: FormGroupDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.ngControl != null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.ngControl.valueAccessor = this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.elementRef.nativeElement.addEventListener("focusin", () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.focus(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.elementRef.nativeElement.addEventListener("focusout", () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.blur(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ngOnDestroy() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.stateChanges.complete();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  focus() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.focused = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.stateChanges.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  blur() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.touched = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.focused = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.onTouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.stateChanges.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  setDescribedByIds(ids: string[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.elementRef.nativeElement.setAttribute(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "aria-describedby",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ids.join(" "),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  onContainerClick(event: MouseEvent) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  writeValue(val: T): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.value = val;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  registerOnChange(fn: any): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.onChange = fn;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  registerOnTouched(fn: any): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.onTouched = fn;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  setDisabledState(isDisabled: boolean): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.disabled = isDisabled;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ngDoCheck() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const control = this.ngControl
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ? (this.ngControl.control as AbstractControl)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      : null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.checkUpdateErrorState(control);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.checkUpdateRequired(control);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Updates the error state based on the form control
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Taken from {@link https://github.com/angular/components/blob/a1d5614f18066c0c2dc2580c7b5099e8f68a8e74/src/material/core/common-behaviors/error-state.ts#L59}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private checkUpdateErrorState(control: AbstractControl | null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const oldState = this.errorState;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const parent = this.parentFormGroup || this.parentForm;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const newState = this.errorStateMatcher.isErrorState(control, parent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (newState !== oldState) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.errorState = newState;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.stateChanges.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private checkUpdateRequired(control: AbstractControl | null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!control) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.required !==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      coerceBooleanProperty(control.hasValidator(Validators.required))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.required = control.hasValidator(Validators.required);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/DisableEntityOperationDirective.html b/documentation/directives/DisableEntityOperationDirective.html new file mode 100644 index 0000000000..beda6a88e3 --- /dev/null +++ b/documentation/directives/DisableEntityOperationDirective.html @@ -0,0 +1,479 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/permissions/permission-directive/disable-entity-operation.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This directive can be used to disable a element (e.g. button) based on the current users permissions. +Additionally, a little popup will be shown when the user hovers the disabled element.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + OnInit + OnChanges + OnDestroy +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(templateRef: TemplateRef, viewContainerRef: ViewContainerRef, ability: EntityAbility) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      templateRef + TemplateRef<HTMLButtonElement> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      viewContainerRef + ViewContainerRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + appDisabledEntityOperation +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      These arguments are required to check whether the user has permissions to perform the operation. +The operation property defines to what kind of operation an element belongs, e.g. OperationType.CREATE +The entity property defines for which kind of entity the operation will be performed, e.g. Child

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ComponentRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Directive,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  OnDestroy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ViewContainerRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DisabledWrapperComponent } from "./disabled-wrapper.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityActionPermission, EntitySubject } from "../permission-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityAbility } from "../ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Unsubscribe } from "@casl/ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * This directive can be used to disable a element (e.g. button) based on the current users permissions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Additionally, a little popup will be shown when the user hovers the disabled element.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "[appDisabledEntityOperation]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class DisableEntityOperationDirective
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  implements OnInit, OnChanges, OnDestroy
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * These arguments are required to check whether the user has permissions to perform the operation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The operation property defines to what kind of operation an element belongs, e.g. OperationType.CREATE
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The entity property defines for which kind of entity the operation will be performed, e.g. Child
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input("appDisabledEntityOperation") arguments: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    operation: EntityActionPermission;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    entity: EntitySubject;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    field?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private wrapperComponent: ComponentRef<DisabledWrapperComponent>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private text: string = $localize`:Missing permission:Your account does not have the required permission for this action.`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private readonly unsubscribeAbilityUpdates: Unsubscribe;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private templateRef: TemplateRef<HTMLButtonElement>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private viewContainerRef: ViewContainerRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.unsubscribeAbilityUpdates = this.ability.on("updated", () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.applyPermissions(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnDestroy(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.unsubscribeAbilityUpdates();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.wrapperComponent = this.viewContainerRef.createComponent(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      DisabledWrapperComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.wrapperComponent.instance.template = this.templateRef;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.wrapperComponent.instance.text = this.text;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.applyPermissions();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.applyPermissions();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private applyPermissions() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.wrapperComponent &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.arguments?.operation &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.arguments?.entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // Update the disabled property whenever the input values change
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.wrapperComponent.instance.elementDisabled = this.ability.cannot(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.arguments.operation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.arguments.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.arguments.field,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.wrapperComponent.instance.ngAfterViewInit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/DynamicComponentDirective.html b/documentation/directives/DynamicComponentDirective.html new file mode 100644 index 0000000000..773fd6310c --- /dev/null +++ b/documentation/directives/DynamicComponentDirective.html @@ -0,0 +1,531 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/config/dynamic-components/dynamic-component.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Directive to mark a template into which a component that is dynamically injected from config should be loaded

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Pass the DynamicComponentConfig into the directive to define the component to be injected.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Configurations that match properties with an @Input() annotations are automatically assigned

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(viewContainerRef: ViewContainerRef, components: ComponentRegistry, changeDetector: ChangeDetectorRef) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        viewContainerRef + ViewContainerRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        components + ComponentRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        changeDetector + ChangeDetectorRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + appDynamicComponent +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : DynamicComponentConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Public + viewContainerRef + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : ViewContainerRef + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Directive,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  SimpleChange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Type,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ViewContainerRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponentConfig } from "./dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ComponentRegistry } from "../../../dynamic-components";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { pick } from "lodash-es";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Directive to mark a template into which a component that is dynamically injected from config should be loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Pass the DynamicComponentConfig into the directive to define the component to be injected.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Configurations that match properties with an `@Input()` annotations are automatically assigned
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "[appDynamicComponent]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class DynamicComponentDirective implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() appDynamicComponent: DynamicComponentConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    public viewContainerRef: ViewContainerRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private components: ComponentRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private changeDetector: ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ngOnChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.loadDynamicComponent();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private async loadDynamicComponent() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!this.appDynamicComponent) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let component: Type<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      component = await this.components.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.appDynamicComponent.component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      )();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Logging.error({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        message: `Failed to load dynamic component:\n${JSON.stringify(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.appDynamicComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        )}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        error: e,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // abort if component failed to load
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.viewContainerRef.clear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const componentRef = this.viewContainerRef.createComponent(component);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (this.appDynamicComponent.config) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.setInputProperties(component.prototype, componentRef.instance);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // it seems like the asynchronicity of this function requires this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.changeDetector.detectChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private setInputProperties(proto: any, component: any) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const inputs = Object.keys(proto.constructor["ɵcmp"].inputs).filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (input) => this.appDynamicComponent.config?.[input] !== undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const inputValues = pick(this.appDynamicComponent.config, inputs);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const initialValues = pick(component, inputs);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    Object.assign(component, inputValues);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      typeof component["ngOnChanges"] === "function" &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Object.keys(inputValues).length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const changes: SimpleChanges = inputs.reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (c, prop) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          Object.assign(c, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            [prop]: new SimpleChange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              initialValues[prop],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              inputValues[prop],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      component["ngOnChanges"](changes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/EditComponent.html b/documentation/directives/EditComponent.html new file mode 100644 index 0000000000..1c93aef98a --- /dev/null +++ b/documentation/directives/EditComponent.html @@ -0,0 +1,652 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/entity/default-datatype/edit-component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A simple helper class which sets up all the required information for edit-components. + refers to the type of the value which is processed in the component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + OnInit + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + defaultValueConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : DefaultValueConfig | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Describes the defaultValue behaviour for this field

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The entity which is edited.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + formControl +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormControl<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The form control for this field which is part of a form group of the table/form component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + formControlName +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The name of the form control.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + formFieldConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The configuration for this form field.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Optional + additional + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Additional config details for the specific component implementation. +Can be defined through entity schema also.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A label for this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + parent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FormGroup + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The parent form of the formControl this is always needed to correctly setup the mat-form-field

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { FormControl, FormGroup } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FormFieldConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Directive, Input, OnChanges, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DefaultValueConfig } from "../schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A simple helper class which sets up all the required information for edit-components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * <T> refers to the type of the value which is processed in the component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Directive()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export abstract class EditComponent<T> implements OnInit, OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The configuration for this form field.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() formFieldConfig: FormFieldConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The form control for this field which is part of a form group of the table/form component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() formControl: FormControl<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The entity which is edited.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The name of the form control.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() formControlName: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Describes the defaultValue behaviour for this field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() defaultValueConfig: DefaultValueConfig | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A label for this component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The parent form of the `formControl` this is always needed to correctly setup the `mat-form-field`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  parent: FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Additional config details for the specific component implementation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Can be defined through entity schema also.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  additional?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** indicating that the value is not in its original state, so that components can explain this to the user */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isPartiallyAnonymized: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this.formFieldConfig?.forTable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.label = this.formFieldConfig?.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.additional = this.formFieldConfig?.additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.formControlName = this.formFieldConfig?.id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // This type casts are needed as the normal types throw errors in the templates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.parent = this.formControl.parent as FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.isPartiallyAnonymized =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entity?.anonymized &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entity?.getSchema()?.get(this.formFieldConfig?.id)?.anonymize ===
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        "retain-anonymized";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/ExportDataDirective.html b/documentation/directives/ExportDataDirective.html new file mode 100644 index 0000000000..c9d88c0ed6 --- /dev/null +++ b/documentation/directives/ExportDataDirective.html @@ -0,0 +1,632 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/export/export-data-directive/export-data.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A directive that can be attached to a html element, commonly a button. +Usage:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   [appExportData]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   Export CSV
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + </button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            HostListeners
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(downloadService: DownloadService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            downloadService + DownloadService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + appExportData +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            data to be exported

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + exportConfig +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (Optional) definition of fields to be exported.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            If not provided, all properties will be included in the export.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + filename +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "exportedData" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            filename for the download of the exported data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + format +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ExportDataFormat + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "csv" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            What kind of data should be export? Currently implemented are 'json', 'csv'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            HostListeners

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + click + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + click + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + click() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Decorators : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + @HostListener('click')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Directive, HostListener, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ExportColumnConfig } from "../data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DownloadService } from "../download-service/download.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export type ExportDataFormat = "csv" | "json";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * A directive that can be attached to a html element, commonly a button.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Usage:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * ```html
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *  <button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *    mat-stroked-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *    [appExportData]="data"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *    format="csv"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *  >
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *    Export CSV
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *  </button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "[appExportData]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class ExportDataDirective {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** data to be exported */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input("appExportData") data: any = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** What kind of data should be export? Currently implemented are 'json', 'csv' */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() format: ExportDataFormat = "csv";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** filename for the download of the exported data */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() filename: string = "exportedData";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * (Optional) definition of fields to be exported.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If not provided, all properties will be included in the export.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() exportConfig: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(private downloadService: DownloadService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @HostListener("click")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  click() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.downloadService.triggerDownload(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.format,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.filename,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.exportConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/TabStateMemoDirective.html b/documentation/directives/TabStateMemoDirective.html new file mode 100644 index 0000000000..bc034450c7 --- /dev/null +++ b/documentation/directives/TabStateMemoDirective.html @@ -0,0 +1,414 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/utils/tab-state/tab-state-memo.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Memorizes the current state of a TabGroup (i.e. which tab currently is selected) +in the URL and sets the initial value to a value that was previously set.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This enables navigation throughout the app while memorizing the state a tab was in +Usage (only the directive is required, the rest is automatic):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <mat-tab-group appTabStateMemo>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +</mat-tab-group>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + OnInit +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(router: Router, route: ActivatedRoute, tab: MatTabGroup, viewContext: ViewComponentContext) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              route + ActivatedRoute + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              tab + MatTabGroup + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              viewContext + ViewComponentContext + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { ActivatedRoute, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTabGroup } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Directive, OnInit, Optional } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ViewComponentContext } from "../../core/ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Memorizes the current state of a `TabGroup` (i.e. which tab currently is selected)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * in the URL and sets the initial value to a value that was previously set.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * This enables navigation throughout the app while memorizing the state a tab was in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Usage (only the directive is required, the rest is automatic):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * <mat-tab-group appTabStateMemo>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *   ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * </mat-tab-group>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "[appTabStateMemo]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class TabStateMemoDirective implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private readonly tabIndexKey = "tabIndex";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private route: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private tab: MatTabGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    @Optional() private viewContext: ViewComponentContext,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.viewContext?.isDialog) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // does not apply if opened in popup
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // This logic is purposefully in `ngOnInit` and not in the constructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // so we can override values that are set by custom logic in the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // (i.e. we override any binding to [(selectedIndex)] for the initial index)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const potentialNextTabIndex = parseInt(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.route.snapshot.queryParamMap.get(this.tabIndexKey),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      10,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!Number.isNaN(potentialNextTabIndex)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.tab.selectedIndex = potentialNextTabIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.tab.selectedIndexChange
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .subscribe((next) => this.updateURLQueryParams(next));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  // Update the URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async updateURLQueryParams(value: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.viewContext?.isDialog) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // does not apply if opened in popup
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    await this.router.navigate(["."], {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      relativeTo: this.route,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      queryParams: { [this.tabIndexKey]: value },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      replaceUrl: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      queryParamsHandling: "merge",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/TemplateTooltipDirective.html b/documentation/directives/TemplateTooltipDirective.html new file mode 100644 index 0000000000..9fc8293925 --- /dev/null +++ b/documentation/directives/TemplateTooltipDirective.html @@ -0,0 +1,705 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/template-tooltip/template-tooltip.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A directive that can be used to render a custom tooltip that may contain HTML code. +When a tooltip is only a string, the {@code MatTooltip} should be used instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The Tooltip to render is provided as a template. This template is also the main argument +to this directive. Place the directive on the HTML-Element where the tooltip should pop out +when hovered over.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div [appTemplateTooltip]="tooltip">Hover here to show the tooltip</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<ng-template #tooltip>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Custom tooltip <i>with</i> HTML-Elements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</ng-template>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                See contentTemplate

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + OnInit + OnDestroy +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Metadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(overlay: Overlay, overlayPositionBuilder: OverlayPositionBuilder, element: ElementRef, zone: NgZone) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                overlay + Overlay + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                overlayPositionBuilder + OverlayPositionBuilder + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                element + ElementRef<HTMLElement> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                zone + NgZone + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + appTemplateTooltip +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : TemplateRef<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The template that is shown in the tooltip. +You can get the template ref of an HTML-Element by using the #<template name> syntax. +An <ng-template> Element won't be shown to the user by default. Therefore, it is the most commonly +used element.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <div [appTemplateTooltip]="tooltip">Hover here to show the tooltip</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +<ng-template #tooltip>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Custom tooltip <i>with</i> HTML-Elements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +</ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + delayHide +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : 150 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The amount of time in milliseconds that the user's mouse has to leave the tooltip before it will +be hidden

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + delayShow +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : 1000 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The amount of time in milliseconds that the user has to hover over the element before the tooltip +is shown

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + tooltipDisabled +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Whether to disable the tooltip, so it won't ever be shown

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Directive,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  NgZone,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OnDestroy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Overlay,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OverlayPositionBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OverlayRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/cdk/overlay";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ComponentPortal } from "@angular/cdk/portal";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { TemplateTooltipComponent } from "./template-tooltip.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A directive that can be used to render a custom tooltip that may contain HTML code.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * When a tooltip is only a string, the {@code MatTooltip} should be used instead.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The Tooltip to render is provided as a template. This template is also the main argument
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * to this directive. Place the directive on the HTML-Element where the tooltip should pop out
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * when hovered over.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * <div [appTemplateTooltip]="tooltip">Hover here to show the tooltip</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * <ng-template #tooltip>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *   Custom tooltip <i>with</i> HTML-Elements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * @see contentTemplate
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "[appTemplateTooltip]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class TemplateTooltipDirective implements OnInit, OnDestroy {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Whether to disable the tooltip, so it won't ever be shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() tooltipDisabled: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The amount of time in milliseconds that the user has to hover over the element before the tooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * is shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() delayShow: number = 1000;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The amount of time in milliseconds that the user's mouse has to leave the tooltip before it will
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * be hidden
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() delayHide: number = 150;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The template that is shown in the tooltip.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * You can get the template ref of an HTML-Element by using the `#<template name>` syntax.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * An `<ng-template>` Element won't be shown to the user by default. Therefore, it is the most commonly
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * used element.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * <div [appTemplateTooltip]="tooltip">Hover here to show the tooltip</div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * <ng-template #tooltip>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *   Custom tooltip <i>with</i> HTML-Elements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * </ng-template>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input("appTemplateTooltip") contentTemplate!: TemplateRef<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Reference to the overlay (the Tooltip) to control the visibility of the tooltip
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private overlayRef!: OverlayRef;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The timeout used to deal both with the show-delay and the hide-delay
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @see delayHide
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @see delayShow
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private timeoutRef?: ReturnType<typeof setTimeout>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private overlay: Overlay,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private overlayPositionBuilder: OverlayPositionBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private element: ElementRef<HTMLElement>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private zone: NgZone,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // Create a position strategy that determines where the overlay is positioned.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // In this case, it should be positioned at the bottom-center of the element.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const positionStrategy = this.overlayPositionBuilder
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .flexibleConnectedTo(this.element)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .withPositions([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          originX: "center",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          originY: "bottom",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          overlayX: "center",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          overlayY: "top",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          offsetY: 5,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.overlayRef = this.overlay.create({ positionStrategy });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.zone.runOutsideAngular(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.element.nativeElement.addEventListener("mouseenter", () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.show(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.element.nativeElement.addEventListener("mouseleave", (ev) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.hide(ev.relatedTarget as HTMLElement),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ngOnDestroy() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.hide();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Show the tooltip unless
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * - it is disabled or
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * - it is already shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private show() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.tooltipDisabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // clear the timeout so that when the user hovers twice the last hover action is used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // Also clears the timeout from `hide`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.timeoutRef) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      clearTimeout(this.timeoutRef);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // show the tooltip after `delayShown` milliseconds when it is not already shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.timeoutRef = setTimeout(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      //attach the component if it has not already attached to the overlay
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!this.overlayRef.hasAttached()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.zone.run(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          const tooltipRef = this.overlayRef.attach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            new ComponentPortal(TemplateTooltipComponent),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          tooltipRef.instance.contentTemplate = this.contentTemplate;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          tooltipRef.instance.hide
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            .subscribe(() => this.hide());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          tooltipRef.instance.show
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            .subscribe(() => this.show());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }, this.delayShow);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Hide the tooltip unconditionally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * When the tooltip is already hidden, this operation is a noop
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private hide(relatedTarget?: HTMLElement) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // This ensures that `hide` is not called when the popup overlaps the element that this directive is on.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // If the method was called, the popup would flicker; disappearing (because of this method) and then
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // re-appearing because of the `mouseenter` method.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      relatedTarget?.tagName === TemplateTooltipComponent.SELECTOR.toUpperCase()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.timeoutRef) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      clearTimeout(this.timeoutRef);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.timeoutRef = setTimeout(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (this.overlayRef.hasAttached()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.zone.run(() => this.overlayRef.detach());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }, this.delayHide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/directives/ViewDirective.html b/documentation/directives/ViewDirective.html new file mode 100644 index 0000000000..fff9a1fcd6 --- /dev/null +++ b/documentation/directives/ViewDirective.html @@ -0,0 +1,458 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity/default-datatype/view.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + OnChanges +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inputs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + config +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : C + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + id +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + tooltip +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + value +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + isPartiallyAnonymized + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  indicating that the value is not in its original state, so that components can explain this to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Entity } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Directive, Input, OnChanges, SimpleChanges } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Directive()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export abstract class ViewDirective<T, C = any> implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() tooltip: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() value: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() config: C;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** indicating that the value is not in its original state, so that components can explain this to the user */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  isPartiallyAnonymized: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Attention:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * When content is loaded async in your child component, you need to manually trigger the change detection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * See: https://angularindepth.com/posts/1054/here-is-what-you-need-to-know-about-dynamic-components-in-angular#ngonchanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngOnChanges(changes?: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.isPartiallyAnonymized =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entity?.anonymized &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entity?.getSchema()?.get(this.id)?.anonymize === "retain-anonymized";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/ionicons.eot b/documentation/fonts/ionicons.eot new file mode 100644 index 0000000000..4b1fd0f48c Binary files /dev/null and b/documentation/fonts/ionicons.eot differ diff --git a/documentation/fonts/ionicons.svg b/documentation/fonts/ionicons.svg new file mode 100644 index 0000000000..ba35c41f6f --- /dev/null +++ b/documentation/fonts/ionicons.svg @@ -0,0 +1,2090 @@ + + + + + +Created by FontForge 20160407 at Thu Jun 14 08:50:34 2018 + By Adam Bradley +Copyright (c) 2018, Adam Bradley + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/ionicons.ttf b/documentation/fonts/ionicons.ttf new file mode 100644 index 0000000000..67bd84202a Binary files /dev/null and b/documentation/fonts/ionicons.ttf differ diff --git a/documentation/fonts/ionicons.woff b/documentation/fonts/ionicons.woff new file mode 100644 index 0000000000..ec1c1f8795 Binary files /dev/null and b/documentation/fonts/ionicons.woff differ diff --git a/documentation/fonts/ionicons.woff2 b/documentation/fonts/ionicons.woff2 new file mode 100644 index 0000000000..4233951c94 Binary files /dev/null and b/documentation/fonts/ionicons.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-300.eot b/documentation/fonts/roboto-v15-latin-300.eot new file mode 100644 index 0000000000..826acfda91 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.eot differ diff --git a/documentation/fonts/roboto-v15-latin-300.svg b/documentation/fonts/roboto-v15-latin-300.svg new file mode 100644 index 0000000000..52b2832799 --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-300.svg @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-300.ttf b/documentation/fonts/roboto-v15-latin-300.ttf new file mode 100644 index 0000000000..66bc5ab8e2 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-300.woff b/documentation/fonts/roboto-v15-latin-300.woff new file mode 100644 index 0000000000..7e6c479f2c Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.woff differ diff --git a/documentation/fonts/roboto-v15-latin-300.woff2 b/documentation/fonts/roboto-v15-latin-300.woff2 new file mode 100644 index 0000000000..c34c128065 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-300.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-700.eot b/documentation/fonts/roboto-v15-latin-700.eot new file mode 100644 index 0000000000..f89cad7b7f Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.eot differ diff --git a/documentation/fonts/roboto-v15-latin-700.svg b/documentation/fonts/roboto-v15-latin-700.svg new file mode 100644 index 0000000000..fc8d42f92f --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-700.svg @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-700.ttf b/documentation/fonts/roboto-v15-latin-700.ttf new file mode 100644 index 0000000000..19090afb10 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-700.woff b/documentation/fonts/roboto-v15-latin-700.woff new file mode 100644 index 0000000000..bf737c1c39 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.woff differ diff --git a/documentation/fonts/roboto-v15-latin-700.woff2 b/documentation/fonts/roboto-v15-latin-700.woff2 new file mode 100644 index 0000000000..11cde5d04c Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-700.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-italic.eot b/documentation/fonts/roboto-v15-latin-italic.eot new file mode 100644 index 0000000000..f2d020a874 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.eot differ diff --git a/documentation/fonts/roboto-v15-latin-italic.svg b/documentation/fonts/roboto-v15-latin-italic.svg new file mode 100644 index 0000000000..738b8295f0 --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-italic.svg @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-italic.ttf b/documentation/fonts/roboto-v15-latin-italic.ttf new file mode 100644 index 0000000000..b0dd4a1e52 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-italic.woff b/documentation/fonts/roboto-v15-latin-italic.woff new file mode 100644 index 0000000000..a2b7704818 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.woff differ diff --git a/documentation/fonts/roboto-v15-latin-italic.woff2 b/documentation/fonts/roboto-v15-latin-italic.woff2 new file mode 100644 index 0000000000..1bb77f9d11 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-italic.woff2 differ diff --git a/documentation/fonts/roboto-v15-latin-regular.eot b/documentation/fonts/roboto-v15-latin-regular.eot new file mode 100644 index 0000000000..d26bc8f519 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.eot differ diff --git a/documentation/fonts/roboto-v15-latin-regular.svg b/documentation/fonts/roboto-v15-latin-regular.svg new file mode 100644 index 0000000000..ed55c105d7 --- /dev/null +++ b/documentation/fonts/roboto-v15-latin-regular.svg @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/fonts/roboto-v15-latin-regular.ttf b/documentation/fonts/roboto-v15-latin-regular.ttf new file mode 100644 index 0000000000..7b25f3ce94 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.ttf differ diff --git a/documentation/fonts/roboto-v15-latin-regular.woff b/documentation/fonts/roboto-v15-latin-regular.woff new file mode 100644 index 0000000000..941dfa4bae Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.woff differ diff --git a/documentation/fonts/roboto-v15-latin-regular.woff2 b/documentation/fonts/roboto-v15-latin-regular.woff2 new file mode 100644 index 0000000000..120796bb71 Binary files /dev/null and b/documentation/fonts/roboto-v15-latin-regular.woff2 differ diff --git a/documentation/graph/dependencies.svg b/documentation/graph/dependencies.svg new file mode 100644 index 0000000000..0dfa92d5e5 --- /dev/null +++ b/documentation/graph/dependencies.svg @@ -0,0 +1,870 @@ + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_AdminModule + + + +cluster_AdminModule_imports + + + +cluster_AppModule + + + +cluster_AppModule_declarations + + + +cluster_AppModule_imports + + + +cluster_AppModule_bootstrap + + + +cluster_AppModule_providers + + + +cluster_CoreModule + + + +cluster_CoreModule_providers + + + +cluster_CoreTestingModule + + + +cluster_CoreTestingModule_providers + + + +cluster_DatabaseModule + + + +cluster_DatabaseModule_providers + + + +cluster_DatabaseTestingModule + + + +cluster_DemoDataModule + + + +cluster_DemoDataModule_declarations + + + +cluster_DemoDataModule_exports + + + +cluster_DemoDataModule_providers + + + +cluster_FileModule + + + +cluster_FileModule_providers + + + +cluster_ImportModule + + + +cluster_ImportModule_imports + + + +cluster_LanguageModule + + + +cluster_LanguageModule_providers + + + +cluster_LatestChangesModule + + + +cluster_LatestChangesModule_declarations + + + +cluster_LatestChangesModule_imports + + + +cluster_MockedTestingModule + + + +cluster_PermissionsModule + + + +cluster_PermissionsModule_providers + + + +cluster_SessionModule + + + +cluster_SessionModule_providers + + + +cluster_StorybookBaseModule + + + +cluster_TabStateModule + + + +cluster_TabStateModule_declarations + + + +cluster_TabStateModule_exports + + + + +ConfigSetupModule + +ConfigSetupModule + + + +AdminModule + +AdminModule + + + +ConfigSetupModule->AdminModule + + + + + +ConflictResolutionModule + +ConflictResolutionModule + + + +ConflictResolutionModule->AdminModule + + + + + +AppModule + +AppModule + + + +AdminModule->AppModule + + + + + +AppComponent + +AppComponent + + + +AppComponent->AppModule + + + + + +AppComponent + +AppComponent + + + +AppModule->AppComponent + + + + + +DatabaseTestingModule + +DatabaseTestingModule + + + +AppModule->DatabaseTestingModule + + + + + +MockedTestingModule + +MockedTestingModule + + + +AppModule->MockedTestingModule + + + + + +StorybookBaseModule + +StorybookBaseModule + + + +AppModule->StorybookBaseModule + + + + + +AttendanceModule + +AttendanceModule + + + +AttendanceModule->AppModule + + + + + +BirthdayDashboardWidgetModule + +BirthdayDashboardWidgetModule + + + +BirthdayDashboardWidgetModule->AppModule + + + + + +ChildrenModule + +ChildrenModule + + + +ChildrenModule->AppModule + + + + + +ConfigurableEnumModule + +ConfigurableEnumModule + + + +ConfigurableEnumModule->AppModule + + + + + +CoreTestingModule + +CoreTestingModule + + + +ConfigurableEnumModule->CoreTestingModule + + + + + +CoreModule + +CoreModule + + + +CoreModule->AppModule + + + + + +CoreModule->CoreTestingModule + + + + + +DatabaseModule + +DatabaseModule + + + +DatabaseModule->AppModule + + + + + +EntityCountDashboardWidgetModule + +EntityCountDashboardWidgetModule + + + +EntityCountDashboardWidgetModule->AppModule + + + + + +FileModule + +FileModule + + + +FileModule->AppModule + + + + + +ImportModule + +ImportModule + + + +ImportModule->AppModule + + + + + +LanguageModule + +LanguageModule + + + +LanguageModule->AppModule + + + + + +LatestChangesModule + +LatestChangesModule + + + +LatestChangesModule->AppModule + + + + + +LocationModule + +LocationModule + + + +LocationModule->AppModule + + + + + +MarkdownPageModule + +MarkdownPageModule + + + +MarkdownPageModule->AppModule + + + + + +MatchingEntitiesModule + +MatchingEntitiesModule + + + +MatchingEntitiesModule->AppModule + + + + + +NotesModule + +NotesModule + + + +NotesModule->AppModule + + + + + +PermissionsModule + +PermissionsModule + + + +PermissionsModule->AppModule + + + + + +ProgressDashboardWidgetModule + +ProgressDashboardWidgetModule + + + +ProgressDashboardWidgetModule->AppModule + + + + + +ReportingModule + +ReportingModule + + + +ReportingModule->AppModule + + + + + +SessionModule + +SessionModule + + + +SessionModule->AppModule + + + + + +ShortcutDashboardWidgetModule + +ShortcutDashboardWidgetModule + + + +ShortcutDashboardWidgetModule->AppModule + + + + + +TodosModule + +TodosModule + + + +TodosModule->AppModule + + + + + +UiComponent + +UiComponent + + + +UiComponent->AppModule + + + + + +AnalyticsService + +AnalyticsService + + + +AnalyticsService->AppModule + + + + + +CurrentUserSubject + +CurrentUserSubject + + + +CurrentUserSubject->CoreModule + + + + + +SessionSubject + +SessionSubject + + + +SessionSubject->CoreModule + + + + + +EntityAbility + +EntityAbility + + + +EntityAbility->PermissionsModule + + + + + +EntityAbility->CoreTestingModule + + + + + +EntitySchemaService + +EntitySchemaService + + + +EntitySchemaService->CoreTestingModule + + + + + +PouchDatabase + +PouchDatabase + + + +PouchDatabase->DatabaseModule + + + + + +DemoDataGeneratingProgressDialogComponent + +DemoDataGeneratingProgressDialogComponent + + + +DemoDataModule + +DemoDataModule + + + +DemoDataGeneratingProgressDialogComponent->DemoDataModule + + + + + +DemoDataGeneratingProgressDialogComponent + +DemoDataGeneratingProgressDialogComponent + + + +DemoDataModule->DemoDataGeneratingProgressDialogComponent + + + + + +DemoDataInitializerService + +DemoDataInitializerService + + + +DemoDataInitializerService->DemoDataModule + + + + + +DemoDataService + +DemoDataService + + + +DemoDataService->DemoDataModule + + + + + +CouchdbFileService + +CouchdbFileService + + + +CouchdbFileService->FileModule + + + + + +MockFileService + +MockFileService + + + +MockFileService->FileModule + + + + + +DiscreteImportConfigComponent + +DiscreteImportConfigComponent + + + +DiscreteImportConfigComponent->ImportModule + + + + + +AcceptLanguageInterceptor + +AcceptLanguageInterceptor + + + +AcceptLanguageInterceptor->LanguageModule + + + + + +ChangelogComponent + +ChangelogComponent + + + +ChangelogComponent->LatestChangesModule + + + + + +NgForOf + +NgForOf + + + +NgForOf->LatestChangesModule + + + + + +NgIf + +NgIf + + + +NgIf->LatestChangesModule + + + + + +AbilityService + +AbilityService + + + +AbilityService->PermissionsModule + + + + + +UserRoleGuard + +UserRoleGuard + + + +UserRoleGuard->PermissionsModule + + + + + +KeycloakAuthService + +KeycloakAuthService + + + +KeycloakAuthService->SessionModule + + + + + +LoginStateSubject + +LoginStateSubject + + + +LoginStateSubject->SessionModule + + + + + +SessionManagerService + +SessionManagerService + + + +SessionManagerService->SessionModule + + + + + +SyncStateSubject + +SyncStateSubject + + + +SyncStateSubject->SessionModule + + + + + +TabStateMemoDirective + +TabStateMemoDirective + + + +TabStateModule + +TabStateModule + + + +TabStateMemoDirective->TabStateModule + + + + + +TabStateMemoDirective + +TabStateMemoDirective + + + +TabStateModule->TabStateMemoDirective + + + + + diff --git a/documentation/guards/AbstractPermissionGuard.html b/documentation/guards/AbstractPermissionGuard.html new file mode 100644 index 0000000000..912eddf2f4 --- /dev/null +++ b/documentation/guards/AbstractPermissionGuard.html @@ -0,0 +1,637 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/permissions/permission-guard/abstract-permission.guard.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Abstract base class with functionality common to all guards that check configurable user permissions or roles.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Implements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + CanActivate +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(router: Router) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + Abstract + canAccessRoute + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + canAccessRoute(routeData: DynamicComponentConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Implement specific permission checks here, based on the given route data (from config) +and any required services provided by Angular dependency injection.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    routeData + DynamicComponentConfig + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The route data object defined either in routing code or loaded from config by the RouterService.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + canActivate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + canActivate(route: ActivatedRouteSnapshot) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Check if current navigation is allowed. This is used by Angular Router.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    route + ActivatedRouteSnapshot + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + checkRoutePermissions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + checkRoutePermissions(path: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Pre-check if access to the given route would be allowed. +This is used by components and services to evaluate permissions without actual navigation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    path + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ActivatedRouteSnapshot,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  CanActivate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  Route,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponentConfig } from "../../config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Abstract base class with functionality common to all guards that check configurable user permissions or roles.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export abstract class AbstractPermissionGuard implements CanActivate {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(private router: Router) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Check if current navigation is allowed. This is used by Angular Router.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param route
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async canActivate(route: ActivatedRouteSnapshot): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const routeData: DynamicComponentConfig = route.data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (await this.canAccessRoute(routeData)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (route instanceof ActivatedRouteSnapshot) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // Route should only change if this is a "real" navigation check (not the check in the NavigationComponent)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.router.navigate(["/404"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Implement specific permission checks here, based on the given route data (from config)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * and any required services provided by Angular dependency injection.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param routeData The route data object defined either in routing code or loaded from config by the RouterService.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected abstract canAccessRoute(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    routeData: DynamicComponentConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<boolean>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Pre-check if access to the given route would be allowed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This is used by components and services to evaluate permissions without actual navigation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param path
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  public checkRoutePermissions(path: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let routeData = this.getRouteDataFromRouter(path, this.router.config);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.canAccessRoute(routeData?.data);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Extract the relevant route from Router, to get a merged route that contains the full trail of `permittedRoles`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param path
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param routes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private getRouteDataFromRouter(path: string, routes: Route[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // removing leading slash
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    path = path.replace(/^\//, "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    function isPathMatch(genericPath: string, path: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const routeRegex = genericPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .replace(/\*/g, ".*") // allow for wildcard routes in regex
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .split("/")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // replace params with wildcard regex
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .map((part) => (part.startsWith(":") ? "[^/]*" : part))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .join("/");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return path.match("^" + routeRegex + "[/.*]*$");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const pathSections = path.split("/");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let route = routes.find((r) => isPathMatch(r.path, path));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!route && pathSections.length > 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      route = routes.find((r) => isPathMatch(r.path, pathSections[0]));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (route?.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const childRoute = this.getRouteDataFromRouter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        pathSections.slice(1).join("/"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        route.children,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (childRoute) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        childRoute.data = { ...route.data, ...childRoute?.data };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        route = childRoute;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return route;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/guards/EntityPermissionGuard.html b/documentation/guards/EntityPermissionGuard.html new file mode 100644 index 0000000000..b7c2ae6e67 --- /dev/null +++ b/documentation/guards/EntityPermissionGuard.html @@ -0,0 +1,443 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/permissions/permission-guard/entity-permission.guard.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A guard that checks the current users permission to interact with the entity of the route. +Define requiredPermissionOperation in the route data / config, to enable a check that will find the relevant entity from config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + AbstractPermissionGuard +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(router: Router, ability: EntityAbility) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + Async + canAccessRoute + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + canAccessRoute(routeData: DynamicComponentConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      routeData + DynamicComponentConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { CanActivate, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityAbility } from "../ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AbstractPermissionGuard } from "./abstract-permission.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponentConfig } from "../../config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * A guard that checks the current users permission to interact with the entity of the route.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Define `requiredPermissionOperation` in the route data / config, to enable a check that will find the relevant entity from config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EntityPermissionGuard
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  extends AbstractPermissionGuard
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  implements CanActivate
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super(router);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  protected async canAccessRoute(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    routeData: DynamicComponentConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const operation = routeData?.["requiredPermissionOperation"] ?? "read";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const primaryEntity =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      routeData?.["entityType"] ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      routeData?.["entity"] ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      routeData?.["config"]?.["entityType"] ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      routeData?.["config"]?.["entity"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!primaryEntity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // No relevant config set => all users are allowed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.ability.rules.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // wait till rules are initialised
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      await new Promise((res) => this.ability.on("updated", res));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.ability.can(operation, primaryEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/images/CICD-Flow.svg b/documentation/images/CICD-Flow.svg new file mode 100644 index 0000000000..c9c10b23ec --- /dev/null +++ b/documentation/images/CICD-Flow.svg @@ -0,0 +1,3 @@ + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Pull Request
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Pull Request
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Dockerfile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Dockerfile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        build
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        build
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Heroku
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Heroku
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        DockerHub
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        DockerHub
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        GitHub
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        GitHub
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        build
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        build
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        run tests
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        run tests
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        prod image
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        prod image
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        upload Dockerimage
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        upload Dockerimage
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        deploy
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        deploy
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        upload Dockerimage
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        upload Dockerimage
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        publish
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        new tag
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        publish...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Master Update
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Master Update
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Viewer does not support full SVG 1.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file diff --git a/documentation/images/architecture_concrete-project.png b/documentation/images/architecture_concrete-project.png new file mode 100644 index 0000000000..ac2258b3d0 Binary files /dev/null and b/documentation/images/architecture_concrete-project.png differ diff --git a/documentation/images/architecture_core.png b/documentation/images/architecture_core.png new file mode 100644 index 0000000000..aecaddce05 Binary files /dev/null and b/documentation/images/architecture_core.png differ diff --git a/documentation/images/cascading-delete.png b/documentation/images/cascading-delete.png new file mode 100644 index 0000000000..178781d676 Binary files /dev/null and b/documentation/images/cascading-delete.png differ diff --git a/documentation/images/compodoc-vectorise-inverted.png b/documentation/images/compodoc-vectorise-inverted.png new file mode 100644 index 0000000000..e95ccfb06c Binary files /dev/null and b/documentation/images/compodoc-vectorise-inverted.png differ diff --git a/documentation/images/compodoc-vectorise-inverted.svg b/documentation/images/compodoc-vectorise-inverted.svg new file mode 100644 index 0000000000..d1479a564b --- /dev/null +++ b/documentation/images/compodoc-vectorise-inverted.svg @@ -0,0 +1,201 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/images/compodoc-vectorise.png b/documentation/images/compodoc-vectorise.png new file mode 100644 index 0000000000..8137403549 Binary files /dev/null and b/documentation/images/compodoc-vectorise.png differ diff --git a/documentation/images/compodoc-vectorise.svg b/documentation/images/compodoc-vectorise.svg new file mode 100644 index 0000000000..5e21f1e3fd --- /dev/null +++ b/documentation/images/compodoc-vectorise.svg @@ -0,0 +1,201 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/images/config_service.png b/documentation/images/config_service.png new file mode 100644 index 0000000000..dd831f1c65 Binary files /dev/null and b/documentation/images/config_service.png differ diff --git a/documentation/images/coverage-badge-documentation.svg b/documentation/images/coverage-badge-documentation.svg new file mode 100644 index 0000000000..6f76fa97f4 --- /dev/null +++ b/documentation/images/coverage-badge-documentation.svg @@ -0,0 +1,9 @@ + + + + + + documentation + 36% + + diff --git a/documentation/images/domain-model.png b/documentation/images/domain-model.png new file mode 100644 index 0000000000..b46afc197f Binary files /dev/null and b/documentation/images/domain-model.png differ diff --git a/documentation/images/entity-details-panels.png b/documentation/images/entity-details-panels.png new file mode 100644 index 0000000000..ab843106f4 Binary files /dev/null and b/documentation/images/entity-details-panels.png differ diff --git a/documentation/images/favicon.ico b/documentation/images/favicon.ico new file mode 100644 index 0000000000..4144ee4613 Binary files /dev/null and b/documentation/images/favicon.ico differ diff --git a/documentation/images/login-flow-new-user.svg b/documentation/images/login-flow-new-user.svg new file mode 100644 index 0000000000..b3fe0304cf --- /dev/null +++ b/documentation/images/login-flow-new-user.svg @@ -0,0 +1,3 @@ + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SyncedSession
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        SyncedSession
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LocalSession
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LocalSession
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        RemoteSession
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        RemoteSession
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGGED_IN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGGED_IN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGIN_FAILED
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGIN_FAILED
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGGED_IN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGGED_IN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        getCurrentUser()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        getCurrentUser()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        DatabaseUser
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        DatabaseUser
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        login(username, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGGED_IN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        LoginState.LOGGED_IN
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        saveUser(user, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        saveUser(user, password)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Viewer does not support full SVG 1.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file diff --git a/documentation/images/new-session-flows/initial__offline.svg b/documentation/images/new-session-flows/initial__offline.svg new file mode 100644 index 0000000000..3f3c723e20 --- /dev/null +++ b/documentation/images/new-session-flows/initial__offline.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginwaitForFirstSyncloginOffline Detection via fetchrejectedConnectionState.OFFLINEConnectionState.OFFLINEset sync failedSyncState.FAILEDfailureLoginState.loggedOffLoginState.loggedOffLoginState.loggedOffliveSyncDeferredUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/initial__online_correct_pwd.svg b/documentation/images/new-session-flows/initial__online_correct_pwd.svg new file mode 100644 index 0000000000..6e5f681f2c --- /dev/null +++ b/documentation/images/new-session-flows/initial__online_correct_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginwaitForFirstSyncloginconnectedConnectionState.CONNECTEDConnectionState.CONNECTEDsyncSyncState.STARTEDSyncState.COMPLETEDSyncState.COMPLETEDsuccessget UserUserLoginState.LOGGED_INLoginState.LOGGED_INLoginState.LOGGED_INliveSyncDeferredUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/initial__online_wrong_pwd.svg b/documentation/images/new-session-flows/initial__online_wrong_pwd.svg new file mode 100644 index 0000000000..25933126bb --- /dev/null +++ b/documentation/images/new-session-flows/initial__online_wrong_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginwaitForFirstSyncloginrejectedConnectionState.REJECTEDConnectionState.REJECTEDset login and sync failedLoginState.LOGIN_FAILEDSyncState.FAILEDfailureLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/initial__sync_failed.svg b/documentation/images/new-session-flows/initial__sync_failed.svg new file mode 100644 index 0000000000..dfac2ea479 --- /dev/null +++ b/documentation/images/new-session-flows/initial__sync_failed.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginwaitForFirstSyncloginconnectedConnectionState.CONNECTEDConnectionState.CONNECTEDsyncSyncState.STARTEDSyncState.FAILEDSyncState.FAILEDfailureLoginState.loggedOffLoginState.loggedOffLoginState.loggedOffUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/new-session-flows.md b/documentation/images/new-session-flows/new-session-flows.md new file mode 100644 index 0000000000..23787cc529 --- /dev/null +++ b/documentation/images/new-session-flows/new-session-flows.md @@ -0,0 +1,551 @@ +# Sequence Diagrams for Session Handling + +## Usual Flows + +Local database is present, we are online, remote password was not changed. + +### Correct Password + +![](normal__right_pwd.svg) + +### Wrong Password + +![](normal__wrong_pwd.svg) + +## Offline Flows + +Local Database is present, but we are offline + +### Correct Password + +![](offline__right_pwd.svg) + +### Wrong Password + +![](offline__wrong_pwd.svg) + +We must retry with wait here, as we might be in a situation where the remote password changed and we should actually be able to log in. See these flows for details. + +## Password Changed + +Local Database is present, but we changed the password and password state is inconsistent between local and remote. + +### Use old password + +Works locally but not on the remote. + +![](pwd_changed__old_pwd.svg) + +### Use new password + +Works on the remote but not locally. + +![](pwd_changed__new_pwd.svg) + +## Sync Failed Flows + +So the remote session connected (yay!), but for some reason other than being offline the sync fails. I don't know how, but this might happen. + +### Local Login succeeded + +Easiest case. Just start the liveSync and hope everything works out eventually. There should be some sync-indicator listening to the sync state to make the user aware that something is going wrong in the background. + +![](sync_failed__local_login_success.svg) + +### Local Login failed + +This is most probably a changed password case. However, as the sync failed, we cannot log the user in locally, so we have to keep the login failed. We also don't start a liveSync here, as it confuses the hell out of the UI to be not logged in but have a running (and intermittently failing) liveSync here. We might want to revisit this behavior, though. + +![](sync_failed__local_login_failure.svg) + +## Initial Sync Flows + +The local database is initial. We must wait for a first sync before we can log anyone in. + +### Online with correct password + +![](initial__online_correct_pwd.svg) + +### Online with wrong password + +![](initial__online_wrong_pwd.svg) + +### Offline + +We can't have the local login pending for too long. We also don't want the login explicitly failed (resulting in wrong password messages), so we just switch back to logged off. + +![](initial__offline.svg) + +### Some other terrible sync failure + +We don't know what to do in this case. We can't have the local login pending forever. We also don't want the login explicitly failed (resulting in wrong password messages), so we just switch back to logged off. + +![](initial__sync_failed.svg) + +# Mermaid Source + +All diagrams are done with Mermaid - markdown preview integration is available for vscode. + +## Usual Flows + +Local database is present, remote password was not changed. + +### Correct Password + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGGED_IN + LocalSession-->>-SyncedSession: LoginState.LOGGED_IN + SyncedSession-->>User: LoginState.LOGGED_IN + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: connected + Note over RemoteSession: ConnectionState.CONNECTED + RemoteSession-->>-SyncedSession: ConnectionState.CONNECTED + + SyncedSession->>+SyncedSession: sync + Note over LocalSession: SyncState.STARTED + SyncedSession-->>-SyncedSession: SyncState.COMPLETED + Note over LocalSession: SyncState.COMPLETED + Note over SyncedSession: liveSyncDeferred + deactivate Session + deactivate User +``` + +### Wrong Password + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGIN_FAILED + LocalSession-->>-SyncedSession: LoginState.LOGIN_FAILED + SyncedSession-->>User: LoginState.LOGIN_FAILED + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: rejected + Note over RemoteSession: ConnectionState.REJECTED + RemoteSession-->>-SyncedSession: ConnectionState.REJECTED + + deactivate Session + deactivate User +``` + +## Offline Flows + +Local Database is present, but we are offline + +### Correct Password + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGGED_IN + LocalSession-->>-SyncedSession: LoginState.LOGGED_IN + SyncedSession-->>User: LoginState.LOGGED_IN + + RemoteSession->>+Remote PouchDB: login + Note over RemoteSession,Remote PouchDB: Offline Detection via fetch + Remote PouchDB-->>-RemoteSession: failed + Note over RemoteSession: ConnectionState.OFFLINE + RemoteSession-->>-SyncedSession: ConnectionState.OFFLINE + + SyncedSession->>SyncedSession: login + Note over SyncedSession: retry with wait + deactivate Session + deactivate User +``` + +### Wrong Password + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGIN_FAILED + LocalSession-->>-SyncedSession: LoginState.LOGIN_FAILED + SyncedSession-->>User: LoginState.LOGIN_FAILED + + RemoteSession->>+Remote PouchDB: login + Note over RemoteSession,Remote PouchDB: Offline Detection via fetch + Remote PouchDB-->>-RemoteSession: failed + Note over RemoteSession: ConnectionState.OFFLINE + RemoteSession-->>-SyncedSession: ConnectionState.OFFLINE + + SyncedSession->>SyncedSession: login + Note over SyncedSession: retry with wait + deactivate Session + deactivate User +``` + +We must retry with wait here, as we might be in a situation where the remote password changed and we should actually be able to log in. See these flows for details. + +## Password Changed + +Local Database is present, but we changed the password and password state is inconsistent between local and remote. + +### Use old password + +Works locally but not on the remote. + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGGED_IN + LocalSession-->>-SyncedSession: LoginState.LOGGED_IN + SyncedSession-->>User: LoginState.LOGGED_IN + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: rejected + Note over RemoteSession: ConnectionState.REJECTED + RemoteSession-->>-SyncedSession: ConnectionState.REJECTED + + SyncedSession->>LocalSession: logout + fail + Note over LocalSession: LoginState.LOGIN_FAILED + Note over User,SyncedSession: Login Guard rejects + + deactivate Session + deactivate User +``` + +### Use new password + +Works on the remote but not locally. + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGIN_FAILED + LocalSession-->>-SyncedSession: LoginState.LOGIN_FAILED + SyncedSession-->>User: LoginState.LOGIN_FAILED + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: connected + Note over RemoteSession: ConnectionState.CONNECTED + RemoteSession-->>-SyncedSession: ConnectionState.CONNECTED + + SyncedSession->>+SyncedSession: sync + Note over LocalSession: SyncState.STARTED + SyncedSession-->>-SyncedSession: SyncState.COMPLETED + Note over LocalSession: SyncState.COMPLETED + SyncedSession->>LocalSession: login + Note over LocalSession: LoginState.LOGGED_IN + Note over User,SyncedSession: Login Guard to passes + Note over SyncedSession: liveSyncDeferred + deactivate Session + deactivate User +``` + +## Sync Failed Flows + +So the remote session connected (yay!), but for some reason other than being offline the sync fails. I don't know how, but this might happen. + +### Local Login succeeded + +Easiest case. Just start the liveSync and hope everything works out eventually. There should be some sync-indicator listening to the sync state to make the user aware that something is going wrong in the background. + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGGED_IN + LocalSession-->>-SyncedSession: LoginState.LOGGED_IN + SyncedSession-->>User: LoginState.LOGGED_IN + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: connected + Note over RemoteSession: ConnectionState.CONNECTED + RemoteSession-->>-SyncedSession: ConnectionState.CONNECTED + + SyncedSession->>+SyncedSession: sync + Note over LocalSession: SyncState.STARTED + SyncedSession-->>-SyncedSession: SyncState.FAILED + Note over LocalSession: SyncState.FAILED + Note over SyncedSession: liveSyncDeferred + deactivate Session + deactivate User +``` + +### Local Login failed + +This is most probably a changed password case. However, as the sync failed, we cannot log the user in locally, so we have to keep the login failed. We also don't start a liveSync here, as it confuses the hell out of the UI to be not logged in but have a running (and intermittently failing) liveSync here. We might want to revisit this behavior, though. + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGIN_FAILED + LocalSession-->>-SyncedSession: LoginState.LOGIN_FAILED + SyncedSession-->>User: LoginState.LOGIN_FAILED + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: connected + Note over RemoteSession: ConnectionState.CONNECTED + RemoteSession-->>-SyncedSession: ConnectionState.CONNECTED + + SyncedSession->>+SyncedSession: sync + Note over LocalSession: SyncState.STARTED + SyncedSession-->>-SyncedSession: SyncState.FAILED + Note over LocalSession: SyncState.FAILED + deactivate Session + deactivate User +``` + +## Initial Sync Flows + +The local database is initial. We must wait for a first sync before we can log anyone in. + +### Online with correct password + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+LocalSession: waitForFirstSync + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: connected + Note over RemoteSession: ConnectionState.CONNECTED + RemoteSession-->>-SyncedSession: ConnectionState.CONNECTED + + SyncedSession->>+SyncedSession: sync + Note over LocalSession: SyncState.STARTED + SyncedSession-->>-SyncedSession: SyncState.COMPLETED + Note over LocalSession: SyncState.COMPLETED + + LocalSession->>-LocalSession: success + LocalSession->>+Local PouchDB: get User + Local PouchDB-->>-LocalSession: User + Note over LocalSession: LoginState.LOGGED_IN + LocalSession-->>-SyncedSession: LoginState.LOGGED_IN + SyncedSession-->>User: LoginState.LOGGED_IN + + Note over SyncedSession: liveSyncDeferred + deactivate Session + deactivate User +``` + +### Online with wrong password + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+LocalSession: waitForFirstSync + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: rejected + Note over RemoteSession: ConnectionState.REJECTED + RemoteSession-->>-SyncedSession: ConnectionState.REJECTED + + SyncedSession->>LocalSession: set login and sync failed + Note over LocalSession: LoginState.LOGIN_FAILED + Note over LocalSession: SyncState.FAILED + + LocalSession->>-LocalSession: failure + LocalSession-->>-SyncedSession: LoginState.LOGIN_FAILED + SyncedSession-->>User: LoginState.LOGIN_FAILED + + deactivate Session + deactivate User +``` + +### Offline + +We can't have the local login pending for too long. We also don't want the login explicitly failed (resulting in wrong password messages), so we just switch back to logged off. + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+LocalSession: waitForFirstSync + + RemoteSession->>+Remote PouchDB: login + Note over RemoteSession,Remote PouchDB: Offline Detection via fetch + Remote PouchDB-->>-RemoteSession: rejected + Note over RemoteSession: ConnectionState.OFFLINE + RemoteSession-->>-SyncedSession: ConnectionState.OFFLINE + + SyncedSession->>LocalSession: set sync failed + Note over LocalSession: SyncState.FAILED + + LocalSession->>-LocalSession: failure + Note over LocalSession: LoginState.loggedOff + LocalSession-->>-SyncedSession: LoginState.loggedOff + SyncedSession-->>User: LoginState.loggedOff + + Note over SyncedSession: liveSyncDeferred + deactivate Session + deactivate User +``` + +### Some other terrible sync failure + +We don't know what to do in this case. We can't have the local login pending forever. We also don't want the login explicitly failed (resulting in wrong password messages), so we just switch back to logged off. + +```mermaid +sequenceDiagram + participant User + participant SyncedSession + participant LocalSession + participant Local PouchDB + participant RemoteSession + participant Remote PouchDB + + activate User + User->>+SyncedSession: login + SyncedSession->>+LocalSession: login + SyncedSession->>+RemoteSession: login + + LocalSession->>+LocalSession: waitForFirstSync + + RemoteSession->>+Remote PouchDB: login + Remote PouchDB-->>-RemoteSession: connected + Note over RemoteSession: ConnectionState.CONNECTED + RemoteSession-->>-SyncedSession: ConnectionState.CONNECTED + + SyncedSession->>+SyncedSession: sync + Note over LocalSession: SyncState.STARTED + SyncedSession-->>-SyncedSession: SyncState.FAILED + Note over LocalSession: SyncState.FAILED + + LocalSession->>-LocalSession: failure + + Note over LocalSession: LoginState.loggedOff + LocalSession-->>-SyncedSession: LoginState.loggedOff + SyncedSession-->>User: LoginState.loggedOff + + deactivate Session + deactivate User +``` diff --git a/documentation/images/new-session-flows/normal__right_pwd.svg b/documentation/images/new-session-flows/normal__right_pwd.svg new file mode 100644 index 0000000000..cbad3c723c --- /dev/null +++ b/documentation/images/new-session-flows/normal__right_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGGED_INLoginState.LOGGED_INLoginState.LOGGED_INloginconnectedConnectionState.CONNECTEDConnectionState.CONNECTEDsyncSyncState.STARTEDSyncState.COMPLETEDSyncState.COMPLETEDliveSyncDeferredUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/normal__wrong_pwd.svg b/documentation/images/new-session-flows/normal__wrong_pwd.svg new file mode 100644 index 0000000000..51d74373ff --- /dev/null +++ b/documentation/images/new-session-flows/normal__wrong_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDloginrejectedConnectionState.REJECTEDConnectionState.REJECTEDUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/offline__right_pwd.svg b/documentation/images/new-session-flows/offline__right_pwd.svg new file mode 100644 index 0000000000..2c81a15dc6 --- /dev/null +++ b/documentation/images/new-session-flows/offline__right_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGGED_INLoginState.LOGGED_INLoginState.LOGGED_INloginOffline Detection via fetchfailedConnectionState.OFFLINEConnectionState.OFFLINEloginretry with waitUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/offline__wrong_pwd.svg b/documentation/images/new-session-flows/offline__wrong_pwd.svg new file mode 100644 index 0000000000..c3d1a15e89 --- /dev/null +++ b/documentation/images/new-session-flows/offline__wrong_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDloginOffline Detection via fetchfailedConnectionState.OFFLINEConnectionState.OFFLINEloginretry with waitUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/pwd_changed__new_pwd.svg b/documentation/images/new-session-flows/pwd_changed__new_pwd.svg new file mode 100644 index 0000000000..2bff1f6d70 --- /dev/null +++ b/documentation/images/new-session-flows/pwd_changed__new_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDloginconnectedConnectionState.CONNECTEDConnectionState.CONNECTEDsyncSyncState.STARTEDSyncState.COMPLETEDSyncState.COMPLETEDloginLoginState.LOGGED_INLogin Guard to passesliveSyncDeferredUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/pwd_changed__old_pwd.svg b/documentation/images/new-session-flows/pwd_changed__old_pwd.svg new file mode 100644 index 0000000000..300fa8f899 --- /dev/null +++ b/documentation/images/new-session-flows/pwd_changed__old_pwd.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGGED_INLoginState.LOGGED_INLoginState.LOGGED_INloginrejectedConnectionState.REJECTEDConnectionState.REJECTEDlogout + failLoginState.LOGIN_FAILEDLogin Guard rejectsUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/sync_failed__local_login_failure.svg b/documentation/images/new-session-flows/sync_failed__local_login_failure.svg new file mode 100644 index 0000000000..1955132651 --- /dev/null +++ b/documentation/images/new-session-flows/sync_failed__local_login_failure.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDLoginState.LOGIN_FAILEDloginconnectedConnectionState.CONNECTEDConnectionState.CONNECTEDsyncSyncState.STARTEDSyncState.FAILEDSyncState.FAILEDUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/new-session-flows/sync_failed__local_login_success.svg b/documentation/images/new-session-flows/sync_failed__local_login_success.svg new file mode 100644 index 0000000000..cfcfe1c39f --- /dev/null +++ b/documentation/images/new-session-flows/sync_failed__local_login_success.svg @@ -0,0 +1,4 @@ +UserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDBloginloginloginget UserUserLoginState.LOGGED_INLoginState.LOGGED_INLoginState.LOGGED_INloginconnectedConnectionState.CONNECTEDConnectionState.CONNECTEDsyncSyncState.STARTEDSyncState.FAILEDSyncState.FAILEDliveSyncDeferredUserSyncedSessionLocalSessionLocal PouchDBRemoteSessionRemote PouchDB \ No newline at end of file diff --git a/documentation/images/routed-views.png b/documentation/images/routed-views.png new file mode 100644 index 0000000000..37beeea660 Binary files /dev/null and b/documentation/images/routed-views.png differ diff --git a/documentation/images/session-uml.svg b/documentation/images/session-uml.svg new file mode 100644 index 0000000000..2990eb416a --- /dev/null +++ b/documentation/images/session-uml.svg @@ -0,0 +1,3 @@ + + +<<abstract>>SessionService+ syncState: BehaviorSubject<SyncState>+ loginState: BehaviorSubject<LoginState>+ login: Promise<LoginState>+ getCurrentUser: DatabaseUser+ sync: void+ checkPassword: boolean+ logout: void<<enum>>LoginStateLOGGED_OUTLOGGED_INLOGIN_FAILEDUNAVAILABLE<<enum>>SyncStateUNSYNCEDSTARTEDCOMPLETEDFAILEDABORTEDLocalSession+ login: Promise<LoginState>+ saveUser: void+ removeUser: void ...RemoteSession+ login: Promise<LoginState>...SyncedSession+ login: Promise<LoginState>...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Local
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Storage
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Local...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <<interface>>DatabaseUser+ name: string+ roles: string[]<<interface>>LocalUser+ encryptedPassword
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Viewer does not support full SVG 1.1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        \ No newline at end of file diff --git a/documentation/images/session_classes.png b/documentation/images/session_classes.png new file mode 100644 index 0000000000..2c06a48dec Binary files /dev/null and b/documentation/images/session_classes.png differ diff --git a/documentation/images/session_state.png b/documentation/images/session_state.png new file mode 100644 index 0000000000..7b759ca2be Binary files /dev/null and b/documentation/images/session_state.png differ diff --git a/documentation/images/state_handler.png b/documentation/images/state_handler.png new file mode 100644 index 0000000000..7a293747b5 Binary files /dev/null and b/documentation/images/state_handler.png differ diff --git a/documentation/images/system_overview.png b/documentation/images/system_overview.png new file mode 100644 index 0000000000..2f8a76f883 Binary files /dev/null and b/documentation/images/system_overview.png differ diff --git a/documentation/images/tech-stack.png b/documentation/images/tech-stack.png new file mode 100644 index 0000000000..75803930a8 Binary files /dev/null and b/documentation/images/tech-stack.png differ diff --git a/documentation/index.html b/documentation/index.html new file mode 100644 index 0000000000..5d8109825b --- /dev/null +++ b/documentation/index.html @@ -0,0 +1,247 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Release Version +Build Status +Code Climate +Test Coverage +E2E Tests +Guides +Known Vulnerabilities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Aam Digital

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Enabling social organizations digitally to transform lives.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Aam Digital is an easy-to-use case management software for the social sector that improves the effectiveness and transparency of work with beneficiaries in the field.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        For more information about the software and an open demo system visit www.aam-digital.com.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        For more information about the code including guides see the separate Developer Documentation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Installation, Use & Deployment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        You can directly run the system using Docker. +More information in our Aam-Digital/ndb-setup repository. +In that case you do not have to clone this repository and install all the dependencies as everything is packaged into the docker image already.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The Aam Digital platform can be customized for different use cases through a flexible configuration file. This doesn't require changes to the generic platform code base in this repository: +image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The overall architecture and tech stack including backend services looks like this: +image

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Development

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Setup

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. This project depends on npm (NodeJS) to setup its dependencies. Please make sure you have npm installed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        3. git clone this repository to get all the code with its configuration and requirements.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        4. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        5. npm install the dependencies (external libraries and packages)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        6. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        7. npm run start to run your local dev server and get started.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        8. +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        By default the app is started with a "mock" session, generating demo data into an in-memory database. +You can change this mode by editing the environment.ts +(or create a file assets/config.json to overwrite settings; that file is on the .gitignore list).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Use the dockerized local environment to run a fully synced app including backend services on your machine: +https://github.com/Aam-Digital/aam-services/tree/main/docs/developer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Documentation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Our detailed Developer Documentation +provides tutorials, guides, concepts and an API reference.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Code Style

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        We use prettier to enforce a consistent formatting of code to make the project easier to read. +The project is set up with a git pre-commit hook to automatically format your commits according to these rules.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Using Angular CLI

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This project is built upon Angular. +If you are unfamiliar with the framework and Angular CLI go check out the Angular CLI README or use use ng help. +The following sections give you a brief overview.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Development server

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Run npm run start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Code scaffolding (Generate new modules and components)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        You can use Angular CLI to add new code to the project. Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|module.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Build

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Run ng build -prod to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Running unit tests

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Run ng test to execute the unit tests via Karma.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Running end-to-end tests

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Run npm run e2e to execute the end-to-end tests via Cypress in the terminal.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Run npm run e2e-open to execute the end-to-end tests via Cypress own User Interface.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Build a docker image locally

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Deployment on a server can be done through a docker image, our ndb-setup project provides tools and a starting point to run the system using docker. +For more information about Docker, please refer to their official documentation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        To learn more about the build process, see /build.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Contribute

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Our project is completely run by volunteers. Contributions welcome!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        We are trying hard to make it easy for you to join in. +As a starting point, please refer to our CONTRIBUTING page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/AbilityService.html b/documentation/injectables/AbilityService.html new file mode 100644 index 0000000000..774d6ac45c --- /dev/null +++ b/documentation/injectables/AbilityService.html @@ -0,0 +1,684 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/permissions/ability/ability.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This service sets up the EntityAbility injectable with the JSON defined rules for the currently logged in user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          To get notified whenever the permissions of the current user are updated, use EntityAbility.on("updated", callback): +https://casl.js.org/v6/en/api/casl-ability#on

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + LatestEntityLoader +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(ability: EntityAbility, sessionInfo: SessionSubject, currentUser: CurrentUserSubject, permissionEnforcer: PermissionEnforcerService, entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          permissionEnforcer + PermissionEnforcerService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + initializeRules + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + initializeRules() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + loadOnce + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + loadOnce() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Do an initial load of the entity to be available through the entityUpdated property +(without watching for continuous updates).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<T | undefined> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + startLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + startLoading() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Initialize the loader to make the entity available and emit continuous updates +through the entityUpdated property

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + entityUpdated + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : new Subject<T>() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          subscribe to this and execute any actions required when the entity changes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DatabaseRule, DatabaseRules } from "../permission-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { PermissionEnforcerService } from "../permission-enforcer/permission-enforcer.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityAbility } from "./entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Config } from "../../config/config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { get } from "lodash-es";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { LatestEntityLoader } from "../../entity/latest-entity-loader";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SessionInfo, SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { CurrentUserSubject } from "../../session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { merge } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This service sets up the `EntityAbility` injectable with the JSON defined rules for the currently logged in user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * To get notified whenever the permissions of the current user are updated, use EntityAbility.on("updated", callback):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * https://casl.js.org/v6/en/api/casl-ability#on
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class AbilityService extends LatestEntityLoader<Config<DatabaseRules>> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private currentRules: DatabaseRules;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private permissionEnforcer: PermissionEnforcerService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super(Config, Config.PERMISSION_KEY, entityMapper);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.entityUpdated.subscribe((config) => (this.currentRules = config.data));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async initializeRules() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const initialPermissions = await super.startLoading();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (initialPermissions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      await this.updateAbilityWithUserRules(initialPermissions.data);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // as default fallback if no permission object is defined: allow everything
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.ability.update([{ action: "manage", subject: "all" }]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    merge(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entityUpdated.pipe(map((config) => config.data)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.sessionInfo.pipe(map(() => this.currentRules)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.currentUser.pipe(map(() => this.currentRules)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ).subscribe((rules) => this.updateAbilityWithUserRules(rules));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private async updateAbilityWithUserRules(rules: DatabaseRules): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // If rules object is empty, everything is allowed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const userRules: DatabaseRule[] = rules
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ? await this.getRulesForUser(rules)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      : [{ action: "manage", subject: "all" }];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (userRules.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // No rules or only default rules defined
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const user = this.sessionInfo.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        `no rules found for user "${user?.name}" with roles "${user?.roles}"`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.ability.update(userRules);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.permissionEnforcer.enforcePermissionsOnLocalData(userRules);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private async getRulesForUser(rules: DatabaseRules): Promise<DatabaseRule[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const sessionInfo = this.sessionInfo.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!sessionInfo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return rules.public ?? [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const rawUserRules: DatabaseRule[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (rules.default) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      rawUserRules.push(...rules.default);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    sessionInfo.roles.forEach((role) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const rulesForRole = rules[role] || [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      rawUserRules.push(...rulesForRole);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.interpolateUser(rawUserRules, sessionInfo);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private interpolateUser(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    rules: DatabaseRule[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    sessionInfo: SessionInfo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): DatabaseRule[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const user = this.currentUser.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (user && user["projects"]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      sessionInfo.projects = user["projects"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      sessionInfo.projects = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return JSON.parse(JSON.stringify(rules), (_that, rawValue) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (rawValue[0] !== "$") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return rawValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      let name = rawValue.slice(2, -1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (name === "user.name") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // the user account related entity (assured with prefix) is now stored in user.entityId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // mapping the previously valid ${user.name} here for backwards compatibility
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        name = "user.entityId";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const value = get({ user: sessionInfo }, name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (typeof value === "undefined") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        throw new ReferenceError(`Variable ${name} is not defined`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/AdminEntityService.html b/documentation/injectables/AdminEntityService.html new file mode 100644 index 0000000000..dda8a19e30 --- /dev/null +++ b/documentation/injectables/AdminEntityService.html @@ -0,0 +1,427 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/admin/admin-entity.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Simply service to centralize updates between various admin components in the form builder.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + updateSchemaField + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +updateSchemaField(entityType: EntityConstructor, fieldId: any, updatedEntitySchema: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Set a new schema field to the given entity and trigger update event for related admin components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityType + EntityConstructor + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fieldId + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            updatedEntitySchema + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Public + entitySchemaUpdated + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : new EventEmitter<void>() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { EventEmitter, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityConstructor } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Simply service to centralize updates between various admin components in the form builder.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class AdminEntityService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  public entitySchemaUpdated = new EventEmitter<void>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Set a new schema field to the given entity and trigger update event for related admin components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param fieldId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param updatedEntitySchema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  updateSchemaField(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entityType: EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldId: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    updatedEntitySchema: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entityType.schema.set(fieldId, updatedEntitySchema);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.entitySchemaUpdated.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/AdminOverviewService.html b/documentation/injectables/AdminOverviewService.html new file mode 100644 index 0000000000..95a3ee1cd0 --- /dev/null +++ b/documentation/injectables/AdminOverviewService.html @@ -0,0 +1,341 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/admin/admin-overview/admin-overview.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Settings for the Admin Overview page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use this to dynamically register additional shortcuts for other Feature Modules to be listed in the Admin page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + menuItems + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [ + { + label: $localize`:admin menu item:Site Settings`, + link: "/admin/site-settings", + }, + { + label: $localize`:admin menu item:Database Conflicts`, + link: "/admin/conflicts", + }, + { + label: $localize`:admin menu item:Administer Entity Types`, + link: "/admin/entity", + }, + { + label: $localize`:admin menu item:Setup Wizard`, + link: "/admin/setup-wizard", + }, + ] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MenuItem } from "../../ui/navigation/menu-item";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Settings for the Admin Overview page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Use this to dynamically register additional shortcuts for other Feature Modules to be listed in the Admin page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class AdminOverviewService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  menuItems: MenuItem[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      label: $localize`:admin menu item:Site Settings`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      link: "/admin/site-settings",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      label: $localize`:admin menu item:Database Conflicts`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      link: "/admin/conflicts",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      label: $localize`:admin menu item:Administer Entity Types`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      link: "/admin/entity",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      label: $localize`:admin menu item:Setup Wizard`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      link: "/admin/setup-wizard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/AlertService.html b/documentation/injectables/AlertService.html new file mode 100644 index 0000000000..74ff25a125 --- /dev/null +++ b/documentation/injectables/AlertService.html @@ -0,0 +1,851 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/alerts/alert.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Display alerts to the user as a hovering message at the bottom of the view. +(Angular Material "SnackBar")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inject this service in your classes to easily trigger alerts in the app consistent style.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If you want to log technical details and problems, use Logging instead! +This service is for user facing messages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                You can also use the MatSnackBar when you want to have more control over what you +want to display to the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(snackBar: MatSnackBar) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                snackBar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + addAlert + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +addAlert(alert: AlertConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Display the given alert.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                alert + AlertConfig + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The alert instance to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + addDanger + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + addDanger(message: string, display: AlertDisplay) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Display an alert message of "Danger" level, that is highlighted and will have to be actively dismissed by the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                message + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The text to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                display + AlertDisplay + + No + + AlertDisplay.PERSISTENT + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Optional override of the display style (e.g. whether the alert has to be actively dismissed by the user)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + addInfo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + addInfo(message: string, display: AlertDisplay) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Display an alert message of "Info" level, that will automatically dismiss itself after a timeout.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                message + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The text to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                display + AlertDisplay + + No + + AlertDisplay.TEMPORARY + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Optional override of the display style (e.g. whether the alert has to be actively dismissed by the user)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + addWarning + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + addWarning(message: string, display: AlertDisplay) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Display an alert message of "Warning" level, that will have to be actively dismissed by the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                message + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The text to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                display + AlertDisplay + + No + + AlertDisplay.PERSISTENT + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Optional override of the display style (e.g. whether the alert has to be actively dismissed by the user)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + alerts + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : ExtendedAlertConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                All alerts currently to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AlertConfig, ExtendedAlertConfig } from "./alert-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AlertDisplay } from "./alert-display";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Display alerts to the user as a hovering message at the bottom of the view.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * (Angular Material "SnackBar")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Inject this service in your classes to easily trigger alerts in the app consistent style.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * If you want to log technical details and problems, use {@link Logging} instead!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * This service is for user facing messages.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * You can also use the {@link MatSnackBar} when you want to have more control over what you
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * want to display to the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class AlertService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** All alerts currently to be displayed */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  alerts: ExtendedAlertConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private static ALERT_BASE_CLASS = "ndb-alert";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(private snackBar: MatSnackBar) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Display the given alert.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param alert The alert instance to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  addAlert(alert: AlertConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.alerts.push({ ...alert, timestamp: new Date() });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.displayAlert(alert);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private displayAlert(alert: AlertConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const snackConfig: MatSnackBarConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      duration: 10000,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    switch (alert.display) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      case AlertDisplay.NONE:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      case AlertDisplay.TEMPORARY:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        snackConfig.duration = 5000;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      case AlertDisplay.PERSISTENT:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        snackConfig.duration = 3600000;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    snackConfig.panelClass = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      AlertService.ALERT_BASE_CLASS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      AlertService.ALERT_BASE_CLASS + "--" + alert.type,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.snackBar.open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      alert.message,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      $localize`:alert dismiss action:dismiss`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      snackConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Display an alert message of "Info" level, that will automatically dismiss itself after a timeout.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param message The text to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param display Optional override of the display style (e.g. whether the alert has to be actively dismissed by the user)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public addInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    display: AlertDisplay = AlertDisplay.TEMPORARY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.addAlert({ message, type: "info", display });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Display an alert message of "Warning" level, that will have to be actively dismissed by the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param message The text to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param display Optional override of the display style (e.g. whether the alert has to be actively dismissed by the user)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public addWarning(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    display: AlertDisplay = AlertDisplay.PERSISTENT,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.addAlert({ message, type: "warning", display });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Display an alert message of "Danger" level, that is highlighted and will have to be actively dismissed by the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param message The text to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param display Optional override of the display style (e.g. whether the alert has to be actively dismissed by the user)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public addDanger(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    display: AlertDisplay = AlertDisplay.PERSISTENT,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.addAlert({ message, type: "danger", display });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/AnalyticsService.html b/documentation/injectables/AnalyticsService.html new file mode 100644 index 0000000000..ab1a317dfe --- /dev/null +++ b/documentation/injectables/AnalyticsService.html @@ -0,0 +1,723 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/analytics/analytics.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Track usage analytics data and report it to a backend server like Matomo.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This is automatically disabled if the config doc does not specify "usage_analytics" settings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(angulartics2: Angulartics2, angulartics2Matomo: Angulartics2Matomo, configService: ConfigService, loginState: LoginStateSubject, sessionInfo: SessionSubject) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  angulartics2 + Angulartics2 + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  angulartics2Matomo + Angulartics2Matomo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  loginState + LoginStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + eventTrack + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +eventTrack(action: string, properties: literal type) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Explicitly record a user action

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  action + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  String identifying the action

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  properties + literal type + + No + + { + category: "no_category", + label: "no_label", + } + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Additional properties for categorization

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + init + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +init() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Set up usage analytics tracking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + setUser + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + setUser(username: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Sets a unique user hash which is always for the same user but does not expose the username. +This improves the logging behavior.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  username + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  actual username

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ConfigService } from "../config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  USAGE_ANALYTICS_CONFIG_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  UsageAnalyticsConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "./usage-analytics-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Angulartics2, Angulartics2Matomo } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import md5 from "md5";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { LoginState } from "../session/session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { LoginStateSubject } from "../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { SessionSubject } from "../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Track usage analytics data and report it to a backend server like Matomo.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This is automatically disabled if the config doc does not specify "usage_analytics" settings.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class AnalyticsService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private isInitialized = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private angulartics2: Angulartics2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private angulartics2Matomo: Angulartics2Matomo,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    loginState: LoginStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (environment.production) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.init();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // update the user context for remote error logging and tracking and load config initially
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    loginState.subscribe((s: LoginState) => this.updateSessionInfo(s));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private updateSessionInfo(newState: LoginState): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (newState === LoginState.LOGGED_IN) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const username = this.sessionInfo.value?.name;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.setUser(username);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.setUser(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Sets a unique user hash which is always for the same user but does not expose the username.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This improves the logging behavior.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param username actual username
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public setUser(username: string): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const baseUrl = location.host;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.angulartics2Matomo.setUsername(md5(`${baseUrl}${username ?? ""}`));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Set up usage analytics tracking.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  init(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    window["_paq"] = window["_paq"] || [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    window["_paq"].push([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      "setDocumentTitle",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      document.domain + "/" + document.title,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    window["_paq"].push(["trackPageView"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    window["_paq"].push(["enableLinkTracking"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.setVersion();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.setOrganization(location.hostname);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.setUser(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.configService.configUpdates.subscribe(() => this.setConfigValues());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private setVersion(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.angulartics2.setUserProperties.next({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      dimension1: "ndb-core@" + environment.appVersion,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private setOrganization(orgName: string): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.angulartics2.setUserProperties.next({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      dimension2: orgName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * dynamically sets up everything for Matomo.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The code is inspired by:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * https://github.com/Arnaud73/ngx-matomo/blob/master/projects/ngx-matomo/src/lib/matomo-injector.service.ts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private setConfigValues() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const { url, site_id, no_cookies } =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.configService.getConfig<UsageAnalyticsConfig>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        USAGE_ANALYTICS_CONFIG_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ) || { url: "https://matomo.aam-digital.org" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const u = url.endsWith("/") ? url : url + "/";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!this.isInitialized) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const g = document.createElement("script");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const s = document.getElementsByTagName("script")[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      g.type = "text/javascript";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      g.async = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      g.defer = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      g.src = u + "matomo.js";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      s.parentNode.insertBefore(g, s);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.angulartics2Matomo.startTracking();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.isInitialized = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    window["_paq"].push(["setTrackerUrl", u + "matomo.php"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (no_cookies) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      window["_paq"].push(["disableCookies"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (site_id) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      window["_paq"].push(["setSiteId", site_id]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Explicitly record a user action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param action String identifying the action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param properties Additional properties for categorization
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  eventTrack(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    action: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    properties: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      category: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      value?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      category: "no_category",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      label: "no_label",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.angulartics2.eventTrack.next({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      action: action,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      properties: properties,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/AttendanceService.html b/documentation/injectables/AttendanceService.html new file mode 100644 index 0000000000..8622ba5cff --- /dev/null +++ b/documentation/injectables/AttendanceService.html @@ -0,0 +1,1235 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/child-dev-project/attendance/attendance.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(entityMapper: EntityMapperService, dbIndexing: DatabaseIndexingService, childrenService: ChildrenService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    dbIndexing + DatabaseIndexingService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + createEventForActivity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + createEventForActivity(activity: RecurringActivity, date: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    activity + RecurringActivity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    date + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<EventNote> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + getActivitiesForChild + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getActivitiesForChild(childId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    childId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + getActivityAttendances + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getActivityAttendances(activity: RecurringActivity, sinceDate?: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Load and calculate activity attendance records.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    activity + RecurringActivity + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    To activity for which records are loaded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sinceDate + Date + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (Optional) date starting from which events should be considered. Events before this are ignored to improve performance.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + getAllActivityAttendancesForPeriod + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getAllActivityAttendancesForPeriod(from: Date, until: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    from + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    until + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + getEventsForActivity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getEventsForActivity(activityId: string, sinceDate?: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Load events related to the given recurring activity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    activityId + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The reference activity the events should relate to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sinceDate + Date + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (Optional) date starting from which events should be considered. Events before this are ignored to improve performance.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<EventNote[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + getEventsOnDate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getEventsOnDate(startDate: Date, endDate: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Return all events on the given date or date range.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    startDate + Date + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The date (or start date of a range)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    endDate + Date + + No + + startDate + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (Optional) end date of the period to be queried; if not given, defaults to the start date

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<EventNote[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + getEventsWithUpdatedParticipants + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getEventsWithUpdatedParticipants(date: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    date + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { RecurringActivity } from "./model/recurring-activity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ActivityAttendance } from "./model/activity-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { groupBy } from "../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DatabaseIndexingService } from "../../core/entity/database-indexing/database-indexing.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EventNote } from "./model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ChildrenService } from "../children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class AttendanceService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private dbIndexing: DatabaseIndexingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.createIndices();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private createIndices() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.createEventsIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.createRecurringActivitiesIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private createEventsIndex(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const designDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      _id: "_design/events_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        by_date: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            if (doc._id.startsWith("${EventNote.ENTITY_TYPE}")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              if (doc.date && doc.date.length === 10) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                emit(doc.date);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                var d = new Date(doc.date || null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                var dString = d.getFullYear() + "-" + String(d.getMonth()+1).padStart(2, "0") + "-" + String(d.getDate()).padStart(2, "0");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                emit(dString);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // TODO: remove this and use general Note's relatedEntities index?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        by_activity: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            if (doc._id.startsWith("${EventNote.ENTITY_TYPE}") && doc.relatesTo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              var dString;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              if (doc.date && doc.date.length === 10) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                dString = doc.date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              } else {            
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                var d = new Date(doc.date || null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                dString = d.getFullYear() + "-" + String(d.getMonth()+1).padStart(2, "0") + "-" + String(d.getDate()).padStart(2, "0");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              emit(doc.relatesTo + "_" + dString);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.dbIndexing.createIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private createRecurringActivitiesIndex(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const designDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      _id: "_design/activities_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        by_participant: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            if (doc._id.startsWith("${RecurringActivity.ENTITY_TYPE}")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              for (var p of (doc.participants || [])) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                emit(p);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        by_school: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            if (doc._id.startsWith("${RecurringActivity.ENTITY_TYPE}")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              for (var g of (doc.linkedGroups || [])) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +                emit(g);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.dbIndexing.createIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Return all events on the given date or date range.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param startDate The date (or start date of a range)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param endDate (Optional) end date of the period to be queried; if not given, defaults to the start date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async getEventsOnDate(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    startDate: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    endDate: Date = startDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<EventNote[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const start = moment(startDate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const end = moment(endDate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const eventNotes = this.dbIndexing.queryIndexDocsRange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      EventNote,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "events_index/by_date",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      start.format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      end.format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const relevantNormalNotes = this.childrenService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .getNotesInTimespan(start, end)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .then((notes) => notes.filter((n) => n.category?.isMeeting));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const allResults = await Promise.all([eventNotes, relevantNormalNotes]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return allResults[0].concat(allResults[1]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async getEventsWithUpdatedParticipants(date: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const events = await this.getEventsOnDate(date, date);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const event of events) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const participants = await this.loadParticipantsOfGroups(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        event.schools,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      for (const newParticipant of participants) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        event.addChild(newParticipant);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return events;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Load events related to the given recurring activity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param activityId The reference activity the events should relate to.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param sinceDate (Optional) date starting from which events should be considered. Events before this are ignored to improve performance.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async getEventsForActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    activityId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    sinceDate?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<EventNote[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!activityId.startsWith(RecurringActivity.ENTITY_TYPE)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      activityId = RecurringActivity.ENTITY_TYPE + ":" + activityId;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let dateLimit = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (sinceDate) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      dateLimit =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "_" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        sinceDate.getFullYear() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "-" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        String(sinceDate.getMonth() + 1).padStart(2, "0") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "-" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        String(sinceDate.getDate()).padStart(2, "0");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.dbIndexing.queryIndexDocsRange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      EventNote,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "events_index/by_activity",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      activityId + dateLimit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      activityId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Load and calculate activity attendance records.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param activity To activity for which records are loaded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param sinceDate (Optional) date starting from which events should be considered. Events before this are ignored to improve performance.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async getActivityAttendances(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    activity: RecurringActivity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    sinceDate?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<ActivityAttendance[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const periods = new Map<number, ActivityAttendance>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    function getOrCreateAttendancePeriod(event) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const month = new Date(event.date.getFullYear(), event.date.getMonth());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      let attMonth = periods.get(month.getTime());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (!attMonth) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        attMonth = ActivityAttendance.create(month);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        attMonth.periodTo = moment(month).endOf("month").toDate();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        attMonth.activity = activity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        periods.set(month.getTime(), attMonth);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return attMonth;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const events = await this.getEventsForActivity(activity.getId(), sinceDate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const event of events) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const record = getOrCreateAttendancePeriod(event);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      record.events.push(event);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return Array.from(periods.values()).sort(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (a, b) => a.periodFrom.getTime() - b.periodFrom.getTime(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async getAllActivityAttendancesForPeriod(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    until: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<ActivityAttendance[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const matchingEvents = await this.getEventsOnDate(from, until);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const groupedEvents = groupBy(matchingEvents, "relatesTo");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const records = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const [activityId, activityEvents] of groupedEvents) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const activityRecord = ActivityAttendance.create(from, activityEvents);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      activityRecord.periodTo = until;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (activityId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        activityRecord.activity = await this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          .load<RecurringActivity>(RecurringActivity, activityId)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          .catch(() => undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      records.push(activityRecord);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return records;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async getActivitiesForChild(childId: string): Promise<RecurringActivity[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const activities = await this.dbIndexing.queryIndexDocs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      RecurringActivity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "activities_index/by_participant",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      childId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const visitedSchools =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.childrenService.queryActiveRelationsOf(childId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const currentRelation of visitedSchools) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const activitiesThroughRelation = await this.dbIndexing.queryIndexDocs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        RecurringActivity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "activities_index/by_school",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        currentRelation.schoolId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      for (const activityThroughRelation of activitiesThroughRelation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          !activities.some((a) => a.getId() === activityThroughRelation.getId())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          activities.push(activityThroughRelation);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return activities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async createEventForActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    activity: RecurringActivity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    date: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<EventNote> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const instance = new EventNote();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    instance.date = date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    instance.subject = activity.title;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    instance.children = await this.getActiveParticipantsOfActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      activity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    instance.schools = activity.linkedGroups;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    instance.relatesTo = activity.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    instance.category = activity.type;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return instance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async getActiveParticipantsOfActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    activity: RecurringActivity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    date: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<string[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const schoolParticipants = await this.loadParticipantsOfGroups(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      activity.linkedGroups,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ...new Set(activity.participants.concat(...schoolParticipants)), //  remove duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ].filter((p) => !activity.excludedParticipants.includes(p));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Load all participants' ids for the given list of groups
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param linkedGroups
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param date on which the participants should be part of the group
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async loadParticipantsOfGroups(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    linkedGroups: string[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    date: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<string[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const childIdPromises = linkedGroups.map((groupId) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.childrenService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .queryActiveRelationsOf(groupId, date)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .then((relations) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          relations.map((r) => r.childId).filter((id) => !!id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const allParticipants = await Promise.all(childIdPromises);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // flatten and remove duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return Array.from(new Set([].concat(...allParticipants)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/AutoResolutionService.html b/documentation/injectables/AutoResolutionService.html new file mode 100644 index 0000000000..b918585f85 --- /dev/null +++ b/documentation/injectables/AutoResolutionService.html @@ -0,0 +1,455 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/features/conflict-resolution/auto-resolution/auto-resolution.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Attempt automatic conflict resolutions or identify trivial conflicts for semi-automatic resolution.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(resolutionStrategies: ConflictResolutionStrategy[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      resolutionStrategies + ConflictResolutionStrategy[] + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The (multi = true) services registered as resolution strategies (can be none --> null)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + shouldDeleteConflictingRevision + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + shouldDeleteConflictingRevision(currentDoc: any, conflictingDoc: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Checks whether any registered resolution strategy suggests that the conflicting version should be automatically deleted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This method does not delete the conflict. It only suggests whether it should be deleted automatically.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      currentDoc + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The currently active revision of the doc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      conflictingDoc + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The conflicting revision of the doc to be checked whether it can be deleted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Inject, Injectable, Optional } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  CONFLICT_RESOLUTION_STRATEGY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ConflictResolutionStrategy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "./conflict-resolution-strategy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Attempt automatic conflict resolutions or identify trivial conflicts for semi-automatic resolution.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class AutoResolutionService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param resolutionStrategies The (multi = true) services registered as resolution strategies (can be none --> null)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Optional()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Inject(CONFLICT_RESOLUTION_STRATEGY)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private resolutionStrategies: ConflictResolutionStrategy[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Checks whether any registered resolution strategy suggests that the conflicting version should be automatically deleted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This method does not delete the conflict. It only suggests whether it should be deleted automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param currentDoc The currently active revision of the doc
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param conflictingDoc The conflicting revision of the doc to be checked whether it can be deleted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  public shouldDeleteConflictingRevision(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    currentDoc: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    conflictingDoc: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const resolutionStrategy of this.resolutionStrategies || []) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        resolutionStrategy.autoDeleteConflictingRevision(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          currentDoc,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          conflictingDoc,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/BackupService.html b/documentation/injectables/BackupService.html new file mode 100644 index 0000000000..b58645c750 --- /dev/null +++ b/documentation/injectables/BackupService.html @@ -0,0 +1,554 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/admin/backup/backup.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Create and load backups of the database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(db: Database) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        db + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + clearDatabase + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + clearDatabase() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Removes all but the config of the database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Promise a promise that resolves after all remove operations are done

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + getDatabaseExport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getDatabaseExport() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Creates an array holding all elements of the database. +This method can be used to create a backup of the data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<any[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + restoreData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + restoreData(documents: any[], forceUpdate) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Fills the database with the provided JSON data. +Data should be generated by the getJsonExport function

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        documents + any[] + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        An array of documents/raw entities to be directly written to the database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        forceUpdate + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        should existing objects be overridden? Default false

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Database } from "../../database/database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Config } from "../../config/config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Create and load backups of the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class BackupService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(private db: Database) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Creates an array holding all elements of the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This method can be used to create a backup of the data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async getDatabaseExport(): Promise<any[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return await this.db.getAll();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Removes all but the config of the database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns Promise<any> a promise that resolves after all remove operations are done
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async clearDatabase(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const allDocs = await this.db.getAll();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const row of allDocs) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (row._id.startsWith(Config.ENTITY_TYPE + ":")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        // skip config in order to not break login!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      await this.db.remove(row);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Fills the database with the provided JSON data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Data should be generated by the `getJsonExport` function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param documents An array of documents/raw entities to be directly written to the database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param forceUpdate should existing objects be overridden? Default false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async restoreData(documents: any[], forceUpdate = false): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const record of documents) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // Remove _rev so CouchDB treats it as a new rather than a updated document
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      delete record._rev;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      await this.db.put(record, forceUpdate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/BooleanDatatype.html b/documentation/injectables/BooleanDatatype.html new file mode 100644 index 0000000000..23afa93b54 --- /dev/null +++ b/documentation/injectables/BooleanDatatype.html @@ -0,0 +1,966 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/boolean/boolean.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + DiscreteDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToDatabaseFormat(value: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:12 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToObjectFormat(value: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:16 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:37 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + importMapFunction(val, schemaField: EntitySchemaField, additional: literal type) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:29 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          val + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          additional + literal type + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "boolean" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:6 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "EditBoolean" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:9 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : $localize`:datatype-label:checkbox` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:7 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "DisplayCheckmark" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:10 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "DiscreteImportConfig" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:15 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DiscreteDatatype } from "../discrete/discrete.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class BooleanDatatype extends DiscreteDatatype<boolean, boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override dataType = "boolean";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override label: string = $localize`:datatype-label:checkbox`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override editComponent = "EditBoolean";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override viewComponent = "DisplayCheckmark";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override transformToDatabaseFormat(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override transformToObjectFormat(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ChildrenService.html b/documentation/injectables/ChildrenService.html new file mode 100644 index 0000000000..338f9b51d5 --- /dev/null +++ b/documentation/injectables/ChildrenService.html @@ -0,0 +1,1148 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/child-dev-project/children/children.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(entityMapper: EntityMapperService, dbIndexing: DatabaseIndexingService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dbIndexing + DatabaseIndexingService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + getChild + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + getChild(id: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            returns a child with additional school info

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            id + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            id of child

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + getChildren + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + getChildren() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            returns a list of children with additional school info

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Public + Async + getDaysSinceLastNoteOfEachEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + getDaysSinceLastNoteOfEachEntity(entityType: string, forLastNDays: number) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Query how many days ago the last note for each child was added.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Warning: Children without any notes will be missing from this map.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                For performance reasons the days since last note are set to infinity when larger then the forLastNDays parameter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityType + string + + No + + "Child" + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (Optional) entity for which days since last note are calculated. Default "Child".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            forLastNDays + number + + No + + 30 + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (Optional) cut-off boundary how many days into the past the analysis will be done.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<Map<string, number>> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A map of childIds as key and days since last note as value; +For performance reasons the days since last note are set to infinity when larger then the forLastNDays parameter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Public + Async + getNotesInTimespan + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + getNotesInTimespan(startDay: Date | Moment, endDay: Date | Moment) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Returns all notes in the timespan. +It is only checked if the notes are on the same day als start and end day. The time is not checked.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            startDay + Date | Moment + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            the first day where notes should be included

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            endDay + Date | Moment + + No + + moment() + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            the last day where notes should be included

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<Note[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + getNotesRelatedTo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + getNotesRelatedTo(entityId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Query all notes that have been linked to the given other entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityId + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ID (with prefix!) of the related record

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<Note[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + queryActiveRelationsOf + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +queryActiveRelationsOf(id: string, date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            id + string + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            date + + No + + new Date() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + queryRelations + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +queryRelations(prefix: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            prefix + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Note } from "../notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ChildSchoolRelation } from "./model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import moment, { Moment } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DatabaseIndexingService } from "../../core/entity/database-indexing/database-indexing.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { groupBy } from "../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class ChildrenService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private dbIndexing: DatabaseIndexingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.createDatabaseIndices();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private createDatabaseIndices() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.createNotesIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.createChildSchoolRelationIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * returns a list of children with additional school info
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async getChildren(): Promise<Entity[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const children = await this.entityMapper.loadType("Child");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const relations = await this.entityMapper.loadType(ChildSchoolRelation);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    groupBy(relations, "childId").forEach(([id, rels]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const child = children.find((c) => c.getId() === id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (child) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.extendChildWithSchoolInfo(child, rels);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return children;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * returns a child with additional school info
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param id id of child
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async getChild(id: string): Promise<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const child = await this.entityMapper.load("Child", id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const relations = await this.queryRelations(id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.extendChildWithSchoolInfo(child, relations);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return child;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private extendChildWithSchoolInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    child: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    relations: ChildSchoolRelation[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const active = relations.filter((r) => r.isActive);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    child["schoolId"] = active.map((r) => r.schoolId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (active.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      child["schoolClass"] = active[0]["schoolClass"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private createChildSchoolRelationIndex(): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const designDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      _id: "_design/childSchoolRelations_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        by_child_school: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            if (!doc._id.startsWith("${ChildSchoolRelation.ENTITY_TYPE}:")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            const start = new Date(doc.start || '3000-01-01').getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            emit([doc.childId, start]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            emit([doc.schoolId, start]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.dbIndexing.createIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  queryRelations(prefix: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const startkey = prefix.endsWith(":") ? [prefix + "\uffff"] : [prefix, {}];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.dbIndexing.queryIndexDocs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ChildSchoolRelation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      "childSchoolRelations_index/by_child_school",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        startkey,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        endkey: [prefix],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        descending: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  queryActiveRelationsOf(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    id: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    date = new Date(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<ChildSchoolRelation[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.queryRelations(id).then((relations) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      relations.filter((rel) => rel.isActiveAt(date)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Query all notes that have been linked to the given other entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param entityId ID (with prefix!) of the related record
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async getNotesRelatedTo(entityId: string): Promise<Note[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let legacyLinkedNotes = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.inferNoteLinkPropertyFromEntityType(entityId)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      legacyLinkedNotes = await this.dbIndexing.queryIndexDocs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        Note,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        `notes_index/by_${this.inferNoteLinkPropertyFromEntityType(entityId)}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        entityId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const explicitlyLinkedNotes = await this.dbIndexing.queryIndexDocsRange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Note,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      `notes_related_index/note_by_relatedEntities`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [entityId],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [entityId],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return [...legacyLinkedNotes, ...explicitlyLinkedNotes].filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // remove duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (element, index, array) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        array.findIndex((e) => e._id === element._id) === index,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private inferNoteLinkPropertyFromEntityType(entityId: string): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // TODO: rework this to check the entity schema and find the relevant field?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const entityType = Entity.extractTypeFromId(entityId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    switch (entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      case "Child":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return "children";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      case "School":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return "schools";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      case "User":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return "authors";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Query how many days ago the last note for each child was added.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Warning: Children without any notes will be missing from this map.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param entityType (Optional) entity for which days since last note are calculated. Default "Child".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param forLastNDays (Optional) cut-off boundary how many days into the past the analysis will be done.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @return A map of childIds as key and days since last note as value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *         For performance reasons the days since last note are set to infinity when larger then the forLastNDays parameter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  public async getDaysSinceLastNoteOfEachEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entityType = "Child",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    forLastNDays: number = 30,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<Map<string, number>> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const startDay = moment().subtract(forLastNDays, "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const notes = await this.getNotesInTimespan(startDay);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const results = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const entities = await this.entityMapper.loadType(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .filter((c) => c.isActive)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .forEach((c) => results.set(c.getId(), Number.POSITIVE_INFINITY));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const noteProperty = Note.getPropertyFor(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (const note of notes) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // TODO: filter notes to only include them if the given child is marked "present"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      for (const entityId of note[noteProperty]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const daysSinceNote = moment().diff(note.date, "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const previousValue = results.get(entityId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (previousValue > daysSinceNote) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          results.set(entityId, daysSinceNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return results;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Returns all notes in the timespan.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * It is only checked if the notes are on the same day als start and end day. The time is not checked.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param startDay the first day where notes should be included
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param endDay the last day where notes should be included
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  public async getNotesInTimespan(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    startDay: Date | Moment,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    endDay: Date | Moment = moment(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<Note[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.dbIndexing.queryIndexDocsRange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Note,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      "notes_index/note_child_by_date",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      moment(startDay).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      moment(endDay).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async createNotesIndex(): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const designDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      _id: "_design/notes_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        note_child_by_date: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            if (!doc._id.startsWith("${Note.ENTITY_TYPE}")) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            if (!Array.isArray(doc.children) || !doc.date) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            if (doc.date.length === 10) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              emit(doc.date);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              var d = new Date(doc.date || null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              emit(d.getFullYear() + "-" + String(d.getMonth()+1).padStart(2, "0") + "-" + String(d.getDate()).padStart(2, "0"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // TODO: remove these and use general note_by_relatedEntities instead --> to be decided later #1501
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // creating a by_... view for each of the following properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ["children", "schools", "authors"].forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (prop) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        (designDoc.views[`by_${prop}`] = this.createNotesByFunction(prop)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.dbIndexing.createIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const newDesignDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      _id: "_design/notes_related_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        note_by_relatedEntities: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            if (!doc._id.startsWith("${Note.ENTITY_TYPE}")) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            if (!Array.isArray(doc.relatedEntities)) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            var dString;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            if (doc.date && doc.date.length === 10) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              dString = doc.date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              var d = new Date(doc.date || null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              dString = d.getFullYear() + "-" + String(d.getMonth()+1).padStart(2, "0") + "-" + String(d.getDate()).padStart(2, "0");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            doc.relatedEntities.forEach((relatedEntity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              emit([relatedEntity, dString]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.dbIndexing.createIndex(newDesignDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private createNotesByFunction(property: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (!doc._id.startsWith("${Note.ENTITY_TYPE}")) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (!Array.isArray(doc.${property})) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        doc.${property}.forEach(val => emit(val));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ComingSoonDialogService.html b/documentation/injectables/ComingSoonDialogService.html new file mode 100644 index 0000000000..6020498254 --- /dev/null +++ b/documentation/injectables/ComingSoonDialogService.html @@ -0,0 +1,405 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/coming-soon/coming-soon-dialog.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Show a popup dialog with the ComingSoonComponent +explaining that the requested feature is not available yet and integrating with usage analytics to track requests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(dialog: MatDialog) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + open + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +open(featureId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Open dialog with the coming soon page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              featureId + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              identifier to track requests for the given feature in usage analytics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ComingSoonComponent } from "./coming-soon/coming-soon.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Show a popup dialog with the {@link ComingSoonComponent}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * explaining that the requested feature is not available yet and integrating with usage analytics to track requests.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class ComingSoonDialogService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(private dialog: MatDialog) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Open dialog with the coming soon page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param featureId identifier to track requests for the given feature in usage analytics
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  open(featureId: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.dialog.open(ComingSoonComponent, { data: { featureId: featureId } });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ConfigImportParserService.html b/documentation/injectables/ConfigImportParserService.html new file mode 100644 index 0000000000..2c8e8061a5 --- /dev/null +++ b/documentation/injectables/ConfigImportParserService.html @@ -0,0 +1,857 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/config-setup/config-import-parser.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + parseImportDefinition + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +parseImportDefinition(configRaw: ConfigFieldRaw[], entityName: string, includingDefaultConfigs: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                configRaw + ConfigFieldRaw[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityName + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                includingDefaultConfigs + boolean + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : GeneratedConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + enumsAvailable + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Map<string | ConfigurableEnumConfig> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : new Map() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + existingEnumHashmap + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Map<string | string> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : new Map() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + generatedViews + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Map<string | ViewConfig | ViewConfig> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : new Map() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + NOT_CONFIGURED_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "NOT_CONFIGURED" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityListConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  GroupConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityDetailsConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Panel,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  PanelComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../../core/entity-details/EntityDetailsConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ConfigurableEnumConfig } from "../../core/basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchemaField } from "../../core/entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ConfigFieldRaw } from "./config-field.raw";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ViewConfig } from "../../core/config/dynamic-routing/view-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { defaultJsonConfig } from "../../core/config/config-fix";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityConfig } from "../../core/entity/entity-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityConfigService } from "../../core/entity/entity-config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { generateIdFromLabel } from "../../utils/generate-id-from-label/generate-id-from-label";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ConfigImportParserService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static NOT_CONFIGURED_KEY = "NOT_CONFIGURED";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private static DEFAULT_CONFIG_KEYS = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "appConfig",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "appConfig:usage-analytics",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "navigationMenu",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // TODO what do we do with these?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "enum:interaction-type",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "enum:warning-levels",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:note",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:attendance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:attendance/add-day",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:attendance/recurring-activity",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:attendance/recurring-activity/:id",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:admin",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:admin/conflicts",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:admin/config-import",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:import",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:user",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:user/:id",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    "view:help",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  enumsAvailable: Map<string, ConfigurableEnumConfig> = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  existingEnumHashmap: Map<string, string> = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  generatedViews: Map<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ViewConfig<EntityListConfig> | ViewConfig<EntityDetailsConfig>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  > = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private reset() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.enumsAvailable.clear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.existingEnumHashmap.clear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.generatedViews.clear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // TODO: how to get the id for already existing enums in database?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  parseImportDefinition(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    configRaw: ConfigFieldRaw[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    includingDefaultConfigs: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): GeneratedConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const entity: EntityConfig = { attributes: {} };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const f of configRaw) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!f?.dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const parsedField = this.parseFieldDefinition(f, entityName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity.attributes[parsedField.id] = parsedField.schema;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const generatedConfig: GeneratedConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (includingDefaultConfigs) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.initializeDefaultValues(generatedConfig);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    generatedConfig[EntityConfigService.PREFIX_ENTITY_CONFIG + entityName] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // add enum configs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const [key, enumConfig] of this.enumsAvailable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      generatedConfig["enum:" + key] = enumConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // add generated list and details view configs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const [key, viewConfig] of this.generatedViews) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      generatedConfig["view:" + key.toLowerCase()] = viewConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return generatedConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private parseFieldDefinition(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldDef: ConfigFieldRaw,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): { id: string; schema: EntitySchemaField } {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const fieldId = fieldDef.id ?? generateIdFromLabel(fieldDef.label);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const schema: EntitySchemaField = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      dataType: fieldDef.dataType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      label: fieldDef.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      description: fieldDef.description,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      fieldDef.dataType === "single-entity-select" ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      fieldDef.dataType === "entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.dataType = "entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.additional = fieldDef.additional_type_details;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (fieldDef.dataType === "entity-array") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.dataType = "entity-array";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.additional = fieldDef.additional_type_details;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      fieldDef.dataType === "enum" ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      fieldDef.dataType === "configurable-enum"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.dataType = "configurable-enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.additional = this.generateOrMatchEnum(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        fieldDef.additional_type_details,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        fieldId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (fieldDef.dataType === "enum-multi") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.dataType = "configurable-enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.isArray = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      schema.additional = this.generateOrMatchEnum(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        fieldDef.additional_type_details,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        fieldId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.generateOrUpdateListViewConfig(fieldDef, entityType, fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.generateOrUpdateDetailsViewConfig(fieldDef, entityType, fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    deleteEmptyProperties(schema);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return { id: fieldId, schema: schema };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Parse a comma-separated list of enum values
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * and either create a new configurable-enum config or match an existing one that has the same options.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param enumValues values for enum options as imported string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param key If new enum is created, this key is used as id.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @return The id of the matched or created configurable-enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateOrMatchEnum(enumValues: string, key: string): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (typeof enumValues !== "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return ConfigImportParserService.NOT_CONFIGURED_KEY;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let values = enumValues
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .split(",")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .map((v) => v.trim())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .filter((v) => v.length > 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    values = values.filter((v, index) => values.indexOf(v) === index); // remove duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // identify existing enum with same values
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const hash = values.sort((a, b) => a.localeCompare(b)).join(",");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.existingEnumHashmap.has(hash)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return this.existingEnumHashmap.get(hash);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // create and add new enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const enumConfig: ConfigurableEnumConfig = values.map((v) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      id: v,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      label: v,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.enumsAvailable.set(key, enumConfig);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.existingEnumHashmap.set(hash, key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return key;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateOrUpdateListViewConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldDef: ConfigFieldRaw,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !fieldDef.show_in_list ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      fieldDef.show_in_list.toString().length === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const listView: EntityListConfig =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (this.generatedViews.get(entityType)?.config as EntityListConfig) ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.generateEmptyListView(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const fieldColGroup of fieldDef.show_in_list.split(",")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const columnGroup = this.generateOrFindColumnGroup(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        listView,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        fieldColGroup.trim(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      columnGroup.columns.push(fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateEmptyListView(entityType: string): EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newListView: EntityListConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      columns: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entityType: entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      title: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      columnGroups: { groups: [] },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.generatedViews.set(entityType, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      _id: entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      component: "EntityList",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      config: newListView,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return newListView;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateOrFindColumnGroup(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    listView: EntityListConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    columnGroupName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const existingColumnGroup = listView.columnGroups.groups.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (c) => c.name === columnGroupName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (existingColumnGroup) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return existingColumnGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newColumnGroup: GroupConfig = { name: columnGroupName, columns: [] };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    listView.columnGroups.groups.push(newColumnGroup);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return newColumnGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateOrUpdateDetailsViewConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldDef: ConfigFieldRaw,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !fieldDef.show_in_details ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      fieldDef.show_in_details.toString().length === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const detailsView: EntityDetailsConfig =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (this.generatedViews.get(entityType + "/:id")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ?.config as EntityDetailsConfig) ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.generateEmptyDetailsView(entityType + "/:id", entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const detailsTab of fieldDef.show_in_details.split(",")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const [tabName, fieldGroupName] = detailsTab.split(":");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const panel: PanelComponent = this.generateOrFindDetailsPanel(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        detailsView,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        tabName.trim(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      let fieldGroupIndex = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (fieldGroupName) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (!panel.config.headers) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          panel.config.headers = [null]; // initialize headers with a default for fields without header
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        fieldGroupIndex = panel.config.headers.findIndex(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          (header) => header === fieldGroupName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (fieldGroupIndex === -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          panel.config.headers.push(fieldGroupName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          fieldGroupIndex = panel.config.headers.length - 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      extendArray(panel.config.cols, fieldGroupIndex + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      panel.config.cols[fieldGroupIndex].push(fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateEmptyDetailsView(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    viewId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): EntityDetailsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newDetailsView = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entityType: entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      icon: "child",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      panels: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      title: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.generatedViews.set(viewId, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      _id: viewId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      component: "EntityDetails",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      config: newDetailsView,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return newDetailsView;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateOrFindDetailsPanel(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    detailsView: EntityDetailsConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    panelName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): PanelComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const existingPanel = detailsView.panels.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (c) => c.title === panelName && c.components[0].component === "Form",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (existingPanel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return existingPanel.components[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newPanel: Panel = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      title: panelName,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      components: [{ title: "", component: "Form", config: { cols: [[]] } }],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    detailsView.panels.push(newPanel);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return newPanel.components[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private initializeDefaultValues(generatedConfig: GeneratedConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    generatedConfig["enum:" + ConfigImportParserService.NOT_CONFIGURED_KEY] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        id: ConfigImportParserService.NOT_CONFIGURED_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        label: "NOT CONFIGURED",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const key of ConfigImportParserService.DEFAULT_CONFIG_KEYS) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      generatedConfig[key] = defaultJsonConfig[key];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export type GeneratedConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [key: string]: EntityConfig | ViewConfig | ConfigurableEnumConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Delete properties on an object which are "empty", to clean up redundant details.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +function deleteEmptyProperties(data: Object) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  for (const k of Object.keys(data)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (data[k] === null || data[k] === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      delete data[k];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Pad an array with additional empty arrays up to the given new size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * @param array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * @param newSize
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +function extendArray(array: any, newSize: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  while (newSize > array.length) array.push([]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ConfigService.html b/documentation/injectables/ConfigService.html new file mode 100644 index 0000000000..5a16d39d13 --- /dev/null +++ b/documentation/injectables/ConfigService.html @@ -0,0 +1,1106 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/config/config.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Access dynamic app configuration retrieved from the database +that defines how the interface and data models should look.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + LatestEntityLoader +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + exportConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + exportConfig() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + getAllConfigs + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getAllConfigs(prefix: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  prefix + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + getConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getConfig(id: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  id + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : T | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + saveConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + saveConfig(config: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  config + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + loadOnce + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + loadOnce() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Do an initial load of the entity to be available through the entityUpdated property +(without watching for continuous updates).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<T | undefined> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + startLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + startLoading() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Initialize the loader to make the entity available and emit continuous updates +through the entityUpdated property

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + configUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : this.entityUpdated.pipe(shareReplay(1)) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + entityUpdated + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : new Subject<T>() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  subscribe to this and execute any actions required when the entity changes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Config } from "./config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { LatestEntityLoader } from "../entity/latest-entity-loader";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { shareReplay } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  PLACEHOLDERS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FieldGroup } from "../entity-details/form/field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MenuItem } from "../ui/navigation/menu-item";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DefaultValueConfig } from "../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityDatatype } from "../basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { migrateAddMissingEntityAttributes } from "./migrate-add-entity-attributes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { LoaderMethod } from "../entity/entity-special-loader/entity-special-loader.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Access dynamic app configuration retrieved from the database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * that defines how the interface and data models should look.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class ConfigService extends LatestEntityLoader<Config> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Subscribe to receive the current config and get notified whenever the config is updated.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private currentConfig: Config;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  configUpdates = this.entityUpdated.pipe(shareReplay(1));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(entityMapper: EntityMapperService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super(Config, Config.CONFIG_KEY, entityMapper);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super.startLoading();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.entityUpdated.subscribe(async (config) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.currentConfig = this.applyMigrations(config);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public saveConfig(config: any): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.entityMapper.save(new Config(Config.CONFIG_KEY, config), true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public exportConfig(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return JSON.stringify(this.currentConfig.data);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public getConfig<T>(id: string): T | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.currentConfig.data[id];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public getAllConfigs<T>(prefix: string): T[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const matchingConfigs = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const id of Object.keys(this.currentConfig.data)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (id.startsWith(prefix)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.currentConfig.data[id]._id = id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        matchingConfigs.push(this.currentConfig.data[id]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return matchingConfigs;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private applyMigrations(config: Config): Config {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const migrations: ConfigMigration[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateEntityAttributesWithId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateFormHeadersIntoFieldGroups,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateFormFieldConfigView2ViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateMenuItemConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateEntityDetailsInputEntityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateEntityArrayDatatype,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateEntitySchemaDefaultValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateChildrenListConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      migrateHistoricalDataComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // TODO: execute this on server via ndb-admin
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    config = migrateAddMissingEntityAttributes(config);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const newConfig = JSON.parse(JSON.stringify(config), (_that, rawValue) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      let configPart = rawValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      for (const migration of migrations) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        configPart = migration(_that, configPart);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return newConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * A ConfigMigration is checked during a full JSON.parse using a reviver function.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * If the migration does not apply to the given configPart, make sure to return it unchanged.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Multiple migrations are chained and can transform the same config part one after the other.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +type ConfigMigration = (key: string, configPart: any) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Transform legacy "entity:" config format into the flattened structure containing id directly.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateEntityAttributesWithId: ConfigMigration = (key, configPart) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (!(key.startsWith("entity") && Array.isArray(configPart.attributes))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  configPart.attributes = configPart.attributes.reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    (acc, attr: { name: string; schema: EntitySchemaField }) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ...acc,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      [attr.name]: attr.schema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // id inside the field schema config (FieldConfig) is added by EntityConfigService and does not need migration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Transform legacy "view:...Form" config format to have form field group headers with the fields rather than as separate array.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateFormHeadersIntoFieldGroups: ConfigMigration = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  configPart,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (!(configPart?.component === "Form" && configPart?.config?.cols)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  const formConfig = configPart.config;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  // change .cols and .headers into .fieldGroups
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  const newFormConfig = { ...formConfig };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  delete newFormConfig.cols;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  delete newFormConfig.headers;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  newFormConfig.fieldGroups = formConfig.cols?.map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    (colGroup) => ({ fields: colGroup }) as FieldGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (formConfig.headers) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    newFormConfig.fieldGroups.forEach((group, i) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (formConfig.headers[i]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        group.header = formConfig.headers[i];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  configPart.config = newFormConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateFormFieldConfigView2ViewComponent: ConfigMigration = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  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;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateMenuItemConfig: ConfigMigration = (key, configPart) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (key !== "navigationMenu") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  const oldItems: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    | {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        icon: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        link: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    | MenuItem
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  )[] = configPart.items;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  configPart.items = oldItems.map((item) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (item.hasOwnProperty("name")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        label: item["name"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        icon: item.icon,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        link: item.link,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return item;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  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.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * @param key
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * @param configPart
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateEntityDetailsInputEntityType: ConfigMigration = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  configPart,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (key !== "config") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (configPart["entity"]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    configPart["entityType"] = configPart["entity"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    delete configPart["entity"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  return configPart;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Replace custom "entity-array" dataType with dataType="array", innerDatatype="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * @param key
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * @param configPart
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateEntityArrayDatatype: ConfigMigration = (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;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateEntitySchemaDefaultValue: ConfigMigration = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  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;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateChildrenListConfig: ConfigMigration = (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;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +const migrateHistoricalDataComponent: ConfigMigration = (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;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ConfigurableEnumDatatype.html b/documentation/injectables/ConfigurableEnumDatatype.html new file mode 100644 index 0000000000..5941c79c71 --- /dev/null +++ b/documentation/injectables/ConfigurableEnumDatatype.html @@ -0,0 +1,1100 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/basic-datatypes/configurable-enum/configurable-enum-datatype/configurable-enum.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + DiscreteDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(enumService: ConfigurableEnumService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    enumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + transformToDatabaseFormat(value: ConfigurableEnumValue) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:26 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    transforms Objects of InteractionType to strings to save in DB

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + ConfigurableEnumValue + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Object to be saved as specified in config file; e.g. {id: 'CALL', label:'Phone Call', color:'#FFFFFF'}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + transformToObjectFormat(value: string, schemaField: EntitySchemaField) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:35 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    transforms saved strings from the DB to Objects of InteractionType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    string from database as specified in config file; e.g. 'PHONE_CALL'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : ConfigurableEnumValue + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:37 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + importMapFunction(val, schemaField: EntitySchemaField, additional: literal type) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:29 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    val + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    additional + literal type + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "configurable-enum" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:12 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + + Readonly + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "EditConfigurableEnum" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:16 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : $localize`:datatype-label:dropdown option` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:13 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + + Readonly + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "DisplayConfigurableEnum" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:15 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "DiscreteImportConfig" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Defined in DefaultDatatype:15 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { ConfigurableEnumValue } from "../configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntitySchemaField } from "../../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfigurableEnumService } from "../configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DiscreteDatatype } from "../../discrete/discrete.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class ConfigurableEnumDatatype extends DiscreteDatatype<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ConfigurableEnumValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static override dataType = "configurable-enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static override label: string = $localize`:datatype-label:dropdown option`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  public override readonly viewComponent = "DisplayConfigurableEnum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  public override readonly editComponent = "EditConfigurableEnum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(private enumService: ConfigurableEnumService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * transforms Objects of InteractionType to strings to save in DB
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param value Object to be saved as specified in config file; e.g. `{id: 'CALL', label:'Phone Call', color:'#FFFFFF'}`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  public transformToDatabaseFormat(value: ConfigurableEnumValue): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return value?.id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * transforms saved strings from the DB to Objects of InteractionType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param value string from database as specified in config file; e.g. 'PHONE_CALL'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param schemaField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  public transformToObjectFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): ConfigurableEnumValue {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (value === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let enumId = schemaField.additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let enumOption = this.enumService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .getEnumValues(enumId)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ?.find((option) => option.id === value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!enumOption) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      enumOption = this.generateOptionForInvalid(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return enumOption;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Build a dummy option so that invalid values are not lost on the next save and users can manually correct issues.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param optionValue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private generateOptionForInvalid(optionValue: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      id: optionValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      isInvalidOption: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      label:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:enum option label prefix for invalid id dummy:[invalid option]` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        optionValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ConfigurableEnumService.html b/documentation/injectables/ConfigurableEnumService.html new file mode 100644 index 0000000000..739c32b5d4 --- /dev/null +++ b/documentation/injectables/ConfigurableEnumService.html @@ -0,0 +1,596 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/configurable-enum/configurable-enum.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(entityMapper: EntityMapperService, ability: EntityAbility) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + getEnum + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +getEnum(id: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      id + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + getEnumValues + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +getEnumValues(id: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      id + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + listEnums + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +listEnums() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + preLoadEnums + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + preLoadEnums() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnum } from "./configurable-enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumValue } from "./configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityAbility } from "../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class ConfigurableEnumService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private enums = new Map<string, ConfigurableEnum>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .receiveUpdates(ConfigurableEnum)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .subscribe(({ entity }) => this.cacheEnum(entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async preLoadEnums() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const allEnums = await this.entityMapper.loadType(ConfigurableEnum);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    allEnums.forEach((entity) => this.cacheEnum(entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private cacheEnum(entity: ConfigurableEnum) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.enums.set(entity.getId(), entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  getEnumValues<T extends ConfigurableEnumValue = ConfigurableEnumValue>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    id: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): T[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const configurableEnum = this.getEnum(id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return configurableEnum ? (configurableEnum.values as T[]) : [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  getEnum(id: string): ConfigurableEnum | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.enums) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const entityId = Entity.createPrefixedId(ConfigurableEnum.ENTITY_TYPE, id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      !this.enums.has(entityId) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.ability.can("create", ConfigurableEnum)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const newEnum = new ConfigurableEnum(id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.cacheEnum(newEnum);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.enums.get(entityId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  listEnums() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return Array.from(this.enums.keys());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ConfirmationDialogService.html b/documentation/injectables/ConfirmationDialogService.html new file mode 100644 index 0000000000..241e04380b --- /dev/null +++ b/documentation/injectables/ConfirmationDialogService.html @@ -0,0 +1,656 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/common-components/confirmation-dialog/confirmation-dialog.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inject this service instead of MatDialog if you need a simple, configurable confirmation dialog box +to be displayed to the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Import the ConfirmationDialogModule in your root module to provide this service.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        this.confirmationDialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.getConfirmation('Delete?', 'Are you sure you want to delete this record?')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +.then((confirmed) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +if (confirmed) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +// delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(dialog: MatDialog, ngZone: NgZone) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ngZone + NgZone + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + getConfirmation + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +getConfirmation(title: string, text: string, buttons: ConfirmationDialogButton[], closeButton) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Open a dialog with the given configuration. +arbitrary

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        title + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The title displayed for the dialog

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        text + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The text displayed for the dialog

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        buttons + ConfirmationDialogButton[] + + No + + YesNoButtons + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The buttons to show. Defaults to 'yes' and 'no', but can be +arbitrary

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        closeButton + + No + + true + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Whether a single icon-button with an 'x' is shown to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        promise that resolves to true if the user confirmed and false otherwise`

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + getDiscardConfirmation + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +getDiscardConfirmation() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + showProgressDialog + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +showProgressDialog(message: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Show an (indeterminate) progress bar modal that cannot be closed by the user. +Use the returned dialogRef to close the dialog once your processing is completed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        message + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable, NgZone } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ConfirmationDialogButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ConfirmationDialogComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  YesNoButtons,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "./confirmation-dialog/confirmation-dialog.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { firstValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ProgressDialogComponent } from "./progress-dialog/progress-dialog.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Inject this service instead of MatDialog if you need a simple, configurable confirmation dialog box
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * to be displayed to the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Import the {@link ConfirmationDialogModule} in your root module to provide this service.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + this.confirmationDialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + .getConfirmation('Delete?', 'Are you sure you want to delete this record?')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + .then((confirmed) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (confirmed) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       // delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ConfirmationDialogService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private ngZone: NgZone,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Open a dialog with the given configuration.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param title The title displayed for the dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param text The text displayed for the dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param buttons The buttons to show. Defaults to 'yes' and 'no', but can be
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * arbitrary
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param closeButton Whether a single icon-button with an 'x' is shown to the user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns promise that resolves to true if the user confirmed and false otherwise`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    title: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    buttons: ConfirmationDialogButton[] = YesNoButtons,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    closeButton = true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const dialogRef = this.ngZone.run(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this.dialog.open(ConfirmationDialogComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          title: title,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          text: text,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          buttons: buttons,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          closeButton: closeButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return firstValueFrom(dialogRef.afterClosed());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getDiscardConfirmation() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      $localize`:Discard changes header:Discard Changes?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      $localize`:Discard changes message:You have unsaved changes. Do you really want to leave this page? All unsaved changes will be lost.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Show an (indeterminate) progress bar modal that cannot be closed by the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Use the returned dialogRef to close the dialog once your processing is completed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  showProgressDialog(message: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.dialog.open(ProgressDialogComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data: { message },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      minWidth: "50vh",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      disableClose: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/CouchdbFileService.html b/documentation/injectables/CouchdbFileService.html new file mode 100644 index 0000000000..f9ed2a9f2e --- /dev/null +++ b/documentation/injectables/CouchdbFileService.html @@ -0,0 +1,1104 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/file/couchdb-file.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Stores the files in the CouchDB. +See https://docs.couchdb.org/en/3.2.2-docs/intro/api.html?highlight=attachments#attachments +Running upload and download processes are shown with progress bars.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + FileService +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(sanitizer: DomSanitizer, http: HttpClient, dialog: MatDialog, snackbar: MatSnackBar, syncService: SyncService, entityMapper: EntityMapperService, entities: EntityRegistry, syncState: SyncStateSubject, navigator: Navigator) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sanitizer + DomSanitizer + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          http + HttpClient + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          snackbar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          syncService + SyncService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          syncState + SyncStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          navigator + Navigator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + loadFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +loadFile(entity: Entity, property: string, throwErrors: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in FileService:185 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entity + Entity + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property + string + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          throwErrors + boolean + + No + + false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Observable<SafeUrl> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + removeAllFiles + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +removeAllFiles(entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in FileService:148 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + removeFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +removeFile(entity: Entity, property: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in FileService:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + showFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +showFile(entity: Entity, property: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in FileService:163 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + uploadFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +uploadFile(file: File, entity: Entity, property: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in FileService:64 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          file + File + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  HttpEvent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  HttpEventType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  HttpProgressEvent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  HttpResponse,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  HttpStatusCode,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  catchError,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  concatMap,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  filter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  last,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  map,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  shareReplay,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  tap,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { from, Observable, of, throwError } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ShowFileComponent } from "./show-file/show-file.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FileService } from "./file.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ProgressComponent } from "./progress/progress.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Logging } from "../../core/logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ObservableQueue } from "./observable-queue/observable-queue";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SyncStateSubject } from "../../core/session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SyncService } from "../../core/database/sync.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SyncState } from "../../core/session/session-states/sync-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { NAVIGATOR_TOKEN } from "../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { NotAvailableOfflineError } from "../../core/session/not-available-offline.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Stores the files in the CouchDB.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * See {@link https://docs.couchdb.org/en/3.2.2-docs/intro/api.html?highlight=attachments#attachments}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Running upload and download processes are shown with progress bars.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class CouchdbFileService extends FileService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private attachmentsUrl = `${environment.DB_PROXY_PREFIX}/${environment.DB_NAME}-attachments`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  // TODO it seems like failed requests are executed again when a new one is done
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private requestQueue = new ObservableQueue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private cache: { [key: string]: Observable<string> } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private sanitizer: DomSanitizer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private http: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private snackbar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private syncService: SyncService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    syncState: SyncStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    @Inject(NAVIGATOR_TOKEN) private navigator: Navigator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super(entityMapper, entities, syncState);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  uploadFile(file: File, entity: Entity, property: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this.navigator.onLine) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return throwError(() => new NotAvailableOfflineError("File Attachments"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const obs = this.requestQueue.add(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.runFileUpload(file, entity, property),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.reportProgress($localize`Uploading "${file.name}"`, obs);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.cache[`${entity.getId()}/${property}`] = obs.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      last(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      map(() => URL.createObjectURL(file)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      shareReplay(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return obs;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private runFileUpload(file: File, entity: Entity, property: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const attachmentPath = `${this.attachmentsUrl}/${entity.getId()}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.ensureDocIsSynced().pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      concatMap(() => this.getAttachmentsDocument(attachmentPath)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      concatMap(({ _rev }) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.http.put(`${attachmentPath}/${property}?rev=${_rev}`, file, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          headers: { "ngsw-bypass": "" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          reportProgress: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          observe: "events",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // prevent http request to be executed multiple times (whenever .subscribe is called)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      shareReplay(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * For permission checks to work correctly, the Entity must be available server-side already.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Manually send this doc to the DB here because sync is only happening at slower intervals.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private ensureDocIsSynced(): Observable<SyncState> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return from(this.syncService.sync()).pipe(map(() => this.syncState.value));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getAttachmentsDocument(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attachmentPath: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Observable<{ _rev: string }> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http.get<{ _id: string; _rev: string }>(attachmentPath).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      catchError((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (err.status === HttpStatusCode.NotFound) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            .put<{ rev: string }>(attachmentPath, {})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            .pipe(map((res) => ({ _rev: res.rev })));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  removeFile(entity: Entity, property: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this.navigator.onLine) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return throwError(() => new NotAvailableOfflineError("File Attachments"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.requestQueue.add(this.runFileRemoval(entity, property));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private runFileRemoval(entity: Entity, property: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const path = `${entity.getId()}/${property}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .get<{ _rev: string }>(`${this.attachmentsUrl}/${entity.getId()}`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        concatMap(({ _rev }) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.http.delete(`${this.attachmentsUrl}/${path}?rev=${_rev}`),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        tap(() => delete this.cache[path]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        catchError((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          if (err.status === HttpStatusCode.NotFound) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            return of({ ok: true });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  removeAllFiles(entity: Entity): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.requestQueue.add(this.runAllFilesRemoval(entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private runAllFilesRemoval(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const attachmentPath = `${this.attachmentsUrl}/${entity.getId()}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .get<{ _rev: string }>(attachmentPath)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        concatMap(({ _rev }) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.http.delete(`${attachmentPath}?rev=${_rev}`),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  showFile(entity: Entity, property: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const obs = this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .get(`${this.attachmentsUrl}/${entity.getId()}/${property}`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        responseType: "blob",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        reportProgress: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        observe: "events",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        headers: { "ngsw-bypass": "" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(shareReplay());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.reportProgress($localize`Loading "${entity[property]}"`, obs);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    obs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(filter((e) => e.type === HttpEventType.Response))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .subscribe((e: HttpResponse<Blob>) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const fileURL = URL.createObjectURL(e.body);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const win = window.open(fileURL, "_blank");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (!win || win.closed || typeof win.closed == "undefined") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          // When it takes more than a few (2-5) seconds to open the file, the browser might block the popup
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.dialog.open(ShowFileComponent, { data: fileURL });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  loadFile(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    property: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    throwErrors: boolean = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Observable<SafeUrl> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const path = `${entity.getId()}/${property}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this.cache[path]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.cache[path] = this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .get(`${this.attachmentsUrl}/${path}`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          responseType: "blob",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          map((blob) => URL.createObjectURL(blob)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          catchError((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            Logging.warn("Could not load file", entity?.getId(), property, err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            if (throwErrors) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              return of("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          shareReplay(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.cache[path].pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      map((url) => this.sanitizer.bypassSecurityTrustUrl(url)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private reportProgress(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    obs: Observable<HttpEvent<any> | any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const progress = obs.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (e) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          e.type === HttpEventType.DownloadProgress ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          e.type === HttpEventType.UploadProgress,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      map((e: HttpProgressEvent) => Math.round(100 * (e.loaded / e.total))),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const ref = this.snackbar.openFromComponent(ProgressComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      data: { message, progress },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    progress.subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      complete: () => ref.dismiss(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      error: () => ref.dismiss(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/CurrentUserSubject.html b/documentation/injectables/CurrentUserSubject.html new file mode 100644 index 0000000000..24e0abb2ab --- /dev/null +++ b/documentation/injectables/CurrentUserSubject.html @@ -0,0 +1,267 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/session/current-user-subject.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The Entity linked to the currently logged-in user, which can be used to pre-fill forms or customize workflows. +This might be undefined even when logged in. E.g. when using an administrative support account.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + BehaviorSubject +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * The Entity linked to the currently logged-in user, which can be used to pre-fill forms or customize workflows.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This might be undefined even when logged in. E.g. when using an administrative support account.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class CurrentUserSubject extends BehaviorSubject<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    super(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DataAggregationService.html b/documentation/injectables/DataAggregationService.html new file mode 100644 index 0000000000..f8b6a9acf8 --- /dev/null +++ b/documentation/injectables/DataAggregationService.html @@ -0,0 +1,535 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/reporting/data-aggregation.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(queryService: QueryService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              queryService + QueryService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Public + Async + calculateReport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + calculateReport(aggregations: Aggregation[], from?: Date, to?: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              aggregations + Aggregation[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              from + Date + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              to + Date + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<ReportRow[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { QueryService } from "../../core/export/query.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { GroupByDescription, ReportRow } from "./report-row";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { groupBy } from "../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface Aggregation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  query: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  groupBy?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  aggregations?: Aggregation[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DataAggregationService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private fromDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private toDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(private queryService: QueryService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  public async calculateReport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    aggregations: Aggregation[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    from?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    to?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): Promise<ReportRow[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.fromDate = from;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.toDate = to;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const fullQuery = aggregations.map((a) => this.concatQueries(a)).join("|");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    await this.queryService.cacheRequiredData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fullQuery,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.fromDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.toDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.calculateAggregations(aggregations);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private concatQueries(config: Aggregation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return (config.aggregations ?? []).reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (query, c) => query + this.concatQueries(c),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      config.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private calculateAggregations(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    aggregations: Aggregation[] = [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    data?: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    additionalValues: GroupByDescription[] = [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): ReportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const resultRows: ReportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let currentSubRows = resultRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const aggregation of aggregations) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const queryResult = this.queryService.queryData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        aggregation.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.fromDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.toDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (aggregation.label) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const newRow = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          header: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: aggregation.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            groupedBy: additionalValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            result: queryResult?.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          subRows: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        resultRows.push(newRow);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        currentSubRows = newRow.subRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (aggregation.aggregations) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        currentSubRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ...this.calculateAggregations(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            aggregation.aggregations,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            queryResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            additionalValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (aggregation.groupBy) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        currentSubRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ...this.calculateGroupBy(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            aggregation.groupBy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            aggregation.aggregations,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            aggregation.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            queryResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            additionalValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return resultRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private calculateGroupBy(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    properties: string[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    aggregations: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    label: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    data: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    additionalValues: GroupByDescription[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): ReportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const resultRows: ReportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (let i = properties.length; i > 0; i--) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const currentProperty = properties[i - 1];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const remainingProperties = properties.slice(i);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const groupingResults = groupBy(data, currentProperty);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      for (const [group, entries] of groupingResults) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const groupingValues = additionalValues.concat({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          property: currentProperty,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          value: group,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const newRow: ReportRow = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          header: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            groupedBy: groupingValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            result: entries.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          subRows: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        newRow.subRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ...this.calculateAggregations(aggregations, entries, groupingValues),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        newRow.subRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ...this.calculateGroupBy(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            remainingProperties,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            aggregations,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            entries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            groupingValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        resultRows.push(newRow);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return resultRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DataTransformationService.html b/documentation/injectables/DataTransformationService.html new file mode 100644 index 0000000000..a847649e5c --- /dev/null +++ b/documentation/injectables/DataTransformationService.html @@ -0,0 +1,775 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/export/data-transformation-service/data-transformation.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Prepare data for export or analysis

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(queryService: QueryService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                queryService + QueryService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + queryAndTransformData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + queryAndTransformData(config: ExportColumnConfig[], from?: Date, to?: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                config + ExportColumnConfig[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                from + Date + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                to + Date + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<ExportRow[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Async + transformData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + transformData(data: any[], config: ExportColumnConfig[], from?: Date, to?: Date, groupByProperty?: literal type) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Creates a dataset with the provided values that can be used for a simple table or export.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                data + any[] + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                an array of elements. If not provided, the first query in config will be used to get the data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                config + ExportColumnConfig[] + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) config specifying how export should look

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                from + Date + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) limits the data which is fetched from the database and is also available inside the query. If not provided, all data is fetched.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                to + Date + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) same as from.If not provided, today is used.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                groupByProperty + literal type + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (optional) groups the data using the value at the given property and adds a column to the final table.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<ExportRow[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                array with the result of the queries and sub queries

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  getReadableValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  transformToReadableFormat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../../common-components/entities-table/value-accessor/value-accessor";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ExportColumnConfig } from "./export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { QueryService } from "../query.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { groupBy } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Prepare data for export or analysis
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class DataTransformationService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(private queryService: QueryService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async queryAndTransformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    from?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    to?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<ExportRow[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const combinedResults: ExportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const totalRow: ExportRow = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const c of config) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      await this.queryService.cacheRequiredData(c.query, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const baseData = this.queryService.queryData(c.query, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const result: ExportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (c.subQueries) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        result.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          ...(await this.transformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            baseData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            c.subQueries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            c.groupBy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          )),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        totalRow[c.label] = baseData;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      combinedResults.push(...result);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return Object.keys(totalRow).length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ? [totalRow, ...combinedResults]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      : combinedResults;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private concatQueries(config: ExportColumnConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (config.subQueries ?? []).reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (query, c) => query + this.concatQueries(c),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      config.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Creates a dataset with the provided values that can be used for a simple table or export.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param data an array of elements. If not provided, the first query in `config` will be used to get the data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param config (Optional) config specifying how export should look
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param from (Optional) limits the data which is fetched from the database and is also available inside the query. If not provided, all data is fetched.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param to (Optional) same as from.If not provided, today is used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param groupByProperty (optional) groups the data using the value at the given property and adds a column to the final table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @returns array with the result of the queries and sub queries
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async transformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    data: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    from?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    to?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    groupByProperty?: { label: string; property: string },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<ExportRow[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const fullQuery = config.map((c) => this.concatQueries(c)).join("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.queryService.cacheRequiredData(fullQuery, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.generateRows(data, config, from, to, groupByProperty).map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      transformToReadableFormat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    data: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    groupByProperty?: { label: string; property: string },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const result: ExportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (groupByProperty) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const groups = groupBy(data, groupByProperty.property);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      for (const [group, values] of groups) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const groupColumn: ExportColumnConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          label: groupByProperty.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          query: `:setString(${getReadableValue(group)})`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const rows = this.generateColumnsForRow(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          values,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          [groupColumn].concat(...config),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        result.push(...rows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      for (const dataRow of data) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const rows = this.generateColumnsForRow(dataRow, config, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        result.push(...rows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Generate one or more export row objects from the given data data and config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param data A data to be exported as one or more export row objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @returns array of one or more export row objects (as simple {key: value})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateColumnsForRow(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    data: any | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): ExportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let exportRows: ExportRow[] = [{}];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const exportColumnConfig of config) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const partialExportObjects = this.buildValueRecursively(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        exportColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      exportRows = this.mergePartialExportRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        exportRows,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        partialExportObjects,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return exportRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Generate one or more (partial) export row objects from a single property of the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param data one single data item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param exportColumnConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private buildValueRecursively(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    data: any | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    exportColumnConfig: ExportColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): ExportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const label =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      exportColumnConfig.label ?? exportColumnConfig.query.replace(".", "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const value = this.getValueForQuery(exportColumnConfig, data, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!exportColumnConfig.subQueries) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return [{ [label]: value }];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else if (value.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return this.generateColumnsForRow(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        exportColumnConfig.subQueries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return this.generateRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        exportColumnConfig.subQueries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        exportColumnConfig.groupBy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private getValueForQuery(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    exportColumnConfig: ExportColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    data: any | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const value = this.queryService.queryData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      exportColumnConfig.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      Array.isArray(data) ? data : [data],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!Array.isArray(value)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else if (!exportColumnConfig.subQueries && value.length === 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return value[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return value.filter((val) => val !== undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Combine two arrays of export row objects.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Every additional row is merged with every row of the first array (combining properties),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * resulting in n*m export rows.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param exportRows
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param additionalExportRows
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private mergePartialExportRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    exportRows: ExportRow[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    additionalExportRows: ExportRow[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): ExportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const rowsOfRows: ExportRow[][] = additionalExportRows.map((addRow) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      exportRows.map((row) => Object.assign({}, row, addRow)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // return flattened array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return rowsOfRows.reduce((acc, rowOfRows) => acc.concat(rowOfRows), []);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +interface ExportRow {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [key: string]: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DatabaseIndexingService.html b/documentation/injectables/DatabaseIndexingService.html new file mode 100644 index 0000000000..df88d6c766 --- /dev/null +++ b/documentation/injectables/DatabaseIndexingService.html @@ -0,0 +1,1290 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity/database-indexing/database-indexing.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Manage database query index creation and use, working as a facade in front of the Database service. +This allows to track pending indexing processes and also show them to users in the UI.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Accessors
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(db: Database, entitySchemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  db + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entitySchemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + createIndex + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + createIndex(designDoc: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Register a new database query to be created/updated and indexed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This also triggers updates to the observable indicesRegistered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  designDoc + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The design document (see

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + generateIndexOnProperty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +generateIndexOnProperty(indexId: string, entity: EntityConstructor<E>, referenceProperty: REF, secondaryIndex?: SEC) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • REF
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • SEC
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Generate and save a new database query index for the given entity type and property.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This allows you to efficiently query documents of that entity type based on values of the reference property, +e.g. query all Notes (entityType=Note) that are related to a certain user (referenceProperty="authors").

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Query this index using the given indexId like this: +generateIndexOnProperty("myIndex", Note, "category"); +queryIndexDocs(Note, "myIndex/by_category")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  indexId + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  id to query this index after creation (--> {indexId}/by_{referenceProperty})

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entity + EntityConstructor<E> + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entity type to limit the documents included in this index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  referenceProperty + REF + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property key on the documents whose value is indexed as a query key

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  secondaryIndex + SEC + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (optional) additional property to emit as a secondary index to narrow queries further

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + queryIndexDocs + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + queryIndexDocs(entityConstructor: EntityConstructor<T>, indexName: string, options: QueryOptions | string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Load data from the Database through the given, previously created index.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entityConstructor + EntityConstructor<T> + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  indexName + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The name of the previously created index to be queried.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  options + QueryOptions | string + + No + + {} + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Optional) additional query options object or a simple value used as the exact key to retrieve

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<T[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + queryIndexDocsRange + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + queryIndexDocsRange(entityConstructor: EntityConstructor<T>, indexName: string, startkey: string | any[], endkey?: string | any[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Load data from the Database through the given, previously created index for a key range.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entityConstructor + EntityConstructor<T> + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  indexName + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The name of the previously created index to be queried.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  startkey + string | any[] + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  start id of range to query

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  endkey + string | any[] + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  end id of range to query (inclusive)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<T[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + queryIndexRaw + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + queryIndexRaw(indexName: string, options: QueryOptions, doNotWaitForIndexCreation?: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Run a query on the database. +If the required index does not exist (yet) this blocks the request by default +and only runs and returns once the index is available.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     If no index exists this may result in an error (e.g. 404)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  indexName + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  key of the database index to be used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  options + QueryOptions + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  additional options for the request

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  doNotWaitForIndexCreation + boolean + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Optional) flag to not block the query if the index doesn't exist yet. +If no index exists this may result in an error (e.g. 404)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + queryIndexStats + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +queryIndexStats(indexName: string, options: QueryOptions) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  indexName + string + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  options + QueryOptions + + No + + { + reduce: true, + group: true, + } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Accessors +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + indicesRegistered +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + getindicesRegistered() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  All currently registered indices with their status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Database, QueryOptions } from "../../database/database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { BehaviorSubject, firstValueFrom, Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { BackgroundProcessState } from "../../ui/sync-status/background-process-state.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity, EntityConstructor } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntitySchemaService } from "../schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { first } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Manage database query index creation and use, working as a facade in front of the Database service.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This allows to track pending indexing processes and also show them to users in the UI.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class DatabaseIndexingService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private _indicesRegistered = new BehaviorSubject<BackgroundProcessState[]>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** All currently registered indices with their status */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  get indicesRegistered(): Observable<BackgroundProcessState[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this._indicesRegistered.asObservable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private db: Database,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private entitySchemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Register a new database query to be created/updated and indexed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This also triggers updates to the observable `indicesRegistered`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param designDoc The design document (see @link{Database}) describing the query/index.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async createIndex(designDoc: any): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const indexDetails = designDoc._id.replace(/_design\//, "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const indexState: BackgroundProcessState = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      title: $localize`Preparing data (Indexing)`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      details: indexDetails,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      pending: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const indexCreationPromise = this.db.saveDatabaseIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this._indicesRegistered.next([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ...this._indicesRegistered.value.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (state) => state.details !== indexDetails,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      indexState,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      await indexCreationPromise;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      indexState.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      indexState.error = err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this._indicesRegistered.next(this._indicesRegistered.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    indexState.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this._indicesRegistered.next(this._indicesRegistered.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Generate and save a new database query index for the given entity type and property.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This allows you to efficiently query documents of that entity type based on values of the reference property,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * e.g. query all Notes (entityType=Note) that are related to a certain user (referenceProperty="authors").
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Query this index using the given indexId like this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * generateIndexOnProperty("myIndex", Note, "category");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * queryIndexDocs(Note, "myIndex/by_category")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param indexId id to query this index after creation (--> {indexId}/by_{referenceProperty})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param entity entity type to limit the documents included in this index
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param referenceProperty property key on the documents whose value is indexed as a query key
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param secondaryIndex (optional) additional property to emit as a secondary index to narrow queries further
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  generateIndexOnProperty<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    E extends Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    REF extends keyof E & string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    SEC extends keyof E & string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  >(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    indexId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entity: EntityConstructor<E>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    referenceProperty: REF,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    secondaryIndex?: SEC,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const emitParamFormatter = (primaryParam) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (secondaryIndex) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return `emit([${primaryParam}, doc.${secondaryIndex}]);`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return `emit(${primaryParam});`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const simpleEmit = emitParamFormatter("doc." + referenceProperty);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const arrayEmit = `
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (!Array.isArray(doc.${referenceProperty})) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      doc.${referenceProperty}.forEach((relatedEntity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ${emitParamFormatter("relatedEntity")}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const designDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      _id: "_design/" + indexId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        [`by_${referenceProperty}`]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            if (!doc._id.startsWith("${entity.ENTITY_TYPE}")) return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            ${
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +              entity.schema.get(referenceProperty).isArray
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                ? arrayEmit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +                : simpleEmit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.createIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Load data from the Database through the given, previously created index.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param entityConstructor
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param indexName The name of the previously created index to be queried.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param options (Optional) additional query options object or a simple value used as the exact key to retrieve
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async queryIndexDocs<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entityConstructor: EntityConstructor<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    indexName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    options: QueryOptions | string = {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): Promise<T[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (typeof options === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      options = { key: options };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    options.include_docs = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const rawResults = await this.queryIndexRaw(indexName, options);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return rawResults.rows.map((loadedRecord) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const entity = new entityConstructor("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entitySchemaService.loadDataIntoEntity(entity, loadedRecord.doc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Load data from the Database through the given, previously created index for a key range.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param entityConstructor
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param indexName The name of the previously created index to be queried.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param startkey start id of range to query
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param endkey end id of range to query (inclusive)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async queryIndexDocsRange<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entityConstructor: EntityConstructor<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    indexName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    startkey: string | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    endkey?: string | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): Promise<T[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (Array.isArray(endkey)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      endkey = [...endkey, {}];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      endkey = endkey + "\ufff0";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.queryIndexDocs(entityConstructor, indexName, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      startkey: startkey,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      endkey: endkey,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  queryIndexStats(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    indexName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    options: QueryOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      reduce: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      group: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.queryIndexRaw(indexName, options);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Run a query on the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If the required index does not exist (yet) this blocks the request by default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * and only runs and returns once the index is available.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param indexName key of the database index to be used
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param options additional options for the request
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param doNotWaitForIndexCreation (Optional) flag to *not* block the query if the index doesn't exist yet.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *        If no index exists this may result in an error (e.g. 404)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async queryIndexRaw(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    indexName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    options: QueryOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    doNotWaitForIndexCreation?: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!doNotWaitForIndexCreation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      await this.waitForIndexAvailable(indexName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.db.query(indexName, options);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If the index is not created yet, wait until it is ready to avoid 404 errors.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Returns immediately if index is already created.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param indexName
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private async waitForIndexAvailable(indexName: string): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    function relevantIndexIsReady(processes, requiredIndexName) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const relevantProcess = processes.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        (process) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          process.details === requiredIndexName ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          requiredIndexName.startsWith(process.details + "/"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return relevantProcess && !relevantProcess.pending;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (relevantIndexIsReady(this._indicesRegistered.value, indexName)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this._indicesRegistered.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        first((processes) => relevantIndexIsReady(processes, indexName)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DateAdapterWithFormatting.html b/documentation/injectables/DateAdapterWithFormatting.html new file mode 100644 index 0000000000..3dd753f586 --- /dev/null +++ b/documentation/injectables/DateAdapterWithFormatting.html @@ -0,0 +1,421 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/language/date-adapter-with-formatting.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + NativeDateAdapter +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + getFirstDayOfWeek + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + getFirstDayOfWeek() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + parse + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + parse(value: any, parseFormat?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Using Moment.js to parse the date input https://momentjs.com/guides/#/parsing/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    value + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parseFormat + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Date | null + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  MAT_NATIVE_DATE_FORMATS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  MatDateFormats,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  NativeDateAdapter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { getLocaleFirstDayOfWeek } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Extend MAT_NATIVE_DATE_FORMATS to also support parsing.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export const DATE_FORMATS: MatDateFormats = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  parse: { dateInput: "l" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  display: MAT_NATIVE_DATE_FORMATS.display,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class DateAdapterWithFormatting extends NativeDateAdapter {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Using Moment.js to parse the date input {@link https://momentjs.com/guides/#/parsing/}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param parseFormat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  override parse(value: any, parseFormat?: any): Date | null {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (value && typeof value == "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return moment(value, parseFormat, this.locale, true).toDate();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return value ? moment(value, true).locale(this.locale).toDate() : null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  override getFirstDayOfWeek(): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return getLocaleFirstDayOfWeek(this.locale);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DateDatatype.html b/documentation/injectables/DateDatatype.html new file mode 100644 index 0000000000..90862b609e --- /dev/null +++ b/documentation/injectables/DateDatatype.html @@ -0,0 +1,1022 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/basic-datatypes/date/date.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Datatype for the EntitySchemaService transforming values to Date instances.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This type is automatically used if you annotate a class's property that has the TypeScript type "Date" +ensuring that even if values in the database might be some kind of date string they will be cast to Date instances.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      For example:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @DatabaseField() myDate: Date; // will be a valid Date even if the database previously had "2020-01-15" as string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + DefaultDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + anonymize(value: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:80 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      value + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<Date> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:67 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      val + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      additional + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + transformToDatabaseFormat(value: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:46 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      value + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + transformToObjectFormat(value, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:50 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      value + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      parent + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "date" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:39 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "EditDate" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:44 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "DateImportConfig" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:65 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "DisplayDate" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:43 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : $localize`:datatype-label:any` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:49 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The human-readable name for this dataType, used in config UIs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { DefaultDatatype } from "../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Datatype for the EntitySchemaService transforming values to Date instances.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * This type is automatically used if you annotate a class's property that has the TypeScript type "Date"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * ensuring that even if values in the database might be some kind of date string they will be cast to Date instances.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * For example:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * `@DatabaseField() myDate: Date; // will be a valid Date even if the database previously had "2020-01-15" as string`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class DateDatatype<DBFormat = any> extends DefaultDatatype<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  DBFormat
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static override dataType = "date";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  // currently not shown to users in Admin UI, as this is not supported well with timezones and UI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  // static override label: string = $localize`:datatype-label:date (with time)`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override viewComponent = "DisplayDate";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override editComponent = "EditDate";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override transformToDatabaseFormat(value: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return value as any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override transformToObjectFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    parent: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const date = new Date(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (Number.isNaN(date.getTime())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        `failed to convert data '${value}' to Date object for ${parent?._id}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override importConfigComponent = "DateImportConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override async importMapFunction(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    val: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    additional?: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const date = moment(val, additional, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (date.isValid()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return date.toDate();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override async anonymize(value: Date): Promise<Date> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // normalize to 01.06. of the year, which has less statistical distortion than 01.01.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // (roughly half the dates before anonymization will be earlier and half will be later)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return new Date(value.getFullYear(), 6, 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DateOnlyDatatype.html b/documentation/injectables/DateOnlyDatatype.html new file mode 100644 index 0000000000..211e415132 --- /dev/null +++ b/documentation/injectables/DateOnlyDatatype.html @@ -0,0 +1,1023 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/basic-datatypes/date-only/date-only.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Datatype for the EntitySchemaService transforming Date values to/from a date string format ("YYYY-mm-dd").

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Throws an exception if the property is set to something that is not a Date instance and cannot be cast to Date either. +Uses the import value mapping properties of the general DateDatatype.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        For example: +@DatabaseField({dataType: 'date-only'}) myDate: Date = new Date('2020-01-15'); // will be "2020-01-15" (without time) in the database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DateDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + transformToDatabaseFormat(value: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:37 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + transformToObjectFormat(value: string, schemaField?: EntitySchemaField, parent?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:44 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        parent + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + anonymize(value: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:80 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<Date> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:67 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        val + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        additional + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "date-only" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:34 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : $localize`:datatype-label:date` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:35 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "EditDate" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:44 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "DateImportConfig" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:65 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "DisplayDate" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:43 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { dateToString } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DateDatatype } from "../date/date.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Datatype for the EntitySchemaService transforming Date values to/from a date string format ("YYYY-mm-dd").
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Throws an exception if the property is set to something that is not a Date instance and cannot be cast to Date either.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Uses the import value mapping properties of the general DateDatatype.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * For example:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * `@DatabaseField({dataType: 'date-only'}) myDate: Date = new Date('2020-01-15'); // will be "2020-01-15" (without time) in the database`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class DateOnlyDatatype extends DateDatatype<string> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override dataType = "date-only";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override label: string = $localize`:datatype-label:date`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override transformToDatabaseFormat(value: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!(value instanceof Date)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return dateToString(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override transformToObjectFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    schemaField?: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    parent?: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Date {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    value = migrateIsoDatesToInferredDateOnly(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // new Date("2022-01-01") is interpreted as UTC time whereas new Date(2022, 0, 1) is local time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // -> we want local time to represent the same day wherever used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const values = value.split("-").map((v) => Number(v));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let date: Date = new Date(values[0], values[1] - 1, values[2]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (isNaN(date.getTime())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // fallback to legacy date parsing if format is not "YYYY-mm-dd"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      date = new Date(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // re-use error logging and basic return logic from base type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return super.transformToObjectFormat(date, schemaField, parent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +function migrateIsoDatesToInferredDateOnly(value: string): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  if (!value.match(/\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ/)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // not ISO Date format (2023-01-06T10:03:35.726Z)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  const date = new Date(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    date.getMinutes() % 15 === 0 &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    date.getSeconds() === 0 &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    date.getMilliseconds() === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // this date was originally created without time information
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // -> infer the time zone and adjust its offset
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (date.getHours() > 12) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // adjust because these are showing the previous day due to timezone offset
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      date.setDate(date.getDate() + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return dateToString(date);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  // not a clean offset but a custom date => cannot reliably infer timezone here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  // cut off the time details and use the UTC date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  return value.substring(0, 10);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DateWithAgeDatatype.html b/documentation/injectables/DateWithAgeDatatype.html new file mode 100644 index 0000000000..7e92cda076 --- /dev/null +++ b/documentation/injectables/DateWithAgeDatatype.html @@ -0,0 +1,973 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/date-with-age/date-with-age.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Similar to the 'date-only' datatype but it uses the DateWithAge class which provides the age function.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + DateOnlyDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToObjectFormat(value, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:16 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          parent + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : DateWithAge + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToDatabaseFormat(value: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:37 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + anonymize(value: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:80 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<Date> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:67 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          val + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          additional + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "date-with-age" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:11 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "EditAge" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:14 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : $localize`:datatype-label:date of birth (date + age)` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:12 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "DateImportConfig" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:65 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "DisplayDate" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:43 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { DateOnlyDatatype } from "../date-only/date-only.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DateWithAge } from "./dateWithAge";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Similar to the 'date-only' datatype but it uses the `DateWithAge` class which provides the `age` function.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class DateWithAgeDatatype extends DateOnlyDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override dataType = "date-with-age";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override label: string = $localize`:datatype-label:date of birth (date + age)`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override editComponent = "EditAge";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override transformToObjectFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    parent: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): DateWithAge {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const dateValue = super.transformToObjectFormat(value, schemaField, parent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!dateValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return new DateWithAge(dateValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DefaultValueService.html b/documentation/injectables/DefaultValueService.html new file mode 100644 index 0000000000..bd914aa675 --- /dev/null +++ b/documentation/injectables/DefaultValueService.html @@ -0,0 +1,754 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/default-values/default-value.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Handle default values like the current date or user for forms when editing an Entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(dynamicPlaceholderValueService: DynamicPlaceholderValueService, inheritedValueService: InheritedValueService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dynamicPlaceholderValueService + DynamicPlaceholderValueService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            inheritedValueService + InheritedValueService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Static + getDefaultValueConfigs + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + getDefaultValueConfigs(entity: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entity + T + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + getDefaultValueUiHint + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +getDefaultValueUiHint(form: EntityForm<T>, fieldId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fieldId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + handleEntityForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + handleEntityForm(form: EntityForm<T>, entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityForm } from "../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntitySchema } from "../entity/schema/entity-schema";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DefaultValueConfig } from "../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { AbstractControl } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntitySchemaField } from "../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DynamicPlaceholderValueService } from "./dynamic-placeholder-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { InheritedValueService } from "./inherited-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Handle default values like the current date or user for forms when editing an Entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class DefaultValueService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private dynamicPlaceholderValueService: DynamicPlaceholderValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private inheritedValueService: InheritedValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async handleEntityForm<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!(form.defaultValueConfigs?.size > 0)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const entitySchema: EntitySchema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.inheritedValueService.initEntityForm(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.enableChangeListener(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (const [key, entitySchemaField] of entitySchema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      let targetFormControl = form.formGroup.get(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        !this.preConditionsFulfilled(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          entity.isNew,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      switch (entitySchemaField.defaultValue?.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        case "static":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.handleStaticMode(targetFormControl, entitySchemaField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        case "dynamic":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.dynamicPlaceholderValueService.setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        case "inherited":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.inheritedValueService.setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private preConditionsFulfilled(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    isNew: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    formControl: AbstractControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!formControl) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!fieldConfig.isArray && !!formControl.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      fieldConfig.isArray &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      formControl.value &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      formControl.value.length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private enableChangeListener<T extends Entity>(form: EntityForm<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form.watcher.set(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      "formGroupValueChanges",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.formGroup.valueChanges.subscribe(async (change) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.inheritedValueService.onFormValueChanges(form),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private handleStaticMode(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    targetFormControl: AbstractControl<any, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (fieldConfig.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      targetFormControl.setValue([fieldConfig.defaultValue.value]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      targetFormControl.setValue(fieldConfig.defaultValue.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  getDefaultValueUiHint<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): DefaultValueHint | EmptyDefaultValueHint | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!form) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const mode = form?.defaultValueConfigs?.get(fieldId)?.mode;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (mode === "inherited") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return this.inheritedValueService.getDefaultValueUiHint(form, fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static getDefaultValueConfigs<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Map<string, DefaultValueConfig> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let schema: EntitySchema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const defaultValueConfigs: Map<string, DefaultValueConfig> = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (const [key, entitySchemaField] of schema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (entitySchemaField.defaultValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        defaultValueConfigs.set(key, entitySchemaField.defaultValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return defaultValueConfigs;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export type DefaultValueHint = FullDefaultValueHint | EmptyDefaultValueHint;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Details of the source for an "inherited" default value in a field,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * used to display context to the user about this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface FullDefaultValueHint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  isInSync: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  inheritedFromType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  inheritedFromField: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  syncFromParentField: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  isEmpty?: undefined | false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Reduced "DefaultValueHint" if no referenced parent entity is selected but a rule to inherit values is configured.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface EmptyDefaultValueHint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  inheritedFromField: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  isEmpty: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  isInSync?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  inheritedFromType?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  syncFromParentField?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoActivityEventsGeneratorService.html b/documentation/injectables/DemoActivityEventsGeneratorService.html new file mode 100644 index 0000000000..4734146fba --- /dev/null +++ b/documentation/injectables/DemoActivityEventsGeneratorService.html @@ -0,0 +1,759 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/child-dev-project/attendance/demo-data/demo-activity-events-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Generate Events with participants' attendance details for all RecurringActivities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(config: DemoEventsConfig, demoActivities: DemoActivityGeneratorService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              config + DemoEventsConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              demoActivities + DemoActivityGeneratorService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : EventNote[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + generateEventForActivity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + generateEventForActivity(activity: RecurringActivity, date: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Create a specific event for a date based on the given activity and fill with random attendance.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              activity + RecurringActivity + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The activity for which to generate a concrete event instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              date + Date + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The date of the generated event

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : EventNote + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + provider(config: DemoEventsConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoActivityEventsGeneratorService.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              config + DemoEventsConfig + + No + + { + forNLastYears: 2, + } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RecurringActivity } from "../model/recurring-activity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { AttendanceLogicalStatus } from "../model/attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { defaultAttendanceStatusTypes } from "../../../core/config/default-config/default-attendance-status-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DemoActivityGeneratorService } from "./demo-activity-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EventNote } from "../model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DemoEventsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  forNLastYears: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Generate Events with participants' attendance details for all RecurringActivities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DemoActivityEventsGeneratorService extends DemoDataGenerator<EventNote> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Create a specific event for a date based on the given activity and fill with random attendance.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param activity The activity for which to generate a concrete event instance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param date The date of the generated event
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static generateEventForActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    activity: RecurringActivity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    date: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): EventNote {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const eventNote = EventNote.create(date, activity.title);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    eventNote.authors = activity.assignedTo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    eventNote.category = activity.type;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    eventNote.relatesTo = activity.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const participantId of activity.participants) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      eventNote.addChild(participantId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const eventAtt = eventNote.getAttendance(participantId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      eventAtt.status = faker.helpers.arrayElement(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        defaultAttendanceStatusTypes,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (eventAtt.status.countAs === AttendanceLogicalStatus.ABSENT) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        eventAtt.remarks = faker.helpers.arrayElement([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          $localize`:Event demo attendance remarks:sick`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          $localize`:Event demo attendance remarks:fever`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          $localize`:Event demo attendance remarks:no information`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return eventNote;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   *   `providers: [DemoActivityEventsGeneratorService.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static provider(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    config: DemoEventsConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      forNLastYears: 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        provide: DemoActivityEventsGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        useClass: DemoActivityEventsGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      { provide: DemoEventsConfig, useValue: config },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private config: DemoEventsConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private demoActivities: DemoActivityGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  generateEntities(): EventNote[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const activity of this.demoActivities.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      for (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        let dayOffset = 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        dayOffset < this.config.forNLastYears * 365;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        dayOffset++
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const date = moment().subtract(dayOffset, "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        if (date.isoWeekday() === 6 || date.isoWeekday() === 7) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          // skip Saturday, Sunday
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        data.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          DemoActivityEventsGeneratorService.generateEventForActivity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            activity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            date.toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoActivityGeneratorService.html b/documentation/injectables/DemoActivityGeneratorService.html new file mode 100644 index 0000000000..281f1d2606 --- /dev/null +++ b/documentation/injectables/DemoActivityGeneratorService.html @@ -0,0 +1,711 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/child-dev-project/attendance/demo-data/demo-activity-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Generate RecurringActivity entities +Builds upon the generated demo Child entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(demoChildren: DemoChildGenerator, demoUser: DemoUserGeneratorService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                demoChildren + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                demoUser + DemoUserGeneratorService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + generateActivityForChildren + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + generateActivityForChildren(children: Entity[], assignedUser?: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Create a single instance filled with dummy data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                children + Entity[] + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The list of children to be added to the new activity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                assignedUser + Entity + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) user to be assigned as responsible for the activity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : RecurringActivity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : RecurringActivity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoAttendanceGenerator.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { DemoChildGenerator } from "../../children/demo-data-generators/demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { RecurringActivity } from "../model/recurring-activity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DemoUserGeneratorService } from "../../../core/user/demo-user-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { defaultInteractionTypes } from "../../../core/config/default-config/default-interaction-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Generate RecurringActivity entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Builds upon the generated demo Child entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class DemoActivityGeneratorService extends DemoDataGenerator<RecurringActivity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private static readonly ACTIVITY_TYPES = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    defaultInteractionTypes.find((t) => t.id === "SCHOOL_CLASS"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    defaultInteractionTypes.find((t) => t.id === "COACHING_CLASS"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Create a single instance filled with dummy data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param children The list of children to be added to the new activity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param assignedUser (Optional) user to be assigned as responsible for the activity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static generateActivityForChildren(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    children: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    assignedUser?: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): RecurringActivity {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const activity = RecurringActivity.create();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const type = faker.helpers.arrayElement(this.ACTIVITY_TYPES);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    activity.title =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      type.label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      faker.number.int({ min: 1, max: 9 }) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      faker.string.alphanumeric(1).toUpperCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    activity.type = type;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    activity.participants = children.map((c) => c.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    activity.assignedTo = [assignedUser?.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return activity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *   `providers: [DemoAttendanceGenerator.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        provide: DemoActivityGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        useClass: DemoActivityGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private readonly MIN_PARTICIPANTS = 3;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private readonly MAX_PARTICIPANTS = 25;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private demoChildren: DemoChildGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private demoUser: DemoUserGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  generateEntities(): RecurringActivity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const children = this.demoChildren.entities.filter((c) => c.isActive);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let i = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    while (i < children.length) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const groupSize = faker.number.int({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        min: this.MIN_PARTICIPANTS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        max: this.MAX_PARTICIPANTS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const participatingChildren = children.slice(i, i + groupSize);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      data.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        DemoActivityGeneratorService.generateActivityForChildren(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          participatingChildren,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          faker.helpers.arrayElement(this.demoUser.entities),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      i += groupSize;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoAserGeneratorService.html b/documentation/injectables/DemoAserGeneratorService.html new file mode 100644 index 0000000000..799675fcde --- /dev/null +++ b/documentation/injectables/DemoAserGeneratorService.html @@ -0,0 +1,627 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/child-dev-project/children/demo-data-generators/aser/demo-aser-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Generate ASER results every 12 months for each Child until passing. +Builds upon the generated demo Child entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(demoChildren: DemoChildGenerator) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  demoChildren + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoAserGeneratorService.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { DemoChildGenerator } from "../demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DemoDataGenerator } from "../../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { faker } from "../../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { mathLevels, readingLevels } from "./skill-levels";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { WarningLevel } from "../../../warning-level";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { createEntityOfType } from "../../../../core/demo-data/create-entity-of-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ConfigurableEnumValue } from "../../../../core/basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Generate ASER results every 12 months for each Child until passing.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Builds upon the generated demo Child entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class DemoAserGeneratorService extends DemoDataGenerator<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *   `providers: [DemoAserGeneratorService.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      { provide: DemoAserGeneratorService, useClass: DemoAserGeneratorService },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(private demoChildren: DemoChildGenerator) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public generateEntities(): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const child of this.demoChildren.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      data.push(...this.generateAserResultsForChild(child));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private generateAserResultsForChild(child: Entity): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let date = new Date(child["admissionDate"].getTime());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let previousResult = createEntityOfType("Aser");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const firstLanguage = child["motherTongue"].toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    do {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const aserResult = createEntityOfType("Aser");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aserResult.child = child.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aserResult.date = date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aserResult.math = this.selectNextSkillLevel(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        mathLevels.slice(1),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        previousResult.math,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aserResult.english = this.selectNextSkillLevel(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        readingLevels.slice(1),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        previousResult.english,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      aserResult[firstLanguage] = this.selectNextSkillLevel(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        readingLevels.slice(1),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        previousResult[firstLanguage],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      data.push(aserResult);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      date = new Date(date.getFullYear() + 1, 2, 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      previousResult = aserResult;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } while (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      date < faker.getEarlierDateOrToday(child["dropoutDate"]) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      previousResult.getWarningLevel() !== WarningLevel.OK
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Randomly select the next Aser level for a skill based on the previous result.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param skillRange The array of skill levels for the desired subject (mathLevels or readingLevels)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param previousSkillLevel The string indicating the level from the previous test for this subject
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private selectNextSkillLevel<T extends ConfigurableEnumValue>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    skillRange: T[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    previousSkillLevel: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): T {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const previousSkillLevelIndex = skillRange.indexOf(previousSkillLevel);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let nextSkillLevelIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const random = faker.number.int(100);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (random < 20) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      nextSkillLevelIndex = previousSkillLevelIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else if (random < 90) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      nextSkillLevelIndex = previousSkillLevelIndex + 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      nextSkillLevelIndex = previousSkillLevelIndex + 2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return skillRange[this.trimToValidIndex(nextSkillLevelIndex, skillRange)];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Convert the given number to a valid index of the array by capping it to a range of [0, array.lenght -1]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param index
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private trimToValidIndex(index: number, array: any[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (index < 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return Math.min(index, array.length - 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoChildGenerator.html b/documentation/injectables/DemoChildGenerator.html new file mode 100644 index 0000000000..3d801514d0 --- /dev/null +++ b/documentation/injectables/DemoChildGenerator.html @@ -0,0 +1,758 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/child-dev-project/children/demo-data-generators/demo-child-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(config: DemoChildConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    config + DemoChildConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + generateEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + generateEntity(id: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    id + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + provider(config: DemoChildConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoUserProvider.provider({count: 150})]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    config + DemoChildConfig + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The configuration specifying the number of entities the service should generate.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + config + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : DemoChildConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + count + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { religions } from "./fixtures/religions";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { languages } from "./fixtures/languages";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { dropoutTypes } from "./fixtures/dropout-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { centersWithProbability } from "./fixtures/centers";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { genders } from "../model/genders";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { calculateAge } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DateWithAge } from "../../../core/basic-datatypes/date-with-age/dateWithAge";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { createEntityOfType } from "../../../core/demo-data/create-entity-of-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class DemoChildConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  count: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class DemoChildGenerator extends DemoDataGenerator<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static count: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *   `providers: [DemoUserProvider.provider({count: 150})]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param config The configuration specifying the number of entities the service should generate.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static provider(config: DemoChildConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      { provide: DemoChildGenerator, useClass: DemoChildGenerator },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      { provide: DemoChildConfig, useValue: config },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static generateEntity(id: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const child = createEntityOfType("Child", id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.name = faker.person.firstName() + " " + faker.person.lastName();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.projectNumber = id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.religion = faker.helpers.arrayElement(religions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.gender = faker.helpers.arrayElement(genders.slice(1)).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.dateOfBirth = new DateWithAge(faker.dateOfBirth(5, 20));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.motherTongue = faker.helpers.arrayElement(languages);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.center = faker.helpers.arrayElement(centersWithProbability).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.phone =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "+" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      faker.number.int({ min: 10, max: 99 }) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      faker.number.int({ min: 10000000, max: 99999999 });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.admissionDate = faker.date.past({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      years: calculateAge(child.dateOfBirth) - 4,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child["address"] = faker.geoAddress();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (faker.number.int(100) > 90) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      DemoChildGenerator.makeChildDropout(child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return child;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private static makeChildDropout(child: Entity & { [key: string]: any }) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.dropoutDate = faker.date.between({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      from: child.admissionDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      to: new Date(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.dropoutRemarks = faker.lorem.sentence();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.dropoutType = faker.helpers.arrayElement(dropoutTypes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.status = $localize`:Child status:Dropout`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    child.inactive = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(public config: DemoChildConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  generateEntities(): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (let i = 1; i <= this.config.count; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      data.push(DemoChildGenerator.generateEntity(String(i)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoChildSchoolRelationGenerator.html b/documentation/injectables/DemoChildSchoolRelationGenerator.html new file mode 100644 index 0000000000..3ed1072845 --- /dev/null +++ b/documentation/injectables/DemoChildSchoolRelationGenerator.html @@ -0,0 +1,649 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/child-dev-project/children/demo-data-generators/demo-child-school-relation-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Generate ChildSchoolRelation entities linking a child to a school for a specific year. +Builds upon the generated demo Child and demo School entities, +generating relations for each Child from the date of admission till dropout or today.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(demoChildren: DemoChildGenerator, demoSchools: DemoSchoolGenerator, entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      demoChildren + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      demoSchools + DemoSchoolGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : ChildSchoolRelation[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoChildSchoolRelationGenerator.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { DemoChildGenerator } from "./demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DemoSchoolGenerator } from "./demo-school-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ChildSchoolRelation } from "../model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Generate ChildSchoolRelation entities linking a child to a school for a specific year.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Builds upon the generated demo Child and demo School entities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * generating relations for each Child from the date of admission till dropout or today.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class DemoChildSchoolRelationGenerator extends DemoDataGenerator<ChildSchoolRelation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *   `providers: [DemoChildSchoolRelationGenerator.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        provide: DemoChildSchoolRelationGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        useClass: DemoChildSchoolRelationGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private demoChildren: DemoChildGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private demoSchools: DemoSchoolGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  generateEntities(): ChildSchoolRelation[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const child of this.demoChildren.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      data.push(...this.generateChildSchoolRecordsForChild(child));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private generateChildSchoolRecordsForChild(child: Entity): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const data: ChildSchoolRelation[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const firstYear = child["admissionDate"].getFullYear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let finalYear = new Date().getFullYear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (child["dropoutDate"]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      finalYear = child["dropoutDate"].getFullYear();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let currentSchool: Entity = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let offset = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    while (firstYear + offset <= finalYear && offset <= 12) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      currentSchool = this.selectNextSchool(currentSchool);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      data.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.generateRecord(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          child,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          firstYear + offset,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          offset + 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          currentSchool,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ) as ChildSchoolRelation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      offset++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (Math.random() < 0.8) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // 80% of the latest records for each child don't have an end date, which means the child currently attends this school.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      delete data[data.length - 1].end;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private generateRecord(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    child: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    year,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schoolClass: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    school: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): ChildSchoolRelation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const schoolRelation: ChildSchoolRelation = new ChildSchoolRelation();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schoolRelation.childId = child.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schoolRelation.start = new Date(year + "-01-01");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schoolRelation.end = new Date(year + "-12-31");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schoolRelation["schoolClass"] = String(schoolClass);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schoolRelation.schoolId = school.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    schoolRelation["result"] = faker.number.int(100);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return schoolRelation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Select a different school randomly in a certain percentages of cases keeping the currentSchool otherwise.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param currentSchool
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private selectNextSchool(currentSchool: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!currentSchool) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return faker.helpers.arrayElement(this.demoSchools.entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (faker.number.int(100) > 75) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return faker.helpers.arrayElement(this.demoSchools.entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return currentSchool;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoConfigGeneratorService.html b/documentation/injectables/DemoConfigGeneratorService.html new file mode 100644 index 0000000000..7ac2c2d948 --- /dev/null +++ b/documentation/injectables/DemoConfigGeneratorService.html @@ -0,0 +1,485 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/config/demo-config-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Config[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DemoDataGenerator } from "../demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Config } from "./config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { defaultJsonConfig } from "./config-fix";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  CONFIG_SETUP_WIZARD_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  defaultSetupWizardConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "../admin/setup-wizard/setup-wizard-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class DemoConfigGeneratorService extends DemoDataGenerator<Config> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        provide: DemoConfigGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        useClass: DemoConfigGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  protected generateEntities(): Config[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const defaultConfig = JSON.parse(JSON.stringify(defaultJsonConfig));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      new Config(Config.CONFIG_KEY, defaultConfig),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      new Config(CONFIG_SETUP_WIZARD_ID, defaultSetupWizardConfig),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoConfigurableEnumGeneratorService.html b/documentation/injectables/DemoConfigurableEnumGeneratorService.html new file mode 100644 index 0000000000..bcf62a7eb2 --- /dev/null +++ b/documentation/injectables/DemoConfigurableEnumGeneratorService.html @@ -0,0 +1,477 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/configurable-enum/demo-configurable-enum-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Protected + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : ConfigurableEnum[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DemoDataGenerator } from "../../demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigurableEnum } from "./configurable-enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { demoEnums } from "./configurable-enum-testing";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class DemoConfigurableEnumGeneratorService extends DemoDataGenerator<ConfigurableEnum> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        provide: DemoConfigurableEnumGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        useClass: DemoConfigurableEnumGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  protected generateEntities(): ConfigurableEnum[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return demoEnums;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoDataInitializerService.html b/documentation/injectables/DemoDataInitializerService.html new file mode 100644 index 0000000000..870851244c --- /dev/null +++ b/documentation/injectables/DemoDataInitializerService.html @@ -0,0 +1,538 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/demo-data/demo-data-initializer.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This service handles everything related to the demo-mode

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Register users (demo and demo-admin)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Publish demo data if none is present
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Automatically login user (demo)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Synchronizes (local) databases of different users in the same browser
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • + Async + run +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(demoDataService: DemoDataService, localAuthService: LocalAuthService, sessionManager: SessionManagerService, dialog: MatDialog, database: Database, loginState: LoginStateSubject, sessionInfo: SessionSubject) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            demoDataService + DemoDataService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            localAuthService + LocalAuthService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            sessionManager + SessionManagerService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            database + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            loginState + LoginStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + run + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + run() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DemoDataService } from "./demo-data.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DemoUserGeneratorService } from "../user/demo-user-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DemoDataGeneratingProgressDialogComponent } from "./demo-data-generating-progress-dialog.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { SessionManagerService } from "../session/session-service/session-manager.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { LocalAuthService } from "../session/auth/local/local-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { SessionInfo, SessionSubject } from "../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Logging } from "../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Database } from "../database/database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { PouchDatabase } from "../database/pouch-database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { LoginState } from "../session/session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { LoginStateSubject, SessionType } from "../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import memory from "pouchdb-adapter-memory";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import PouchDB from "pouchdb-browser";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This service handles everything related to the demo-mode
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *  - Register users (demo and demo-admin)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *  - Publish demo data if none is present
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *  - Automatically login user (demo)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *  - Synchronizes (local) databases of different users in the same browser
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class DemoDataInitializerService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private liveSyncHandle: PouchDB.Replication.Sync<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private pouchDatabase: PouchDatabase;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private readonly normalUser: SessionInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    name: DemoUserGeneratorService.DEFAULT_USERNAME,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    id: DemoUserGeneratorService.DEFAULT_USERNAME,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    roles: ["user_app"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entityId: `User:${DemoUserGeneratorService.DEFAULT_USERNAME}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private readonly adminUser: SessionInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    name: DemoUserGeneratorService.ADMIN_USERNAME,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    id: DemoUserGeneratorService.ADMIN_USERNAME,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    roles: ["user_app", "admin_app"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entityId: `User:${DemoUserGeneratorService.ADMIN_USERNAME}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private demoDataService: DemoDataService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private localAuthService: LocalAuthService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private sessionManager: SessionManagerService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private database: Database,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private loginState: LoginStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async run() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const dialogRef = this.dialog.open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      DemoDataGeneratingProgressDialogComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.database instanceof PouchDatabase) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.pouchDatabase = this.database;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        "Cannot create demo data with session: " + environment.session_type,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.localAuthService.saveUser(this.normalUser);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.localAuthService.saveUser(this.adminUser);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.sessionManager.offlineLogin(this.normalUser);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.demoDataService.publishDemoData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    dialogRef.close();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.syncDatabaseOnUserChange();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private syncDatabaseOnUserChange() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.loginState.subscribe((state) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        state === LoginState.LOGGED_IN &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.sessionInfo.value.name !==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          DemoUserGeneratorService.DEFAULT_USERNAME
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // There is a slight race-condition with session type local
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // It throws an error because it can't find the view-documents which are not yet synced
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // Navigating in the app solves this problem
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.syncWithDemoUserDB();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else if (state === LoginState.LOGGED_OUT) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.stopLiveSync();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async syncWithDemoUserDB() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const dbName = `${DemoUserGeneratorService.DEFAULT_USERNAME}-${environment.DB_NAME}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let demoUserDB: PouchDB.Database;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (environment.session_type === SessionType.mock) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      PouchDB.plugin(memory);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      demoUserDB = new PouchDB(dbName, { adapter: "memory" });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      demoUserDB = new PouchDB(dbName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const currentUserDB = this.pouchDatabase.getPouchDB();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await currentUserDB.sync(demoUserDB, { batch_size: 500 });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.liveSyncHandle = currentUserDB.sync(demoUserDB, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      live: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      retry: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private stopLiveSync() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.liveSyncHandle) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.liveSyncHandle.cancel();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.liveSyncHandle = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoDataService.html b/documentation/injectables/DemoDataService.html new file mode 100644 index 0000000000..a1bb425a41 --- /dev/null +++ b/documentation/injectables/DemoDataService.html @@ -0,0 +1,527 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/demo-data/demo-data.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The DemoDataService is the manager for all provided DemoDataGenerator implementations. +It serves as the central service to trigger the demo data generation into the database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              To add more demo data generators, refer the documentation +How to Generate Demo Data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(entityMapper: EntityMapperService, injector: Injector, config: DemoDataServiceConfig, database: Database) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              injector + Injector + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              config + DemoDataServiceConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              database + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + publishDemoData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + publishDemoData() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Trigger all registered DemoDataGenerator implementations to generate demo entities +and add all the generated entities to the Database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Readonly + dataGenerators + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : DemoDataGenerator<any>[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : [] +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              All registered demo data generator services

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ClassProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FactoryProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Injectable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Injector,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ValueProvider,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DemoDataGenerator } from "./demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Database } from "../database/database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * General config object to pass all initially register DemoDataGenerators
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * with `DemoDataModule.forRoot()`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * see docs at {@link DemoDataModule}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DemoDataServiceConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Providers for DemoDataGenerator service implementations to be registered for data generation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * This may also include providers for services a DemoDataGenerator depends on.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  dataGeneratorProviders: (ValueProvider | ClassProvider | FactoryProvider)[] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * The DemoDataService is the manager for all provided DemoDataGenerator implementations.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * It serves as the central service to trigger the demo data generation into the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * To add more demo data generators, refer the documentation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * [How to Generate Demo Data]{@link /additional-documentation/how-to-guides/generate-demo-data.html}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DemoDataService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** All registered demo data generator services */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  readonly dataGenerators: DemoDataGenerator<any>[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private injector: Injector,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private config: DemoDataServiceConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private database: Database,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private registerAllProvidedDemoDataGenerators() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const provider of this.config.dataGeneratorProviders) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const service = this.injector.get<any>(provider.provide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (service && service instanceof DemoDataGenerator) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.dataGenerators.push(service);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Trigger all registered DemoDataGenerator implementations to generate demo entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * and add all the generated entities to the Database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async publishDemoData() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!(await this.database.isEmpty())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.registerAllProvidedDemoDataGenerators();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // completely generate all data (i.e. call every generator) before starting to save the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // to allow generators to delete unwanted entities of other generators before they are saved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // (e.g. the DropoutChildGenerator should be able to delete Attendance records of the Child after its dropout date)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.dataGenerators.forEach((generator) => generator.entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // save the generated data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const generator of this.dataGenerators) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.entityMapper.saveAll(generator.entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // Wait for other async tasks in the queue e.g. ConfigService setting up config after it has been saved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await new Promise((resolve) => setTimeout(resolve));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoEducationalMaterialGeneratorService.html b/documentation/injectables/DemoEducationalMaterialGeneratorService.html new file mode 100644 index 0000000000..ef1eec2665 --- /dev/null +++ b/documentation/injectables/DemoEducationalMaterialGeneratorService.html @@ -0,0 +1,637 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/child-dev-project/children/demo-data-generators/educational-material/demo-educational-material-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Generate EducationalMaterial records. +Builds upon the generated demo Child entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(config: DemoEducationMaterialConfig, demoChildren: DemoChildGenerator) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                config + DemoEducationMaterialConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                demoChildren + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + provider(config: DemoEducationMaterialConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoEducationalMaterialGeneratorService.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                config + DemoEducationMaterialConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { DemoChildGenerator } from "../demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DemoDataGenerator } from "../../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { faker } from "../../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { materials } from "./materials";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { createEntityOfType } from "../../../../core/demo-data/create-entity-of-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class DemoEducationMaterialConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  minCount: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  maxCount: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Generate EducationalMaterial records.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Builds upon the generated demo Child entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class DemoEducationalMaterialGeneratorService extends DemoDataGenerator<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *   `providers: [DemoEducationalMaterialGeneratorService.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static provider(config: DemoEducationMaterialConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        provide: DemoEducationalMaterialGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        useClass: DemoEducationalMaterialGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      { provide: DemoEducationMaterialConfig, useValue: config },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private config: DemoEducationMaterialConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private demoChildren: DemoChildGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public generateEntities(): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const child of this.demoChildren.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const count = faker.number.int({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        min: this.config.minCount,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        max: this.config.maxCount,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      for (let i = 1; i < count; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        data.push(this.generateEducationalMaterialEntity(child));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const specialMaterial = this.generateEducationalMaterialEntity(child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      specialMaterial.materialType = faker.helpers.arrayElement(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        materials.filter((material) => material.hasOwnProperty("color")),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      specialMaterial.materialAmount = 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      data.push(specialMaterial);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private generateEducationalMaterialEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    child: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Entity & { [key: string]: any } {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const entity = createEntityOfType("EducationalMaterial");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity.child = child.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity.date = faker.date.between({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      from: child["admissionDate"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      to: faker.getEarlierDateOrToday(child["dropoutDate"]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity.materialAmount = faker.helpers.arrayElement([1, 1, 1, 2, 3]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity.materialType = faker.helpers.arrayElement(materials).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoHealthCheckGeneratorService.html b/documentation/injectables/DemoHealthCheckGeneratorService.html new file mode 100644 index 0000000000..43bcd9d397 --- /dev/null +++ b/documentation/injectables/DemoHealthCheckGeneratorService.html @@ -0,0 +1,608 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/child-dev-project/children/demo-data-generators/health-check/demo-health-check-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Generate HealthCheck records every 6 months for children up to the age of 12. +Builds upon the generated demo Child entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(demoChildren: DemoChildGenerator) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  demoChildren + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoHealthCheckGeneratorService.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { DemoChildGenerator } from "../demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DemoDataGenerator } from "../../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { faker } from "../../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { heightRangeForAge, weightRangeForAge } from "./height-weight";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { createEntityOfType } from "../../../../core/demo-data/create-entity-of-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Generate HealthCheck records every 6 months for children up to the age of 12.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Builds upon the generated demo Child entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class DemoHealthCheckGeneratorService extends DemoDataGenerator<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *   `providers: [DemoHealthCheckGeneratorService.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        provide: DemoHealthCheckGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        useClass: DemoHealthCheckGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(private demoChildren: DemoChildGenerator) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public generateEntities(): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const child of this.demoChildren.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      data.push(...this.generateHealthCheckHistoryForChild(child));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private generateHealthCheckHistoryForChild(child: Entity): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let date = new Date(child["admissionDate"].getTime());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let previousRecord = createEntityOfType("HealthCheck");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    previousRecord.height = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    previousRecord.weight = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    do {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const record = createEntityOfType("HealthCheck");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      record.child = child.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      record.date = date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.setNextHeightAndWeight(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        record,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        previousRecord,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.getAgeAtDate(child, date),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      data.push(record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (date.getMonth() === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        date = new Date(date.getFullYear(), 5, 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        date = new Date(date.getFullYear() + 1, 0, 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      previousRecord = record;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } while (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      date < faker.getEarlierDateOrToday(child["dropoutDate"]) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.getAgeAtDate(child, date) < 11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private getAgeAtDate(child: Entity, date: Date): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const timeDiff = date.getTime() - child["dateOfBirth"].getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return timeDiff / (1000 * 60 * 60 * 24 * 365);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private setNextHeightAndWeight(record, previousRecord, age: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const ageRoundedToHalfYear = Math.round(2 * age) / 2;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const randomHeight = faker.number.int(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      heightRangeForAge.get(ageRoundedToHalfYear),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    record.height = Math.max(randomHeight, previousRecord.height); // height will not become less
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    record.weight = faker.number.int(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      weightRangeForAge.get(ageRoundedToHalfYear),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoHistoricalDataGenerator.html b/documentation/injectables/DemoHistoricalDataGenerator.html new file mode 100644 index 0000000000..71e319571f --- /dev/null +++ b/documentation/injectables/DemoHistoricalDataGenerator.html @@ -0,0 +1,625 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/child-dev-project/children/demo-data-generators/observations/demo-historical-data-generator.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(childrenGenerator: DemoChildGenerator, config: DemoHistoricalDataConfig, configGenerator: DemoConfigGeneratorService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    childrenGenerator + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    config + DemoHistoricalDataConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    configGenerator + DemoConfigGeneratorService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + provider(config: DemoHistoricalDataConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    config + DemoHistoricalDataConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { DemoDataGenerator } from "../../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DemoChildGenerator } from "../demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { faker } from "../../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ratingAnswers } from "./rating-answers";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityConfigService } from "../../../../core/entity/entity-config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DemoConfigGeneratorService } from "../../../../core/config/demo-config-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityConfig } from "../../../../core/entity/entity-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { createEntityOfType } from "../../../../core/demo-data/create-entity-of-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class DemoHistoricalDataConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  minCountAttributes: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  maxCountAttributes: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class DemoHistoricalDataGenerator extends DemoDataGenerator<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static provider(config: DemoHistoricalDataConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        provide: DemoHistoricalDataGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        useClass: DemoHistoricalDataGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      { provide: DemoHistoricalDataConfig, useValue: config },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private childrenGenerator: DemoChildGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private config: DemoHistoricalDataConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private configGenerator: DemoConfigGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  protected generateEntities(): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const config = this.configGenerator.entities[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const attributes: any[] = Object.keys(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        config.data[
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          EntityConfigService.PREFIX_ENTITY_CONFIG + "HistoricalEntityData"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ] as EntityConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ).attributes,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const entities: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const child of this.childrenGenerator.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const countOfData =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        faker.number.int(this.config.maxCountAttributes) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.config.minCountAttributes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const historicalDataOfChild = [...Array(countOfData)].map(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        const historicalData = createEntityOfType("HistoricalEntityData");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        for (const attribute of attributes) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          historicalData[attribute] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            faker.helpers.arrayElement(ratingAnswers).id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        historicalData.date = faker.date.past();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        historicalData.relatedEntity = child.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return historicalData;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      entities.push(...historicalDataOfChild);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return entities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoNoteGeneratorService.html b/documentation/injectables/DemoNoteGeneratorService.html new file mode 100644 index 0000000000..0ea690344e --- /dev/null +++ b/documentation/injectables/DemoNoteGeneratorService.html @@ -0,0 +1,743 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/child-dev-project/notes/demo-data/demo-note-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Generate a number of Note entities for each Child. +Builds upon the generated demo Child entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(config: DemoNoteConfig, demoChildren: DemoChildGenerator, demoUsers: DemoUserGeneratorService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      config + DemoNoteConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      demoChildren + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      demoUsers + DemoUserGeneratorService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Note[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + provider(config: DemoNoteConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoNoteGeneratorService.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      config + DemoNoteConfig + + No + + { + minNotesPerChild: 2, + maxNotesPerChild: 10, + groupNotes: 5, + } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { DemoChildGenerator } from "../../children/demo-data-generators/demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Note } from "../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { noteIndividualStories } from "./notes_individual-stories";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { noteGroupStories } from "./notes_group-stories";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { centersUnique } from "../../children/demo-data-generators/fixtures/centers";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { absenceRemarks } from "./remarks";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AttendanceLogicalStatus } from "../../attendance/model/attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DemoUserGeneratorService } from "../../../core/user/demo-user-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { defaultAttendanceStatusTypes } from "../../../core/config/default-config/default-attendance-status-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { warningLevels } from "../../warning-level";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class DemoNoteConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  minNotesPerChild: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  maxNotesPerChild: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  groupNotes: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Generate a number of Note entities for each Child.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Builds upon the generated demo Child entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class DemoNoteGeneratorService extends DemoDataGenerator<Note> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *   `providers: [DemoNoteGeneratorService.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static provider(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    config: DemoNoteConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      minNotesPerChild: 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      maxNotesPerChild: 10,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      groupNotes: 5,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      { provide: DemoNoteGeneratorService, useClass: DemoNoteGeneratorService },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      { provide: DemoNoteConfig, useValue: config },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private config: DemoNoteConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private demoChildren: DemoChildGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private demoUsers: DemoUserGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  public generateEntities(): Note[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const child of this.demoChildren.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (!child.isActive) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      let numberOfNotes = faker.number.int({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        min: this.config.minNotesPerChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        max: this.config.maxNotesPerChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // generate a recent note for the last week for some children to have data for dashboard
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (numberOfNotes > 0 && faker.number.int(100) < 40) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        data.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          this.generateNoteForChild(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            child,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            faker.date.between({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              from: moment().subtract(6, "days").toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +              to: moment().toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        numberOfNotes--;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      for (let i = 0; i < numberOfNotes; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        data.push(this.generateNoteForChild(child));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const center of centersUnique) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const children: Entity[] = this.demoChildren.entities.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        (c) => c["center"] === center,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      for (let i = 0; i < this.config.groupNotes; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        data.push(this.generateGroupNote(children));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private generateNoteForChild(child: Entity, date?: Date): Note {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const note = new Note();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const selectedStory = faker.helpers.arrayElement(noteIndividualStories);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    Object.assign(note, selectedStory);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    note.addChild(child.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    note.authors = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      faker.helpers.arrayElement(this.demoUsers.entities).getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      date = faker.date.between({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        from: child["admissionDate"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        to: faker.getEarlierDateOrToday(child["dropoutDate"]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    note.date = date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.removeFollowUpMarkerForOldNotes(note);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Set all older notes to be "resolved" in order to keep the list of notes needing follow-up limited in the demo.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private removeFollowUpMarkerForOldNotes(note: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const lastMonths = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    lastMonths.setMonth(lastMonths.getMonth() - 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (note.date < lastMonths) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      note.warningLevel = warningLevels.find((level) => level.id === "OK");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private generateGroupNote(children: Entity[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const note = new Note();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const selectedStory = faker.helpers.arrayElement(noteGroupStories);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    Object.assign(note, selectedStory);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    note.children = children.map((c) => c.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    children.forEach((child) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const attendance = note.getAttendance(child.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // get an approximate presence of 85%
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (faker.number.int(100) <= 15) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        attendance.status = defaultAttendanceStatusTypes.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          (t) => t.countAs === AttendanceLogicalStatus.ABSENT,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        attendance.remarks = faker.helpers.arrayElement(absenceRemarks);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        attendance.status = defaultAttendanceStatusTypes.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          (t) => t.countAs === AttendanceLogicalStatus.PRESENT,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    note.authors = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      faker.helpers.arrayElement(this.demoUsers.entities).getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    note.date = faker.date.past({ years: 1 });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.removeFollowUpMarkerForOldNotes(note);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoPermissionGeneratorService.html b/documentation/injectables/DemoPermissionGeneratorService.html new file mode 100644 index 0000000000..29bc314dde --- /dev/null +++ b/documentation/injectables/DemoPermissionGeneratorService.html @@ -0,0 +1,485 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/permissions/demo-permission-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Config[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DemoDataGenerator } from "../demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DatabaseRules } from "./permission-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Config } from "../config/config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class DemoPermissionGeneratorService extends DemoDataGenerator<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Config<DatabaseRules>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        provide: DemoPermissionGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        useClass: DemoPermissionGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  protected generateEntities(): Config<DatabaseRules>[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // This can be changed to experiment with different permission setups locally.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // For the general demo mode everything is allowed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const rules: DatabaseRules = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      user_app: [{ subject: "all", action: "manage" }],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      admin_app: [{ subject: "all", action: "manage" }],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return [new Config(Config.PERMISSION_KEY, rules)];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoProgressDashboardWidgetGeneratorService.html b/documentation/injectables/DemoProgressDashboardWidgetGeneratorService.html new file mode 100644 index 0000000000..563f7c638b --- /dev/null +++ b/documentation/injectables/DemoProgressDashboardWidgetGeneratorService.html @@ -0,0 +1,549 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/dashboard-widgets/progress-dashboard-widget/demo-progress-dashboard-widget-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoProgressDashboardWidgetGeneratorService.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ProgressDashboardConfig } from "./progress-dashboard/progress-dashboard-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class DemoProgressDashboardWidgetGeneratorService extends DemoDataGenerator<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *   `providers: [DemoProgressDashboardWidgetGeneratorService.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        provide: DemoProgressDashboardWidgetGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        useClass: DemoProgressDashboardWidgetGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private readonly DEMO_TASKS = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    $localize`:Example for demo task in the progress widget:Clubs visited`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    $localize`:Example for demo task in the progress widget:Schools checked`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    $localize`:Example for demo task in the progress widget:Government Officials met`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  generateEntities(): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    data.push(this.generateDashboardWidgetSurveyStatus());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    data.push(this.generateDashboardWidgetEvaluation());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private generateDashboardWidgetSurveyStatus(): ProgressDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const dashboardProgressWidget = new ProgressDashboardConfig("1");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    dashboardProgressWidget.title = $localize`:Widget title:Annual Survey`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const task of this.DEMO_TASKS) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const targetNumber = faker.number.int({ min: 5, max: 50 });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dashboardProgressWidget.parts.push({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        label: task,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        currentValue: faker.number.int(targetNumber),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        targetValue: targetNumber,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return dashboardProgressWidget;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private generateDashboardWidgetEvaluation() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const dashboardProgressWidget = new ProgressDashboardConfig("2");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    dashboardProgressWidget.title = $localize`:Dashboard widget demo tile:Evaluation targets reached`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const evaluationEntries = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      $localize`:Dashboard widget demo entry:Students graduating`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      $localize`:Dashboard widget demo entry:Students enrolled in training`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      $localize`:Dashboard widget demo entry:Students found job`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const task of evaluationEntries) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const targetNumber = faker.number.int({ min: 5, max: 50 });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dashboardProgressWidget.parts.push({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        label: task,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        currentValue: faker.number.int(targetNumber),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        targetValue: targetNumber,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return dashboardProgressWidget;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoPublicFormGeneratorService.html b/documentation/injectables/DemoPublicFormGeneratorService.html new file mode 100644 index 0000000000..044880136e --- /dev/null +++ b/documentation/injectables/DemoPublicFormGeneratorService.html @@ -0,0 +1,482 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/public-form/demo-public-form-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : PublicFormConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DemoDataGenerator } from "../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { PublicFormConfig } from "./public-form-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class DemoPublicFormGeneratorService extends DemoDataGenerator<PublicFormConfig> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        provide: DemoPublicFormGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        useClass: DemoPublicFormGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  protected generateEntities(): PublicFormConfig[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const form = new PublicFormConfig("test");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form.title = $localize`Example form`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form.description = $localize`This is a form that can be shared as a link or embedded in a website. It can be filled by users without having an account. For example you can let participants self-register their details and just review the records within Aam Digital.`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form.entity = "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form.prefilled = { status: "new" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form.columns = [["name", "phone", "gender", "dateOfBirth", "center"]];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return [form];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoReportConfigGeneratorService.html b/documentation/injectables/DemoReportConfigGeneratorService.html new file mode 100644 index 0000000000..6b1d5d6e04 --- /dev/null +++ b/documentation/injectables/DemoReportConfigGeneratorService.html @@ -0,0 +1,609 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/reporting/demo-report-config-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : ReportEntity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DemoDataGenerator } from "../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ReportEntity } from "./report-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ChildSchoolRelation } from "../../child-dev-project/children/model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EventNote } from "../../child-dev-project/attendance/model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DemoReportConfigGeneratorService extends DemoDataGenerator<ReportEntity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        provide: DemoReportConfigGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        useClass: DemoReportConfigGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  protected generateEntities(): ReportEntity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return demoReports.map((report) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Object.assign(new ReportEntity(), report),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +const demoReports: Partial<ReportEntity>[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    title: $localize`:Name of a report:Basic Report`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    aggregationDefinitions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        query: `Child:toArray[*isActive=true]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: $localize`:Label of report query:All children`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        groupBy: ["gender"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        query: `School:toArray`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: $localize`:Label for report query:All schools`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        aggregations: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: $localize`:Label for report query:Children attending a school`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `:getRelated(${ChildSchoolRelation.ENTITY_TYPE}, schoolId)[*isActive=true].childId:unique`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: $localize`:Label for report query:Governmental schools`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `[*privateSchool!=true]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `[*privateSchool!=true]:getRelated(${ChildSchoolRelation.ENTITY_TYPE}, schoolId)[*isActive=true].childId::unique:toEntities(Child)`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: $localize`:Label for report query:Children attending a governmental school`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            groupBy: ["gender"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: $localize`:Label for report query:Private schools`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `[*privateSchool=true]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `[*privateSchool=true]:getRelated(${ChildSchoolRelation.ENTITY_TYPE}, schoolId)[*isActive=true].childId::unique:toEntities(Child)`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: $localize`:Label for report query:Children attending a private school`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            groupBy: ["gender"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    title: $localize`:Name of a report:Event Report`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    aggregationDefinitions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        query: `${EventNote.ENTITY_TYPE}:toArray[*date >= ? & date <= ?]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        groupBy: ["category"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: $localize`:Label for a report query:Events`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        aggregations: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `:getParticipantsWithAttendance(PRESENT):unique:toEntities(Child)`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            groupBy: ["gender"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: $localize`:Label for a report query:Participants`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    title: $localize`:Name of a report:Attendance Report`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mode: "exporting",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    aggregationDefinitions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        query: `${EventNote.ENTITY_TYPE}:toArray[* date >= ? & date <= ?]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        groupBy: { label: "Type", property: "category" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        subQueries: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: ":getAttendanceArray:getAttendanceReport",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            subQueries: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                label: $localize`:Name of a column of a report:Name`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                query: `.participant:toEntities(Child).name`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                query:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                  ".participant:toEntities(Child):getRelated(ChildSchoolRelation, childId)[*isActive=true]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                subQueries: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                    label: "Class",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                    query: ".schoolClass",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                    label: "School",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                    query: ".schoolId:toEntities(School).name",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                label: $localize`:Name of a column of a report:Total`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                query: `total`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                label: $localize`:Name of a column of a report:Present`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                query: `present`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                label: $localize`:Name of a column of a report:Rate`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                query: `percentage`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                label: $localize`:Name of a column of a report:Late`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +                query: `detailedStatus.LATE`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +              },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    title: $localize`:Name of a report:Materials Distributed`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    mode: "exporting",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    aggregationDefinitions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        query: `EducationalMaterial:toArray[*date >= ? & date <= ?]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        groupBy: { label: "Type", property: "materialType" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        subQueries: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: "Number of events of handing out",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `.materialAmount:count`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            label: "Total Items",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            query: `.materialAmount:sum`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoSchoolGenerator.html b/documentation/injectables/DemoSchoolGenerator.html new file mode 100644 index 0000000000..aa4215e01a --- /dev/null +++ b/documentation/injectables/DemoSchoolGenerator.html @@ -0,0 +1,637 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/child-dev-project/children/demo-data-generators/demo-school-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(config: DemoSchoolConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                config + DemoSchoolConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + provider(config: DemoSchoolConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This function returns a provider object to be used in an Angular Module configuration: + providers: [DemoSchoolGenerator.provider({count: 10})]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                config + DemoSchoolConfig + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A config object specifying the number of entities the service should generate.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + config + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : DemoSchoolConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { createEntityOfType } from "../../../core/demo-data/create-entity-of-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class DemoSchoolConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  count: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class DemoSchoolGenerator extends DemoDataGenerator<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * This function returns a provider object to be used in an Angular Module configuration:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *   `providers: [DemoSchoolGenerator.provider({count: 10})]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param config A config object specifying the number of entities the service should generate.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static provider(config: DemoSchoolConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      { provide: DemoSchoolGenerator, useClass: DemoSchoolGenerator },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      { provide: DemoSchoolConfig, useValue: config },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private readonly normalSchool = $localize`:School demo name that is connected with a school name:School`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private readonly highSchool = $localize`:School demo name that is connected with a school name:High School`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(public config: DemoSchoolConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  generateEntities(): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (let i = 1; i <= this.config.count; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const school = createEntityOfType("School", String(i));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      school["language"] = faker.helpers.arrayElement([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        $localize`:Language of a school:Hindi`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        $localize`:Language of a school:English`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        $localize`:Language of a school:Bengali`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const schoolNameWithType = $localize`:School demo name order for connecting the school name and (High) School|e.g. Example School:${faker.person.firstName()} ${faker.helpers.arrayElement(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        [this.normalSchool, this.highSchool],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      )}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const schoolNameWithLanguage = $localize`${faker.person.firstName()} ${
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        school["language"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      } Medium`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      school.name = faker.helpers.arrayElement([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        schoolNameWithType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        schoolNameWithLanguage,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      school["phone"] = faker.phone.number();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      school["privateSchool"] = faker.datatype.boolean();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      school["timing"] = faker.helpers.arrayElement([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        $localize`:School demo timing:6 a.m. - 11 a.m.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        $localize`:School demo timing:11 a.m. - 4 p.m.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        $localize`:School demo timing:6:30-11:00 and 11:30-16:00`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      school["address"] = faker.geoAddress();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      data.push(school);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoSiteSettingsGeneratorService.html b/documentation/injectables/DemoSiteSettingsGeneratorService.html new file mode 100644 index 0000000000..11a37d6ad3 --- /dev/null +++ b/documentation/injectables/DemoSiteSettingsGeneratorService.html @@ -0,0 +1,486 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/site-settings/demo-site-settings-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Generates SiteSettings entity. Defaults are defined in the SiteSettings class.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : SiteSettings[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DemoDataGenerator } from "../demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { SiteSettings } from "./site-settings";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Generates SiteSettings entity. Defaults are defined in the SiteSettings class.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class DemoSiteSettingsGeneratorService extends DemoDataGenerator<SiteSettings> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        provide: DemoSiteSettingsGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        useClass: DemoSiteSettingsGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  protected generateEntities(): SiteSettings[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return [new SiteSettings()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoTodoGeneratorService.html b/documentation/injectables/DemoTodoGeneratorService.html new file mode 100644 index 0000000000..9c22ae87d9 --- /dev/null +++ b/documentation/injectables/DemoTodoGeneratorService.html @@ -0,0 +1,671 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/features/todos/model/demo-todo-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(config: DemoTodoConfig, demoChildren: DemoChildGenerator, demoUsers: DemoUserGeneratorService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    config + DemoTodoConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    demoChildren + DemoChildGenerator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    demoUsers + DemoUserGeneratorService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Public + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Todo[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + provider(config: DemoTodoConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    config + DemoTodoConfig + + No + + { + minPerChild: 1, + maxPerChild: 2, + } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DemoDataGenerator } from "../../../core/demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DemoChildGenerator } from "../../../child-dev-project/children/demo-data-generators/demo-child-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DemoUserGeneratorService } from "../../../core/user/demo-user-generator.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { faker } from "../../../core/demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import moment from "moment/moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Todo } from "./todo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class DemoTodoConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  minPerChild: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  maxPerChild: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class DemoTodoGeneratorService extends DemoDataGenerator<Todo> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static provider(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    config: DemoTodoConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      minPerChild: 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      maxPerChild: 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      { provide: DemoTodoGeneratorService, useClass: DemoTodoGeneratorService },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      { provide: DemoTodoConfig, useValue: config },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private config: DemoTodoConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private demoChildren: DemoChildGenerator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private demoUsers: DemoUserGeneratorService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  public generateEntities(): Todo[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const data = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const child of this.demoChildren.entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (!child.isActive) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      let numberOfRecords = faker.number.int({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        min: this.config.minPerChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        max: this.config.maxPerChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      for (let i = 0; i < numberOfRecords; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        data.push(this.generateTodoForEntity(child));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private generateTodoForEntity(entity: Entity): Todo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const todo = new Todo(faker.string.alphanumeric(20));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const selectedStory = faker.helpers.arrayElement(stories);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    todo.subject = selectedStory.subject;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    todo.description = selectedStory.description;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    todo.deadline = faker.date.between({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      from: moment().subtract(5, "days").toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      to: moment().add(90, "days").toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    faker.helpers.maybe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        (todo.startDate = faker.date.between({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          from: moment(todo.deadline).subtract(25, "days").toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          to: todo.deadline,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        })),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      { probability: 0.5 },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    todo.relatedEntities = [entity.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    todo.assignedTo = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      faker.helpers.arrayElement(this.demoUsers.entities).getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return todo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +const stories: Partial<Todo>[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    subject: $localize`:demo todo record:get signed agreement`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    description: $localize`:demo todo record:We have fixed all the details but still have to put it in writing.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    subject: $localize`:demo todo record:follow up`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    description: $localize`:demo todo record:Call to follow up on the recent developments.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    subject: $localize`:demo todo record:call family`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    description: $localize`:demo todo record:Check about the latest incident.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    subject: $localize`:demo todo record:plan career counselling`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    description: $localize`:demo todo record:Personalized plan for the next discussion has to be prepared.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DemoUserGeneratorService.html b/documentation/injectables/DemoUserGeneratorService.html new file mode 100644 index 0000000000..ae04fe0eff --- /dev/null +++ b/documentation/injectables/DemoUserGeneratorService.html @@ -0,0 +1,605 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/user/demo-user-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Generate demo users for the application with its DemoDataModule.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + DemoDataGenerator +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + generateEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + generateEntities() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Generate User entities to be loaded by the DemoDataModule.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + provider + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + provider() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This function returns a provider object to be used in an Angular Module configuration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      providers: [DemoUserGeneratorService.provider()]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Remove all previously generated entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + ADMIN_USERNAME + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "demo-admin" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + DEFAULT_USERNAME + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : TEST_USER +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      the username of the basic account generated by this demo service

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + _entities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DemoDataGenerator +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      internally used array of the generated entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { DemoDataGenerator } from "../demo-data/demo-data-generator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { faker } from "../demo-data/faker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { createEntityOfType } from "../demo-data/create-entity-of-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export const TEST_USER = "demo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Generate demo users for the application with its DemoDataModule.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class DemoUserGeneratorService extends DemoDataGenerator<Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** the username of the basic account generated by this demo service */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static DEFAULT_USERNAME = TEST_USER;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static ADMIN_USERNAME = "demo-admin";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This function returns a provider object to be used in an Angular Module configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @return `providers: [DemoUserGeneratorService.provider()]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static provider() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      { provide: DemoUserGeneratorService, useClass: DemoUserGeneratorService },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Generate User entities to be loaded by the DemoDataModule.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  public generateEntities(): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const users = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const demoUser = createEntityOfType(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      "User",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      DemoUserGeneratorService.DEFAULT_USERNAME,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    demoUser.name = DemoUserGeneratorService.DEFAULT_USERNAME;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const demoAdmin = createEntityOfType(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      "User",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      DemoUserGeneratorService.ADMIN_USERNAME,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    demoAdmin.name = DemoUserGeneratorService.ADMIN_USERNAME;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    users.push(demoUser, demoAdmin);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const userNames = new Set<string>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    while (userNames.size < 10) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      userNames.add(faker.person.firstName());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const name of userNames) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const user = createEntityOfType("User", name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      user.name = name;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      user.phone = faker.phone.number();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      users.push(user);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return users;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DownloadService.html b/documentation/injectables/DownloadService.html new file mode 100644 index 0000000000..03c5cf40ff --- /dev/null +++ b/documentation/injectables/DownloadService.html @@ -0,0 +1,922 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/export/download-service/download.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This service allows to start a download process from the browser. +Depending on the browser and the setting this might open a popup or directly download the file.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(dataTransformationService: DataTransformationService, papa: Papa, entityMapperService: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        dataTransformationService + DataTransformationService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        papa + Papa + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + createCsv + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + createCsv(data: any[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Creates a CSV string of the input data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        data + any[] + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        an array of elements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<string> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        string a valid CSV string of the input data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + exportFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + exportFile(data: any[], entityConstructor: EntityConstructor) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        data + any[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityConstructor + EntityConstructor + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + triggerDownload + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + triggerDownload(data: any, format: ExportDataFormat, filename: string, exportConfig?: ExportColumnConfig[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Starts the download process with the provided data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        data + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        content of the file that will be downloaded

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        format + ExportDataFormat + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        extension of the file that will be downloaded, support is 'csv' and 'json'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        filename + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        of the file that will be downloaded

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        exportConfig + ExportColumnConfig[] + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        special configuration that will be applied to the 'data' before triggering the download

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + Readonly + SEPARATOR_COL + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "," +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        CSV column/field separator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + Readonly + SEPARATOR_ROW + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "\n" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        CSV row separator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ExportColumnConfig } from "../data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ExportDataFormat } from "../export-data-directive/export-data.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DataTransformationService } from "../data-transformation-service/data-transformation.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { transformToReadableFormat } from "../../common-components/entities-table/value-accessor/value-accessor";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Papa } from "ngx-papaparse";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity, EntityConstructor } from "app/core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityDatatype } from "app/core/basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityMapperService } from "app/core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This service allows to start a download process from the browser.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Depending on the browser and the setting this might open a popup or directly download the file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class DownloadService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** CSV row separator */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static readonly SEPARATOR_ROW = "\n";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** CSV column/field separator */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static readonly SEPARATOR_COL = ",";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private dataTransformationService: DataTransformationService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private papa: Papa,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Starts the download process with the provided data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data content of the file that will be downloaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param format extension of the file that will be downloaded, support is 'csv' and 'json'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param filename of the file that will be downloaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param exportConfig special configuration that will be applied to the 'data' before triggering the download
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async triggerDownload(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    format: ExportDataFormat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    filename: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    exportConfig?: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const blobData = await this.getFormattedBlobData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      format,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      exportConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const filenameWithExtension = filename + "." + format.toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const link = this.createDownloadLink(blobData, filenameWithExtension);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    link.click();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private async getFormattedBlobData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    format: ExportDataFormat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    exportConfig?: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Promise<Blob> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let result = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (exportConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data = await this.dataTransformationService.transformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        exportConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    switch (format.toLowerCase()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      case "json":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        result = typeof data === "string" ? data : JSON.stringify(data); // TODO: support exportConfig for json format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return new Blob([result], { type: "application/json" });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      case "csv":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        result = await this.createCsv(data);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return new Blob([result], { type: "text/csv" });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        Logging.warn(`Not supported format: ${format}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return new Blob([""]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private createDownloadLink(blobData, filename: string): HTMLAnchorElement {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const link = document.createElement("a");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    link.setAttribute("style", "display:none;");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    document.body.appendChild(link);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    link.href = window.URL.createObjectURL(blobData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    link.download = filename;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    link.addEventListener("click", () => window.URL.revokeObjectURL(blobData));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return link;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Creates a CSV string of the input data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data an array of elements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns string a valid CSV string of the input data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async createCsv(data: any[]): Promise<string> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let entityConstructor: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (data.length > 0 && typeof data[0]?.getConstructor === "function") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      entityConstructor = data[0].getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const keys = new Set<string>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data.forEach((row) => Object.keys(row).forEach((key) => keys.add(key)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data = data.map(transformToReadableFormat);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!entityConstructor) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this.papa.unparse(data, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        quotes: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        header: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newline: DownloadService.SEPARATOR_ROW,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        columns: [...keys],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const result = await this.exportFile(data, entityConstructor);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async exportFile(data: any[], entityConstructor: EntityConstructor) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const entitySchema = entityConstructor.schema;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const columnLabels = new Map<string, string>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const [id, field] of entitySchema.entries()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (!field.label) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        // skip "technical" fields without an explicit label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      columnLabels.set(id, field.label);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (field.dataType === EntityDatatype.dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        columnLabels.set(id + "_readable", field.label + " (readable)");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const exportEntities = await Promise.all(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data.map((item) => this.mapEntityToExportRow(item, columnLabels)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const columnKeys: string[] = Array.from(columnLabels.keys());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const labels: any[] = Array.from(columnLabels.values());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const orderedData: any[] = exportEntities.map((item) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      columnKeys.map((key) => item[key]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.papa.unparse(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        fields: labels,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        data: orderedData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        quotes: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newline: DownloadService.SEPARATOR_ROW,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private async mapEntityToExportRow(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    item: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    columnLabels: Map<string, string>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Promise<Object> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const newItem = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const key in item) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (columnLabels.has(key)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newItem[key] = item[key];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (columnLabels.has(key + "_readable")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newItem[key + "_readable"] = await this.loadRelatedEntitiesToString(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          item[key],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return newItem;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private async loadRelatedEntitiesToString(value: string | string[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const relatedEntitiesToStrings: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const relatedEntitiesIds: string[] = Array.isArray(value) ? value : [value];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const relatedEntityId of relatedEntitiesIds) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      relatedEntitiesToStrings.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          await this.entityMapperService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            .load(Entity.extractTypeFromId(relatedEntityId), relatedEntityId)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            .catch((e) => "<not_found>")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ).toString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return relatedEntitiesToStrings;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DuplicateRecordService.html b/documentation/injectables/DuplicateRecordService.html new file mode 100644 index 0000000000..698a47c8a7 --- /dev/null +++ b/documentation/injectables/DuplicateRecordService.html @@ -0,0 +1,512 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/entity-list/duplicate-records/duplicate-records.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(entitymapperservice: EntityMapperService, entityTypes: EntityRegistry, entityService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entitymapperservice + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityTypes + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + clone + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +clone(sourceData: Entity[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sourceData + Entity[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + duplicateRecord + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + duplicateRecord(sourceData: Entity[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sourceData + Entity[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class DuplicateRecordService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entitymapperservice: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityTypes: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async duplicateRecord(sourceData: Entity[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const duplicateData = this.clone(sourceData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return await this.entitymapperservice.saveAll(duplicateData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  clone(sourceData: Entity[]): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const duplicateData = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    sourceData.map((item: Entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const entityConstructor = item.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const keys = [...entityConstructor.schema.keys()].filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (key) => key !== "_id" && key !== "_rev",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const dbEntity = this.entityService.transformEntityToDatabaseFormat(item);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const entityformat = this.entityService.transformDatabaseToEntityFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        dbEntity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        entityConstructor.schema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const entity = new entityConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const nameAttribute = entityConstructor.toStringAttributes[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      for (const key of keys) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (nameAttribute === key && nameAttribute !== "entityId") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          entityformat[key] = `Copy of ${entityformat[key]}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        entity[key] = entityformat[key];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      duplicateData.push(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return duplicateData;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DynamicPlaceholderValueService.html b/documentation/injectables/DynamicPlaceholderValueService.html new file mode 100644 index 0000000000..95ff65e39b --- /dev/null +++ b/documentation/injectables/DynamicPlaceholderValueService.html @@ -0,0 +1,628 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/default-values/dynamic-placeholder-value.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A simple default-value strategy that replaces placeholder strings with dynamic values, like the current date or user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + DefaultValueStrategy +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(currentUser: CurrentUserSubject) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + setDefaultValue + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +setDefaultValue(targetFormControl: AbstractControl, fieldConfig: EntitySchemaField) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultValueStrategy +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            targetFormControl + AbstractControl<any | any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fieldConfig + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + initEntityForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + initEntityForm(form: EntityForm<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultValueStrategy +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + onFormValueChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + onFormValueChanges(form: EntityForm<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultValueStrategy +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { AbstractControl } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  PLACEHOLDERS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { CurrentUserSubject } from "../session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Logging } from "../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DefaultValueStrategy } from "./default-value-strategy.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * A simple default-value strategy that replaces placeholder strings with dynamic values, like the current date or user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class DynamicPlaceholderValueService extends DefaultValueStrategy {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(private currentUser: CurrentUserSubject) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    targetFormControl: AbstractControl<any, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    switch (fieldConfig.defaultValue.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      case PLACEHOLDERS.NOW:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        let now = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (fieldConfig.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          targetFormControl.setValue([now]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          targetFormControl.setValue(now);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      case PLACEHOLDERS.CURRENT_USER:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        let userId = this.currentUser.value?.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (!userId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (fieldConfig.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          targetFormControl.setValue([userId]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          targetFormControl.setValue(userId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          "Unknown PLACEHOLDERS value used in fieldValueConfig: " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            fieldConfig.defaultValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/DynamicValidatorsService.html b/documentation/injectables/DynamicValidatorsService.html new file mode 100644 index 0000000000..65d1368349 --- /dev/null +++ b/documentation/injectables/DynamicValidatorsService.html @@ -0,0 +1,602 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/common-components/entity-form/dynamic-form-validators/dynamic-validators.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Public + buildValidators + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + buildValidators(config: FormValidatorConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Builds all validator functions that are part of the configuration object. +A validator function is a function that returns possible errors based +on the state of a Form Field. +If there is no Validator by a given name, issues a warning.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> buildValidators({ required: true, max: 5 })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +[ Validators.required, Validators.max(5) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +See ValidatorFn
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              config + FormValidatorConfig + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The raw configuration object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : FormControlOptions + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicValidator, FormValidatorConfig } from "./form-validator-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  AbstractControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormControlOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ValidationErrors,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ValidatorFn,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { uniqueIdValidator } from "../unique-id-validator/unique-id-validator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * creates a pattern validator that also carries a predefined
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * @param pattern The pattern to check
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * @param message The custom message to display when the pattern fails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * >>> validator = patternWithMessage(/foo/, "Can only be foo");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * >>> validator(invalidFormField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * <pre>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *   message: "Can only be foo",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *   requiredPattern: "foo",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *   actualValue: "bar"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * </pre>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export function patternWithMessage(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  pattern: string | RegExp,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +): ValidatorFn {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  const patternValidator = Validators.pattern(pattern);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  return (control: AbstractControl) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const errors = patternValidator(control);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (errors !== null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Object.assign(errors.pattern, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        message: message,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return errors;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DynamicValidatorsService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * A map of all validators along with a factory that generates the validator function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * given a value that serves as basis for the validation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private getValidator(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    key: DynamicValidator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    value: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    | { async?: false; fn: ValidatorFn }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    | {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        async: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        fn: AsyncPromiseValidatorFn;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    | null {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    switch (key) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "min":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return { fn: Validators.min(value as number) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "max":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return { fn: Validators.max(value as number) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "pattern":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        if (typeof value === "object") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          return { fn: patternWithMessage(value.pattern, value.message) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          return { fn: Validators.pattern(value as string) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "validEmail":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return value ? { fn: Validators.email } : null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "uniqueId":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return value ? this.buildUniqueIdValidator(value) : null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "required":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return value ? { fn: Validators.required } : null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          `Trying to generate validator ${key} but it does not exist`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(private entityMapper: EntityMapperService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Builds all validator functions that are part of the configuration object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * A validator function is a function that returns possible errors based
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * on the state of a Form Field.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * If there is no Validator by a given name, issues a warning.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param config The raw configuration object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @example
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * >>> buildValidators({ required: true, max: 5 })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * [ Validators.required, Validators.max(5) ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @see ValidatorFn
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  public buildValidators(config: FormValidatorConfig): FormControlOptions {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const formControlOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      validators: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      asyncValidators: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const key of Object.keys(config)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const validatorFn = this.getValidator(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        key as DynamicValidator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        config[key],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (validatorFn?.async) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const validatorFnWithReadableErrors = (control) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          validatorFn
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            .fn(control)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            .then((res) => this.addHumanReadableError(key, res));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        formControlOptions.asyncValidators.push(validatorFnWithReadableErrors);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else if (validatorFn) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const validatorFnWithReadableErrors = (control: FormControl) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          this.addHumanReadableError(key, validatorFn.fn(control));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        formControlOptions.validators.push(validatorFnWithReadableErrors);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // A validator function of `null` is a legal case, for which no validator function is added.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // For example `{ required : false }` produces a `null` validator function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (formControlOptions.asyncValidators.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (formControlOptions as FormControlOptions).updateOn = "blur";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return formControlOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private addHumanReadableError(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    validatorType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    validationResult: ValidationErrors | null,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): ValidationErrors {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!validationResult) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return validationResult;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    validationResult[validatorType] = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ...validationResult[validatorType],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      errorMessage: this.descriptionForValidator(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        validatorType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        validationResult[validatorType],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return validationResult;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * returns a description for a validator given the value where it failed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The value is specific for a certain validator. For example, the `min` validator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * produces a value that could look something like `{ min: 5, current: 4 }`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param validator The validator to get the description for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param validationValue The value associated with the validator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private descriptionForValidator(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    validator: DynamicValidator | string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    validationValue: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    switch (validator) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "min":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return $localize`Must be greater than ${validationValue.min}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "max":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return $localize`Cannot be greater than ${validationValue.max}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "pattern":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        if (validationValue.message) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          return validationValue.message;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          return $localize`Please enter a valid pattern`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "required":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return $localize`This field is required`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "validEmail":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return $localize`Please enter a valid email`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "matDatepickerParse":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return $localize`Please enter a valid date`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "isNumber":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return $localize`Please enter a valid number`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      case "uniqueId":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return validationValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.error(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          `No description defined for validator "${validator}": ${JSON.stringify(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            validationValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          )}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        throw $localize`Invalid input`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private buildUniqueIdValidator(value: string): {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    async: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    fn: AsyncPromiseValidatorFn;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  } {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fn: uniqueIdValidator(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          .loadType(value)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          // TODO: extend this to allow checking for any configurable property (e.g. Child.name rather than only id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          .then((entities) => entities.map((entity) => entity.getId())),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      async: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export type AsyncPromiseValidatorFn = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  control: FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +) => Promise<ValidationErrors | null>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityAbility.html b/documentation/injectables/EntityAbility.html new file mode 100644 index 0000000000..305b470d1c --- /dev/null +++ b/documentation/injectables/EntityAbility.html @@ -0,0 +1,602 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/permissions/ability/entity-ability.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                An extension of the Ability class which can check permissions on Entities. +Inject this class in your component to check for permissions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                e.g.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                export class ExampleComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(private ability: EntityAbility) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.ability.can("update", new Child());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Entities are transformed to the database format and permissions are evaluated based on the configuration found in the database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Ability +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(entitySchemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entitySchemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + can + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + can(action: EntityActionPermission, entity: EntitySubject, field?: string, enforceConditions?: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                action + EntityActionPermission + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + EntitySubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                field + string + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                enforceConditions + boolean + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + cannot + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + cannot(action: EntityActionPermission, entity: EntitySubject, field?: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                action + EntityActionPermission + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + EntitySubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                field + string + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityActionPermission, EntitySubject } from "../permission-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Ability, subject } from "@casl/ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * An extension of the Ability class which can check permissions on Entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Inject this class in your component to check for permissions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * e.g.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * export class ExampleComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *   constructor(private ability: EntityAbility) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *     this.ability.can("update", new Child());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *   }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Entities are transformed to the database format and permissions are evaluated based on the configuration found in the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class EntityAbility extends Ability<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [EntityActionPermission, string | any]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(private entitySchemaService: EntitySchemaService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super([]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override can(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    action: EntityActionPermission,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: EntitySubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    field?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    enforceConditions?: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (action === "create" && !enforceConditions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const rules = this.rules.map((r) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const simplifiedRule = { ...r };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        delete simplifiedRule.conditions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        return simplifiedRule;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const abilityWithoutConditions = new Ability(rules);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return abilityWithoutConditions.can(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        action,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.getSubject(entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        field,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return super.can(action, this.getSubject(entity), field);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override cannot(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    action: EntityActionPermission,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: EntitySubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    field?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return super.cannot(action, this.getSubject(entity), field);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private getSubject(entity: EntitySubject): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !entity ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      typeof entity === "string" ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity["__caslSubjectType__"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // This happens in case the subject has already been processed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else if (entity instanceof Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return subject(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        entity.getType(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.entitySchemaService.transformEntityToDatabaseFormat(entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else if (entity.ENTITY_TYPE) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return entity.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      throw new Error(`${JSON.stringify(entity)} is not a valid subject`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityActionsMenuService.html b/documentation/injectables/EntityActionsMenuService.html new file mode 100644 index 0000000000..2873908525 --- /dev/null +++ b/documentation/injectables/EntityActionsMenuService.html @@ -0,0 +1,395 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-details/entity-actions-menu/entity-actions-menu.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Register and access actions that can be performed on an entity +and displayed to users in the entity details context menu.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Feature Modules can register additional actions here.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TODO: rename existing EntityActionsService to avoid confusions? (I would prefer this one here to be called EntityActionsService)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + getActions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +getActions() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : {} + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + registerActions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +registerActions(newActions: EntityAction[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  newActions + EntityAction[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityAction } from "./entity-action.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Register and access actions that can be performed on an entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * and displayed to users in the entity details context menu.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Feature Modules can register additional actions here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * TODO: rename existing EntityActionsService to avoid confusions? (I would prefer this one here to be called EntityActionsService)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class EntityActionsMenuService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private actions: EntityAction[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  getActions() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.actions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  registerActions(newActions: EntityAction[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.actions.push(...newActions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityActionsService.html b/documentation/injectables/EntityActionsService.html new file mode 100644 index 0000000000..f5c613ca88 --- /dev/null +++ b/documentation/injectables/EntityActionsService.html @@ -0,0 +1,1138 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity/entity-actions/entity-actions.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    A service that can triggers a user flow for entity actions (e.g. to safely remove or anonymize an entity), +including a confirmation dialog.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(confirmationDialog: ConfirmationDialogService, snackBar: MatSnackBar, router: Router, entityMapper: EntityMapperService, entityDelete: EntityDeleteService, entityAnonymize: EntityAnonymizeService, entityActionsMenuService: EntityActionsMenuService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    snackBar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityDelete + EntityDeleteService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityAnonymize + EntityAnonymizeService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityActionsMenuService + EntityActionsMenuService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + anonymize(entityParam: E | E[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Anonymize the given entity, +removing properties that are not explicitly configured in the schema to be retained.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This triggers UX interactions like confirmation request dialog and snackbar message as well.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityParam + E | E[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + archive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + archive(entityParam: E | E[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Mark the given entity as inactive.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityParam + E | E[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + delete + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + delete(entityParam: E | E[], navigate: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shows a confirmation dialog to the user +and removes the entity if the user confirms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This also triggers a toast message, enabling the user to undo the action.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityParam + E | E[] + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The entity to remove

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    navigate + boolean + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    whether upon delete the app will navigate back

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + showSnackbarConfirmationWithUndo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +showSnackbarConfirmationWithUndo(message: string, previousEntitiesForUndo: Entity[], navigateBackToUrl?: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    message + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    previousEntitiesForUndo + Entity[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    navigateBackToUrl + string + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + undoArchive + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + undoArchive(entityParam: E | E[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Undo the archive action on the given entity or entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityParam + E | E[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfirmationDialogService } from "../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { getUrlWithoutParams } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityDeleteService } from "./entity-delete.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityAnonymizeService } from "./entity-anonymize.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { OkButton } from "../../common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { CascadingActionResult } from "./cascading-entity-action";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityActionsMenuService } from "../../entity-details/entity-actions-menu/entity-actions-menu.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * A service that can triggers a user flow for entity actions (e.g. to safely remove or anonymize an entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * including a confirmation dialog.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class EntityActionsService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private snackBar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityDelete: EntityDeleteService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityAnonymize: EntityAnonymizeService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    entityActionsMenuService: EntityActionsMenuService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    entityActionsMenuService.registerActions([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        action: "archive",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        execute: (e) => this.archive(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        permission: "update",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        icon: "box-archive",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        label: $localize`:entity context menu:Archive`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        tooltip: $localize`:entity context menu tooltip:Mark the record as inactive, hiding it from lists by default while keeping the data.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        primaryAction: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        action: "anonymize",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        execute: (e) => this.anonymize(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        permission: "update",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        icon: "user-secret",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        label: $localize`:entity context menu:Anonymize`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        tooltip: $localize`:entity context menu tooltip:Remove all personal data and keep an archived basic record for statistical reporting.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        action: "delete",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        execute: (e, nav) => this.delete(e, nav),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        permission: "delete",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        icon: "trash",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        label: $localize`:entity context menu:Delete`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        tooltip: $localize`:entity context menu tooltip:Remove the record completely from the database.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  showSnackbarConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    previousEntitiesForUndo: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    navigateBackToUrl?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const snackBarRef = this.snackBar.open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      message,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      $localize`:Undo an entity action:Undo`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        duration: 8000,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // Undo Action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    snackBarRef.onAction().subscribe(async () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const undoProgressRef = this.confirmationDialog.showProgressDialog(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Undo entity action progress dialog: Reverting changes ...`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.entityMapper.saveAll(previousEntitiesForUndo, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      undoProgressRef.close();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (navigateBackToUrl) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        await this.router.navigate([navigateBackToUrl]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Shows a confirmation dialog to the user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * and removes the entity if the user confirms.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This also triggers a toast message, enabling the user to undo the action.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param entityParam The entity to remove
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param navigate whether upon delete the app will navigate back
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async delete<E extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    entityParam: E | E[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    navigate: boolean = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let textForDeleteEntity = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let entities = Array.isArray(entityParam) ? entityParam : [entityParam];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (entities.length > 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      textForDeleteEntity =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Demonstrative pronoun plural:these` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities.length +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].getConstructor().labelPlural;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      textForDeleteEntity =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Definite article singular:the` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].getConstructor().label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ' "' +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].toString() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        '"';
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      !(await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Delete confirmation title:Delete?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Delete confirmation dialog:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        This will remove the data permanently as if it never existed. This cannot be undone. Statistical reports (also for past time periods) will change and not include this record anymore.\n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        If you have not just created a record accidentally, deleting this is probably not what you want to do. If a record represents something that actually happened in your work, consider to use "anonymize" or just "archive" instead, so that you will not lose your documentation for reports.\n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        Are you sure you want to delete ${textForDeleteEntity}?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const progressDialogRef = this.confirmationDialog.showProgressDialog(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      $localize`:Entity action progress dialog:Processing ...`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let result = new CascadingActionResult();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (let entity of entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      result.mergeResults(await this.entityDelete.deleteEntity(entity, true));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    progressDialogRef.close();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (result.potentiallyRetainingPII.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:post-delete related PII warning title:Related records may still contain personal data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:post-delete related PII warning dialog:Some related records (e.g. notes) may still contain personal data in their text. We have automatically deleted all records that are linked to ONLY ${textForDeleteEntity}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        However, there are some records that are linked to multiple records. We have not deleted these, so that you will not lose relevant data. Please review them manually to ensure all sensitive information is removed, if required (e.g. by looking through the linked notes and editing a note's text).`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        OkButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let currentUrl: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (navigate) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      currentUrl = getUrlWithoutParams(this.router);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const parentUrl = currentUrl.substring(0, currentUrl.lastIndexOf("/"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.router.navigate([parentUrl]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.showSnackbarConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.generateMessageForConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities.length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          ? entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          : [result.originalEntitiesBeforeChange[0]],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Entity action confirmation message verb:deleted`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      result.originalEntitiesBeforeChange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      currentUrl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Anonymize the given entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * removing properties that are not explicitly configured in the schema to be retained.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This triggers UX interactions like confirmation request dialog and snackbar message as well.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param entityParam
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async anonymize<E extends Entity>(entityParam: E | E[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let entities = Array.isArray(entityParam) ? entityParam : [entityParam];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let textForAnonymizeEntity = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (entities.length > 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      textForAnonymizeEntity =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Demonstrative pronoun plural:these` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities.length +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].getConstructor().labelPlural;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      textForAnonymizeEntity =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Definite article singular:the` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].getConstructor().label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ' "' +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].toString() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        '"';
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      !(await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Anonymize confirmation dialog:Anonymize?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Anonymize confirmation dialog:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        This will remove all personal information (PII) permanently and keep only a basic record for statistical reports. Details that are removed during anonymization cannot be recovered.\n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        If a record has only become inactive and you want to keep all details, consider to use "archive" instead.\n
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        Are you sure you want to anonymize ${textForAnonymizeEntity}?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const progressDialogRef = this.confirmationDialog.showProgressDialog(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      $localize`:Entity action progress dialog:Processing ...`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let result = new CascadingActionResult();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (let entity of entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      result.mergeResults(await this.entityAnonymize.anonymizeEntity(entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    progressDialogRef.close();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (result.potentiallyRetainingPII.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:post-anonymize related PII warning title:Related records may still contain personal data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:post-anonymize related PII warning dialog:Some related records (e.g. notes) may still contain personal data in their text. We have automatically anonymized all records that are linked to ONLY ${textForAnonymizeEntity}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        However, there are some records that are linked to multiple records. We have not anonymized these, so that you will not lose relevant data. Please review them manually to ensure all sensitive information is removed (e.g. by looking through the linked notes and editing a note's text).`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        OkButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.showSnackbarConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.generateMessageForConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities.length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          ? entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          : [result.originalEntitiesBeforeChange[0]],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Entity action confirmation message verb:anonymized`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      result.originalEntitiesBeforeChange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Mark the given entity as inactive.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async archive<E extends Entity>(entityParam: E | E[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let originalEntities: E[] = Array.isArray(entityParam)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ? entityParam
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      : [entityParam];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const newEntities: E[] = originalEntities.map((e) => e.copy());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    newEntities.forEach(async (e) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      e.inactive = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.entityMapper.save(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.showSnackbarConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.generateMessageForConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        newEntities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Entity action confirmation message verb:archived`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      originalEntities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Undo the archive action on the given entity or entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async undoArchive<E extends Entity>(entityParam: E | E[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let newEntities: E[] = Array.isArray(entityParam)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ? entityParam
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      : [entityParam];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const originalEntities: E[] = newEntities.map((e) => e.copy());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    newEntities.forEach(async (e) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      e.inactive = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.entityMapper.save(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.showSnackbarConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.generateMessageForConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        newEntities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Entity action confirmation message verb:reactivated`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      originalEntities,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private generateMessageForConfirmationWithUndo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    entities: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    action: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (entities.length > 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return $localize`:Entity action confirmation message:${entities.length} ${
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].getConstructor().labelPlural
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      } ${action}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return $localize`:Entity action confirmation message:${
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entities[0].getConstructor().label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      } "${entities.toString()}" ${action}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityAnonymizeService.html b/documentation/injectables/EntityAnonymizeService.html new file mode 100644 index 0000000000..a0a16b3d9f --- /dev/null +++ b/documentation/injectables/EntityAnonymizeService.html @@ -0,0 +1,634 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/entity/entity-actions/entity-anonymize.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Anonymize an entity including handling references with related entities. +This service is usually used in combination with the EntityActionsService, which provides user confirmation processes around this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + CascadingEntityAction +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(entityMapper: EntityMapperService, schemaService: EntitySchemaService, fileService: FileService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      fileService + FileService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + anonymizeEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + anonymizeEntity(entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The actual anonymize action without user interactions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Protected + Async + cascadeActionToRelatedEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + cascadeActionToRelatedEntities(entity: Entity, compositeAction: (relatedEntity: Entity,refField: string,entity: Entity) => void, aggregateAction: (relatedEntity: Entity,refField: string,entity: Entity) => void) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from CascadingEntityAction +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Recursively call the given actions on all related entities that contain a reference to the given entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Returns an array of all affected related entities (excluding the given entity) in their state before the action +to support an undo action.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      compositeAction + function + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      aggregateAction + function + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityMapperService } from "../entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntitySchemaService } from "../schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  CascadingActionResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  CascadingEntityAction,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "./cascading-entity-action";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { firstValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FileDatatype } from "../../../features/file/file.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FileService } from "../../../features/file/file.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { asArray } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Anonymize an entity including handling references with related entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * This service is usually used in combination with the `EntityActionsService`, which provides user confirmation processes around this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EntityAnonymizeService extends CascadingEntityAction {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    protected override entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    protected override schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private fileService: FileService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super(entityMapper, schemaService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The actual anonymize action without user interactions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async anonymizeEntity(entity: Entity): Promise<CascadingActionResult> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!entity.getConstructor().hasPII) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // entity types that are generally without PII by default retain all fields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // this should only be called through a cascade action anyway
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return new CascadingActionResult();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const originalEntity = entity.copy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const [key, schema] of entity.getSchema().entries()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (entity[key] === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      switch (schema.anonymize) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        case "retain":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        case "retain-anonymized":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          await this.anonymizeProperty(entity, key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          await this.removeProperty(entity, key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    entity.anonymized = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    entity.inactive = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    await this.entityMapper.save(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const cascadeResult = await this.cascadeActionToRelatedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      (e) => this.anonymizeEntity(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      (e) => this.keepEntityUnchanged(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return new CascadingActionResult([originalEntity]).mergeResults(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      cascadeResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async anonymizeProperty(entity: Entity, key: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const dataType = this.schemaService.getDatatypeOrDefault(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      entity.getSchema().get(key).dataType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let anonymizedValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (entity.getSchema().get(key).isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      anonymizedValue = await Promise.all(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        asArray(entity[key]).map((v) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          dataType.anonymize(v, entity.getSchema().get(key), entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      anonymizedValue = await dataType.anonymize(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        entity[key],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        entity.getSchema().get(key),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    entity[key] = anonymizedValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async removeProperty(entity: Entity, key: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      entity.getSchema().get(key).dataType === FileDatatype.dataType &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      entity[key]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      await firstValueFrom(this.fileService.removeFile(entity, key));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (entity[key] !== undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      entity[key] = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async keepEntityUnchanged(e: Entity): Promise<CascadingActionResult> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return new CascadingActionResult([], e.getConstructor().hasPII ? [e] : []);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityConfigService.html b/documentation/injectables/EntityConfigService.html new file mode 100644 index 0000000000..48f79f2716 --- /dev/null +++ b/documentation/injectables/EntityConfigService.html @@ -0,0 +1,1069 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/entity/entity-config.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A service that allows to work with configuration-objects +related to entities such as assigning dynamic attributes +and their schemas to existing entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(configService: ConfigService, entities: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Public + addConfigAttributes + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + addConfigAttributes(entityType: EntityConstructor, configAttributes?: EntityConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Appends the given (dynamic) attributes to the schema of the provided Entity. +If no arguments are provided, they will be loaded from the config

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityType + EntityConstructor + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The type to add the attributes to

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        configAttributes + EntityConfig + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The attributes to add

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + getDetailsViewConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +getDetailsViewConfig(entityType: EntityConstructor) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityType + EntityConstructor + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + getDetailsViewId + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getDetailsViewId(entityConfig: EntityConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityConfig + EntityConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Public + getEntityConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getEntityConfig(entityType: EntityConstructor) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Returns the EntityConfig from the config service that contains additional +fields for a certain entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityType + EntityConstructor + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The type to get the config for

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : EntityConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + getListViewConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +getListViewConfig(entityType: EntityConstructor) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityType + EntityConstructor + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + getListViewId + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + getListViewId(entityConfig: EntityConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityConfig + EntityConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + setupEntitiesFromConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +setupEntitiesFromConfig() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Assigns additional schema-fields to all entities that are +defined inside the config. Entities that are not registered +using the DatabaseEntity-Decorator won't work and will +trigger an error message

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + Readonly + PREFIX_ENTITY_CONFIG + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + will become private, use the service to access the data +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "entity:" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity, EntityConstructor } from "./model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ConfigService } from "../config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityRegistry } from "./database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { IconName } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityConfig } from "./entity-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { addPropertySchema } from "./database-field.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  PREFIX_VIEW_CONFIG,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ViewConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "../config/dynamic-routing/view-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitySchemaField } from "./schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitySchema } from "./schema/entity-schema";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityDetailsConfig } from "../entity-details/EntityDetailsConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityListConfig } from "../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * A service that allows to work with configuration-objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * related to entities such as assigning dynamic attributes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * and their schemas to existing entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class EntityConfigService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** @deprecated will become private, use the service to access the data */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static readonly PREFIX_ENTITY_CONFIG = "entity:";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  // TODO remove this?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** original initial entity schemas without overrides from config */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private coreEntitySchemas = new Map<string, EntitySchema>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static getDetailsViewId(entityConfig: EntityConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.getListViewId(entityConfig) + "/:id";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static getListViewId(entityConfig: EntityConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return PREFIX_VIEW_CONFIG + entityConfig.route.replace(/^\//, "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  // TODO: merge with EntityRegistry?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.storeCoreEntitySchemas();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private storeCoreEntitySchemas() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.entities.forEach((ctr, key) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.coreEntitySchemas.set(key, this.deepCopySchema(ctr.schema));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private deepCopySchema(schema: EntitySchema): EntitySchema {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return new Map<string, EntitySchemaField>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      JSON.parse(JSON.stringify(Array.from(schema))),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Assigns additional schema-fields to all entities that are
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * defined inside the config. Entities that are not registered
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * using the {@link DatabaseEntity}-Decorator won't work and will
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * trigger an error message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  setupEntitiesFromConfig() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const config of this.configService.getAllConfigs<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      EntityConfig & { _id: string }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    >(EntityConfigService.PREFIX_ENTITY_CONFIG)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const id = config._id.substring(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        EntityConfigService.PREFIX_ENTITY_CONFIG.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (!this.entities.has(id)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.createNewEntity(id, config.extends);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const ctor = this.entities.get(id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.setCoreSchemaAttributes(ctor, config.extends);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.addConfigAttributes(ctor, config);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private createNewEntity(id: string, parent: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const parentClass = this.entities.has(parent)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ? this.entities.get(parent)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      : Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const schema = this.deepCopySchema(parentClass.schema);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    class DynamicClass extends parentClass {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      static override schema = schema;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      static override ENTITY_TYPE = id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.entities.set(id, DynamicClass);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Set field definitons from the core schema to ensure undoing customized attributes is correctly applied.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param parent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private setCoreSchemaAttributes(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType: EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    parent: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const coreEntityId = parent ?? entityType.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const coreSchema =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.coreEntitySchemas.get(coreEntityId) ?? Entity.schema;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const [key, value] of coreSchema.entries()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      addPropertySchema(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        entityType.prototype,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        JSON.parse(JSON.stringify(value)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Appends the given (dynamic) attributes to the schema of the provided Entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * If no arguments are provided, they will be loaded from the config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param entityType The type to add the attributes to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param configAttributes The attributes to add
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  public addConfigAttributes<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType: EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    configAttributes?: EntityConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const entityConfig = configAttributes || this.getEntityConfig(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const [key, value] of Object.entries(entityConfig?.attributes ?? {})) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      delete value["_isCustomizedField"]; // clean up previous flag that is not deprecated
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      addPropertySchema(entityType.prototype, key, value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // TODO: shall we just assign all properties that are present in the config object?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType.toStringAttributes =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      entityConfig.toStringAttributes ?? entityType.toStringAttributes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType.label = entityConfig.label ?? entityType.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType.labelPlural = entityConfig.labelPlural ?? entityType.labelPlural;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType.icon = (entityConfig.icon as IconName) ?? entityType.icon;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType.color = entityConfig.color ?? entityType.color;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType.route = entityConfig.route ?? entityType.route;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType.hasPII = entityConfig.hasPII ?? entityType.hasPII;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType._isCustomizedType = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Returns the `EntityConfig` from the config service that contains additional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * fields for a certain entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param entityType The type to get the config for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  public getEntityConfig(entityType: EntityConstructor): EntityConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const configName =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      EntityConfigService.PREFIX_ENTITY_CONFIG + entityType.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.configService.getConfig<EntityConfig>(configName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getDetailsViewConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType: EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): ViewConfig<EntityDetailsConfig> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.configService.getConfig<ViewConfig<EntityDetailsConfig>>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      EntityConfigService.getDetailsViewId(entityType),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getListViewConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType: EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): ViewConfig<EntityListConfig> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.configService.getConfig<ViewConfig<EntityListConfig>>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      EntityConfigService.getListViewId(entityType),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityDatatype.html b/documentation/injectables/EntityDatatype.html new file mode 100644 index 0000000000..6b9f75734a --- /dev/null +++ b/documentation/injectables/EntityDatatype.html @@ -0,0 +1,1072 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/basic-datatypes/entity/entity.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Datatype for the EntitySchemaService to handle a single reference to another entity. +Stored as simple id string.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          For example:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @DatabaseField({dataType: 'entity', additional: 'Child'}) relatedEntity: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + StringDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(entityMapper: EntityMapperService, removeService: EntityActionsService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          removeService + EntityActionsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + anonymize(value, schemaField: EntitySchemaField, parent) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:72 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Recursively calls anonymize on the referenced entity and saves it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          parent + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<string> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:62 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:49 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          val + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          additional + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToDatabaseFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:38 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToObjectFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "entity" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:35 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "EditEntity" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:38 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "EntityImportConfig" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:40 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : $localize`:datatype-label:link to another record` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:36 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "DisplayEntity" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:39 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { StringDatatype } from "../string/string.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ColumnMapping } from "../../import/column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityActionsService } from "../../entity/entity-actions/entity-actions.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Datatype for the EntitySchemaService to handle a single reference to another entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Stored as simple id string.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * For example:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * `@DatabaseField({dataType: 'entity', additional: 'Child'}) relatedEntity: string;`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class EntityDatatype extends StringDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override dataType = "entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override label: string = $localize`:datatype-label:link to another record`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override editComponent = "EditEntity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override viewComponent = "DisplayEntity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override importConfigComponent = "EntityImportConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private removeService: EntityActionsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override importMapFunction(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    val: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    additional?: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!additional) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return Promise.resolve(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .loadType(schemaField.additional)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .then((res) => res.find((e) => e[additional] === val)?.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override importIncompleteAdditionalConfigBadge(col: ColumnMapping): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return col.additional ? undefined : "?";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Recursively calls anonymize on the referenced entity and saves it.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param schemaField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param parent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override async anonymize(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    parent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<string> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const referencedEntity = await this.entityMapper.load(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      schemaField.additional,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!referencedEntity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // TODO: remove broken references?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await this.removeService.anonymize(referencedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityDeleteService.html b/documentation/injectables/EntityDeleteService.html new file mode 100644 index 0000000000..85a3482d6e --- /dev/null +++ b/documentation/injectables/EntityDeleteService.html @@ -0,0 +1,667 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/entity/entity-actions/entity-delete.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Safely delete an entity including handling references with related entities. +This service is usually used in combination with the EntityActionsService, which provides user confirmation processes around this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + CascadingEntityAction +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(entityMapper: EntityMapperService, schemaService: EntitySchemaService, keycloakAuthService: KeycloakAuthService, confirmationDialog: ConfirmationDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            keycloakAuthService + KeycloakAuthService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            confirmationDialog + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + deleteEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + deleteEntity(entity: Entity, showKeycloakWarning) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The actual delete action without user interactions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Returns an array of all affected entities (including the given entity) in their state before the action +to support an undo action.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entity + Entity + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            showKeycloakWarning + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            if keycloak deleteUser request fails, a popup warning is shown to the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Protected + Async + cascadeActionToRelatedEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + cascadeActionToRelatedEntities(entity: Entity, compositeAction: (relatedEntity: Entity,refField: string,entity: Entity) => void, aggregateAction: (relatedEntity: Entity,refField: string,entity: Entity) => void) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from CascadingEntityAction +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Recursively call the given actions on all related entities that contain a reference to the given entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Returns an array of all affected related entities (excluding the given entity) in their state before the action +to support an undo action.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            compositeAction + function + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            aggregateAction + function + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntitySchemaService } from "../schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  CascadingActionResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  CascadingEntityAction,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "./cascading-entity-action";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { OkButton } from "../../common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { KeycloakAuthService } from "../../session/auth/keycloak/keycloak-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ConfirmationDialogService } from "../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Safely delete an entity including handling references with related entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This service is usually used in combination with the `EntityActionsService`, which provides user confirmation processes around this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class EntityDeleteService extends CascadingEntityAction {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    protected override entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    protected override schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private keycloakAuthService: KeycloakAuthService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    super(entityMapper, schemaService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The actual delete action without user interactions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Returns an array of all affected entities (including the given entity) in their state before the action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * to support an undo action.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param showKeycloakWarning if keycloak deleteUser request fails, a popup warning is shown to the user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async deleteEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    showKeycloakWarning = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<CascadingActionResult> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if ("User" === entity.getType()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.keycloakAuthService.deleteUser(entity.getId()).subscribe({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        next: () => {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        error: () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          if (showKeycloakWarning) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              $localize`:delete account in keycloak related error title:Keycloak User could not be deleted`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              $localize`:delete account in keycloak related error dialog:User Account could not be deleted in Keycloak. Please delete user manually in Keycloak.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              OkButton,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const cascadeResult = await this.cascadeActionToRelatedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (e) => this.deleteEntity(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (e, refField, entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.removeReferenceFromEntity(e, refField, entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const originalEntity = entity.copy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.entityMapper.remove(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return new CascadingActionResult([originalEntity]).mergeResults(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      cascadeResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Change and save the entity, removing referenced ids of the given referenced entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Returns an array of the affected entities (which here is only the given entity) in the state before the action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * to support an undo action.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param relatedEntityWithReference
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param refField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param referencedEntity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async removeReferenceFromEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    relatedEntityWithReference: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    refField: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    referencedEntity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<CascadingActionResult> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const originalEntity = relatedEntityWithReference.copy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (Array.isArray(relatedEntityWithReference[refField])) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      relatedEntityWithReference[refField] = relatedEntityWithReference[
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        refField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ].filter((id) => id !== referencedEntity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      delete relatedEntityWithReference[refField];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.entityMapper.save(relatedEntityWithReference);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return new CascadingActionResult(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      [originalEntity],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      relatedEntityWithReference.getConstructor().hasPII
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ? [relatedEntityWithReference]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        : [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityFormService.html b/documentation/injectables/EntityFormService.html new file mode 100644 index 0000000000..99acd781ff --- /dev/null +++ b/documentation/injectables/EntityFormService.html @@ -0,0 +1,1161 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/common-components/entity-form/entity-form.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This service provides helper functions for creating tables or forms for an entity as well as saving +new changes correctly to the entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(fb: FormBuilder, entityMapper: EntityMapperService, entitySchemaService: EntitySchemaService, dynamicValidator: DynamicValidatorsService, ability: EntityAbility, unsavedChanges: UnsavedChangesService, defaultValueService: DefaultValueService, router: Router) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              fb + FormBuilder + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entitySchemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              dynamicValidator + DynamicValidatorsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              unsavedChanges + UnsavedChangesService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              defaultValueService + DefaultValueService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Public + Async + createEntityForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + createEntityForm(formFields: ColumnConfig[], entity: T, forTable, withPermissionCheck) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Creates a form with the formFields and the existing values from the entity. +Missing fields in the formFields are filled with schema information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              formFields + ColumnConfig[] + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + T + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forTable + + No + + false + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              withPermissionCheck + + No + + true + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if true, fields without 'update' permissions will stay disabled when enabling form

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<EntityForm<T>> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Public + extendFormFieldConfig + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + extendFormFieldConfig(formField: ColumnConfig, entityType: EntityConstructor, forTable) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Uses schema information to fill missing fields in the FormFieldConfig.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              formField + ColumnConfig + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityType + EntityConstructor + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              forTable + + No + + false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : FormFieldConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + resetForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +resetForm(form: EntityFormGroup<E>, entity: E) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              form + EntityFormGroup<E> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + E + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Public + Async + saveChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + saveChanges(form: EntityFormGroup<T>, entity: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This function applies the changes of the formGroup to the entity. +If the form is invalid or the entity does not pass validation after applying the changes, an error will be thrown. +The input entity will not be modified but a copy of it will be returned in case of success.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              form + EntityFormGroup<T> + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The formGroup holding the changes (marked pristine and disabled after successful save)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + T + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The entity on which the changes should be applied.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              a copy of the input entity with the changes from the form group

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormControlOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ɵElement,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ColumnConfig, FormFieldConfig, toFormFieldConfig } from "./FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicValidatorsService } from "./dynamic-form-validators/dynamic-validators.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityAbility } from "../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { InvalidFormFieldError } from "./invalid-form-field.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { UnsavedChangesService } from "../../entity-details/form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ActivationStart, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Subscription } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DefaultValueService } from "../../default-values/default-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DefaultValueConfig } from "../../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * These are utility types that allow to define the type of `FormGroup` the way it is returned by `EntityFormService.create`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export type TypedFormGroup<T> = FormGroup<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [K in keyof T]: ɵElement<T[K], null>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export type EntityFormGroup<T extends Entity> = TypedFormGroup<Partial<T>>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface EntityForm<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  formGroup: EntityFormGroup<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entity: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * map of field ids to the default value configuration for that field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  defaultValueConfigs: Map<string, DefaultValueConfig>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * map of field ids to the current value to be inherited from the referenced parent entities' field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  inheritedParentValues: Map<string, any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  watcher: Map<string, Subscription>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * This service provides helper functions for creating tables or forms for an entity as well as saving
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * new changes correctly to the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class EntityFormService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private subscriptions: Subscription[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entitySchemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private dynamicValidator: DynamicValidatorsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private unsavedChanges: UnsavedChangesService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private defaultValueService: DefaultValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    router.events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .pipe(filter((e) => e instanceof ActivationStart))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // Clean up everything once navigation happens
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.subscriptions.forEach((sub) => sub.unsubscribe());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.subscriptions = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Uses schema information to fill missing fields in the FormFieldConfig.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param formField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param forTable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  public extendFormFieldConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    formField: ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entityType: EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    forTable = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): FormFieldConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const fullField = toFormFieldConfig(formField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return this.addSchemaToFormField(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        fullField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        entityType.schema.get(fullField.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        forTable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw new Error(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        `Could not create form config for ${fullField.id}: ${err}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private addSchemaToFormField(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    formField: FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    propertySchema: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    forTable: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): FormFieldConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // formField config has precedence over schema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const fullField = Object.assign({}, propertySchema, formField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    fullField.editComponent =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fullField.editComponent ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.entitySchemaService.getComponent(propertySchema, "edit");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    fullField.viewComponent =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fullField.viewComponent ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.entitySchemaService.getComponent(propertySchema, "view");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (forTable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fullField.forTable = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fullField.label =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        fullField.label || fullField.labelShort || fullField.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      delete fullField.description;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fullField.forTable = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fullField.label =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        fullField.label || fullField.label || fullField.labelShort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return fullField;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Creates a form with the formFields and the existing values from the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Missing fields in the formFields are filled with schema information.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param formFields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param forTable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param withPermissionCheck if true, fields without 'update' permissions will stay disabled when enabling form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  public async createEntityForm<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    formFields: ColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    forTable = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    withPermissionCheck = true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): Promise<EntityForm<T>> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const typedFormGroup: TypedFormGroup<Partial<T>> = this.createFormGroup(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      formFields,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      forTable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      withPermissionCheck,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const defaultValueConfigs =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      DefaultValueService.getDefaultValueConfigs(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const entityForm: EntityForm<T> = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      formGroup: typedFormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      defaultValueConfigs: defaultValueConfigs,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      inheritedParentValues: new Map(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      watcher: new Map(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    await this.defaultValueService.handleEntityForm(entityForm, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return entityForm;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private createFormGroup<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    formFields: ColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    forTable = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    withPermissionCheck = true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): EntityFormGroup<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const formConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const copy = entity.copy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    formFields = formFields.filter((f) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entity.getSchema().has(toFormFieldConfig(f).id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const f of formFields) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.addFormControlConfig(formConfig, f, copy, forTable);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const group = this.fb.group<Partial<T>>(formConfig);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const valueChangesSubscription = group.valueChanges.subscribe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      () => (this.unsavedChanges.pending = group.dirty),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.subscriptions.push(valueChangesSubscription);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (withPermissionCheck) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.disableReadOnlyFormControls(group, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const statusChangesSubscription = group.statusChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .pipe(filter((status) => status !== "DISABLED"))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .subscribe(() => this.disableReadOnlyFormControls(group, entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.subscriptions.push(statusChangesSubscription);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return group;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Add a property with form control initialization config to the given formConfig object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param formConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param fieldConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param forTable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private addFormControlConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    formConfig: { [key: string]: FormControl },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    fieldConfig: ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    forTable: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const field = this.extendFormFieldConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      fieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      forTable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let value = entity[field.id];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const controlOptions: FormControlOptions = { nonNullable: true };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (field.validators) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const validators = this.dynamicValidator.buildValidators(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        field.validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Object.assign(controlOptions, validators);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    formConfig[field.id] = new FormControl(value, controlOptions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private disableReadOnlyFormControls<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    form: EntityFormGroup<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const action = entity.isNew ? "create" : "update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Object.keys(form.controls).forEach((fieldId) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (this.ability.cannot(action, entity, fieldId)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        form.get(fieldId).disable({ onlySelf: true, emitEvent: false });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * This function applies the changes of the formGroup to the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * If the form is invalid or the entity does not pass validation after applying the changes, an error will be thrown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The input entity will not be modified but a copy of it will be returned in case of success.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param form The formGroup holding the changes (marked pristine and disabled after successful save)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param entity The entity on which the changes should be applied.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @returns a copy of the input entity with the changes from the form group
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  public async saveChanges<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    form: EntityFormGroup<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): Promise<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.checkFormValidity(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const updatedEntity = entity.copy() as T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const [key, value] of Object.entries(form.getRawValue())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (value !== null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        updatedEntity[key] = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    updatedEntity.assertValid();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.assertPermissionsToSave(entity, updatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.entityMapper.save(updatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw new Error($localize`Could not save ${entity.getType()}\: ${err}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    form.markAsPristine();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    form.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return Object.assign(entity, updatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private checkFormValidity<T extends Entity>(form: EntityFormGroup<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // errors regarding invalid fields won't be displayed unless marked as touched
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    form.markAllAsTouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (form.invalid) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw new InvalidFormFieldError();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private assertPermissionsToSave(oldEntity: Entity, newEntity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let action: "create" | "update", entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (oldEntity.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      action = "create";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entity = newEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      action = "update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entity = oldEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this.ability.can(action, entity, undefined, true)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const conditions = this.ability
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .rulesFor(action, entity.getType())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .map((r) => r.conditions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw new Error(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        $localize`Current user is not permitted to save these changes: ${JSON.stringify(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          conditions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        )}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  resetForm<E extends Entity>(form: EntityFormGroup<E>, entity: E) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const key of Object.keys(form.controls)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      form.get(key).setValue(entity[key]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    form.markAsPristine();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntityMapperService.html b/documentation/injectables/EntityMapperService.html new file mode 100644 index 0000000000..d8e5190c02 --- /dev/null +++ b/documentation/injectables/EntityMapperService.html @@ -0,0 +1,1300 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/entity/entity-mapper/entity-mapper.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Handles loading and saving of data for any higher-level feature module. +The EntityMapperService implicitly transforms objects from instances of Entity classes to the format to be written +to the database and back - ensuring they you always receive instances of Entity subclasses, that you can +simply treat them as normal javascript class instances without worrying about database persistance logic.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                To understand more about how to use the Entity system in your own modules, refer to the How-To Guides:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(_db: Database, entitySchemaService: EntitySchemaService, currentUser: CurrentUserSubject, registry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                _db + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entitySchemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                registry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + Async + load + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + load(entityType: EntityConstructor<T> | string, id: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Load an Entity from the database with the given id or the registered name of that class.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityType + EntityConstructor<T> | string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Class that implements Entity, which is the type of Entity the results should be transformed to

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                id + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The id of the entity to load

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A Promise resolving to an instance of entityType filled with its data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + Async + loadType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + loadType(entityType: EntityConstructor<T> | string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Load all entities from the database of the given type (for example a list of entities of the type User). +Important: Loading via the constructor is always preferred compared to loading via string. The latter +doesn't allow strict type-checking and errors can only be discovered later

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                or the registered name of that class.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityType + EntityConstructor<T> | string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Class that implements Entity, which is the type of Entity the results should be transformed to +or the registered name of that class.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<T[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A Promise resolving to an array of instances of entityType with the data of the loaded entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + receiveUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + receiveUpdates(entityType: EntityConstructor<T> | string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                subscribe to this observable to receive updates whenever the state of +an entity of a certain type changes. +The updated-parameter will return the new entity as well as a field that +describes the type of update (either "new", "update" or "remove"). +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +This can be used in collaboration with the update(UpdatedEntity, Entities)-function +to update a list of entities +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Important: Loading via the constructor is always preferred compared to loading via string. The latter +doesn't allow strict type-checking and errors can only be discovered later

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entityType + EntityConstructor<T> | string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                the type of the entity or the registered name of that class.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + remove + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + remove(entity: T) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Delete an entity from the database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + T + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The entity to be deleted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Protected + resolveConstructor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + resolveConstructor(constructible: EntityConstructor<T> | string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                constructible + EntityConstructor<T> | string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + Async + save + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + save(entity: T, forceUpdate: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Save an entity to the database after transforming it to its database representation. + if a conflict occurs without the forceUpdate flag being set, the save will fail, rejecting the returned promise.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + T + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The entity to be saved

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                forceUpdate + boolean + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Optional flag whether any conflicting version in the database will be quietly overwritten. +if a conflict occurs without the forceUpdate flag being set, the save will fail, rejecting the returned promise.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + Async + saveAll + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + saveAll(entities: Entity[], forceUpdate: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Saves an array of entities that are possibly heterogeneous, i.e. +the entity-type of all the entities does not have to be the same. +This method should be chosen whenever a bigger number of entities needs to be +saved + if a conflict occurs without the forceUpdate flag being set, the save will fail, rejecting the returned promise.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entities + Entity[] + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The entities to save

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                forceUpdate + boolean + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Optional flag whether any conflicting version in the database will be quietly overwritten. +if a conflict occurs without the forceUpdate flag being set, the save will fail, rejecting the returned promise.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<any[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Protected + setEntityMetadata + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + setEntityMetadata(entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Database } from "../../database/database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchemaService } from "../schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { UpdatedEntity } from "../model/entity-update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityRegistry } from "../database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { UpdateMetadata } from "../model/update-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { CurrentUserSubject } from "../../session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Handles loading and saving of data for any higher-level feature module.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The EntityMapperService implicitly transforms objects from instances of Entity classes to the format to be written
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * to the database and back - ensuring they you always receive instances of {@link Entity} subclasses, that you can
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * simply treat them as normal javascript class instances without worrying about database persistance logic.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * To understand more about how to use the Entity system in your own modules, refer to the How-To Guides:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * - [How to Load and Save Data]{@link /additional-documentation/how-to-guides/load-and-save-data.html}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * - [How to Create a new Entity Type]{@link /additional-documentation/how-to-guides/create-a-new-entity-type.html}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class EntityMapperService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private _db: Database,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entitySchemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private registry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Load an Entity from the database with the given id or the registered name of that class.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param entityType Class that implements Entity, which is the type of Entity the results should be transformed to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param id The id of the entity to load
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @returns A Promise resolving to an instance of entityType filled with its data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public async load<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityType: EntityConstructor<T> | string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    id: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const ctor = this.resolveConstructor(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const entityId = Entity.createPrefixedId(ctor.ENTITY_TYPE, id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const result = await this._db.get(entityId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.transformToEntityFormat(result, ctor);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Load all entities from the database of the given type (for example a list of entities of the type User).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * <em>Important:</em> Loading via the constructor is always preferred compared to loading via string. The latter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * doesn't allow strict type-checking and errors can only be discovered later
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param entityType Class that implements Entity, which is the type of Entity the results should be transformed to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * or the registered name of that class.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @returns A Promise resolving to an array of instances of entityType with the data of the loaded entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public async loadType<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityType: EntityConstructor<T> | string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<T[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const ctor = this.resolveConstructor(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const records = await this._db.getAll(ctor.ENTITY_TYPE + ":");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return records.map((rec) => this.transformToEntityFormat(rec, ctor));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private transformToEntityFormat<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    record: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ctor: EntityConstructor<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): T {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const entity = new ctor("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.entitySchemaService.loadDataIntoEntity(entity, record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // add _id information to error message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      e.message = `Could not transform entity "${record._id}": ${e.message}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      throw e;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * subscribe to this observable to receive updates whenever the state of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * an entity of a certain type changes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The updated-parameter will return the new entity as well as a field that
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * describes the type of update (either "new", "update" or "remove").
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * <br>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * This can be used in collaboration with the update(UpdatedEntity, Entities)-function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * to update a list of entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * <br>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * <em>Important:</em> Loading via the constructor is always preferred compared to loading via string. The latter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * doesn't allow strict type-checking and errors can only be discovered later
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param entityType the type of the entity or the registered name of that class.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public receiveUpdates<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entityType: EntityConstructor<T> | string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Observable<UpdatedEntity<T>> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const ctor = this.resolveConstructor(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const type = new ctor().getType();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this._db.changes(type + ":").pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      map((doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const entity = new ctor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.entitySchemaService.loadDataIntoEntity(entity, doc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (doc._deleted) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          return { type: "remove", entity: entity };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        } else if (doc._rev.startsWith("1-")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          // This does not cover all the cases as docs with higher rev-number might be synchronized for the first time
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          return { type: "new", entity: entity };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          return { type: "update", entity: entity };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Save an entity to the database after transforming it to its database representation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param entity The entity to be saved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param forceUpdate Optional flag whether any conflicting version in the database will be quietly overwritten.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *          if a conflict occurs without the forceUpdate flag being set, the save will fail, rejecting the returned promise.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public async save<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    forceUpdate: boolean = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.setEntityMetadata(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const rawData =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.entitySchemaService.transformEntityToDatabaseFormat(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const result = await this._db.put(rawData, forceUpdate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (result?.ok) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity._rev = result.rev;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Saves an array of entities that are possibly heterogeneous, i.e.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * the entity-type of all the entities does not have to be the same.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * This method should be chosen whenever a bigger number of entities needs to be
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * saved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param entities The entities to save
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param forceUpdate Optional flag whether any conflicting version in the database will be quietly overwritten.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *          if a conflict occurs without the forceUpdate flag being set, the save will fail, rejecting the returned promise.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public async saveAll(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entities: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    forceUpdate: boolean = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<any[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entities.forEach((e) => this.setEntityMetadata(e));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const rawData = entities.map((e) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.entitySchemaService.transformEntityToDatabaseFormat(e),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const results = await this._db.putAll(rawData, forceUpdate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    results.forEach((res, idx) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (res.ok) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const entity = entities[idx];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        entity._rev = res.rev;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return results;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Delete an entity from the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param entity The entity to be deleted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public remove<T extends Entity>(entity: T): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this._db.remove(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  protected resolveConstructor<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    constructible: EntityConstructor<T> | string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): EntityConstructor<T> | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (typeof constructible === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return this.registry.get(constructible) as EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return constructible;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  protected setEntityMetadata(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const newMetadata = new UpdateMetadata(this.currentUser.value?.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (entity.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity.created = newMetadata;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity.updated = newMetadata;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntitySchemaService.html b/documentation/injectables/EntitySchemaService.html new file mode 100644 index 0000000000..047507be76 --- /dev/null +++ b/documentation/injectables/EntitySchemaService.html @@ -0,0 +1,1331 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity/schema/entity-schema.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transform between entity instances and database objects +based on the dataType set for properties in Entity classes using the DatabaseField annotation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  You can inject the EntitySchemaService in your code to register your custom DefaultDatatype implementations.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This service is used by the EntityMapperService to internally transform objects. +You should normally use the EntityMapperService instead of transforming objects yourself with the EntitySchemaService.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  also see the How-To Guides:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(injector: Injector) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  injector + Injector + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + getComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +getComponent(propertySchema: EntitySchemaField, mode: "view" | "edit") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Get the name of the component that should display this property. +The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  propertySchema + EntitySchemaField + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The schema definition of the attribute for which a component should be get

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mode + "view" | "edit" + + No + + "view" + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Optional) The mode for which a component is required. Default is "view".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  string The name of the component which should display this property

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + getDatatypeOrDefault + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getDatatypeOrDefault(datatypeName: string, failSilently) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Get the datatype for the giving name (or the default datatype if no other registered type fits)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  datatypeName + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The key/name of the datatype

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  failSilently + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If set to 'true' no error is thrown if datatype does not exist

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + getEntityTypesReferencingType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +getEntityTypesReferencingType(type: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Get all entity types whose schema includes fields referencing the given type.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  e.g. given Child -> [Note, ChildSchoolRelation, ...]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  type + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + loadDataIntoEntity + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + loadDataIntoEntity(entity: E, data: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Helper function to assign the giving data to the given entity instance after transforming it according to the schema.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entity + E + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  An entity instance whose properties will be overwritten with the transformed data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  data + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The database object that will be transformed and assigned to the entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : E + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + transformDatabaseToEntityFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + transformDatabaseToEntityFormat(data: any, schema: EntitySchema) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transform a database object to entity format according to the schema.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  data + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The database object that will be transformed to the given entity format

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schema + EntitySchema + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A schema defining the transformation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + transformEntityToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + transformEntityToDatabaseFormat(entity: Entity, schema?: EntitySchema) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transform an entity instance to a database object according to the schema.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entity + Entity + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The object (an instance of an entity type)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schema + EntitySchema + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The schema of the entity (if not explicitly defined the schema of the given entity is used)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + valueToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +valueToDatabaseFormat(value: any, schemaField: EntitySchemaField, entity?: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transform a single value into database format

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  value + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entity + Entity + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + valueToEntityFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +valueToEntityFormat(value: any, schemaField: EntitySchemaField, dataObject?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Transform a single value into entity format

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  value + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  dataObject + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Entity, EntityConstructor } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Injectable, Injector } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntitySchema } from "./entity-schema";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntitySchemaField } from "./entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DefaultDatatype } from "../default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityRegistry } from "../database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { asArray } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Transform between entity instances and database objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * based on the dataType set for properties in Entity classes using the {@link DatabaseField} annotation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * You can inject the EntitySchemaService in your code to register your custom {@link DefaultDatatype} implementations.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This service is used by the {@link EntityMapperService} to internally transform objects.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * You should normally use the EntityMapperService instead of transforming objects yourself with the EntitySchemaService.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * also see the How-To Guides:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * - [Create A New Entity Type]{@link /additional-documentation/how-to-guides/create-a-new-entity-type.html}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class EntitySchemaService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Internal cache of datatype implementations.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private schemaTypes = new Map<string, DefaultDatatype>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private defaultDatatype: DefaultDatatype = new DefaultDatatype();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(private injector: Injector) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Get the datatype for the giving name (or the default datatype if no other registered type fits)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param datatypeName The key/name of the datatype
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param failSilently If set to 'true' no error is thrown if datatype does not exist
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public getDatatypeOrDefault(datatypeName: string, failSilently = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!datatypeName) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return this.defaultDatatype;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.schemaTypes.has(datatypeName)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return this.schemaTypes.get(datatypeName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // use Injector instead of normal dependency injection in the constructor, because some Datatypes use the SchemaService (--> Circular Dependency)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const dataTypes: DefaultDatatype[] = this.injector.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      DefaultDatatype,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ) as unknown as DefaultDatatype[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let dataType = dataTypes.find((d) => d.dataType === datatypeName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.schemaTypes.set(datatypeName, dataType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return dataType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else if (!failSilently) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      throw new Error(`Data type "${datatypeName}" does not exist`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Transform a database object to entity format according to the schema.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param data The database object that will be transformed to the given entity format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param schema A schema defining the transformation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public transformDatabaseToEntityFormat<T = Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    data: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    schema: EntitySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): T {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const transformed = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const key of schema.keys()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const schemaField: EntitySchemaField = schema.get(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (data[key] === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const newValue = this.valueToEntityFormat(data[key], schemaField, data);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (newValue !== undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        transformed[key] = newValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (schemaField.generateIndex) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        throw new Error('schema option "isIndexed" not implemented yet');
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return transformed as T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Helper function to assign the giving data to the given entity instance after transforming it according to the schema.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param entity An entity instance whose properties will be overwritten with the transformed data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param data The database object that will be transformed and assigned to the entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public loadDataIntoEntity<E extends Entity>(entity: E, data: any): E {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const transformed = this.transformDatabaseToEntityFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      (<typeof Entity>entity.constructor).schema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return Object.assign(entity, transformed);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Transform an entity instance to a database object according to the schema.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param entity The object (an instance of an entity type)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param schema The schema of the entity (if not explicitly defined the schema of the given entity is used)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public transformEntityToDatabaseFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    schema?: EntitySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!schema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      schema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const data = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const key of schema.keys()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      let value = entity[key];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const schemaField: EntitySchemaField = schema.get(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (value === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        // skip and keep undefined
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        data[key] = this.valueToDatabaseFormat(value, schemaField, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        throw new Error(`Transformation for ${key} failed: ${err}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (data[key] === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        delete data[key];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Get the name of the component that should display this property.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The edit component has to be a registered component. Components that are registered contain the `DynamicComponent`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * decorator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param propertySchema The schema definition of the attribute for which a component should be get
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param mode (Optional) The mode for which a component is required. Default is "view".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @returns string The name of the component which should display this property
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  getComponent(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    propertySchema: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    mode: "view" | "edit" = "view",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!propertySchema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const componentAttribute =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      mode === "view" ? "viewComponent" : "editComponent";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (propertySchema[componentAttribute]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return propertySchema[componentAttribute];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const dataType = this.getDatatypeOrDefault(propertySchema.dataType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (dataType?.[componentAttribute]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return dataType[componentAttribute];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Transform a single value into database format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param schemaField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  valueToDatabaseFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    value: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entity?: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (value === null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // keep 'null' to be able to explicitly mark a value as being reset
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const dataType = this.getDatatypeOrDefault(schemaField.dataType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (schemaField.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return asArray(value).map((v) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        dataType.transformToDatabaseFormat(v, schemaField, entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return dataType.transformToDatabaseFormat(value, schemaField, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Transform a single value into entity format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param schemaField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param dataObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  valueToEntityFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    value: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    dataObject?: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (value === null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // keep 'null' to be able to explicitly mark a value as being reset
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const dataType = this.getDatatypeOrDefault(schemaField.dataType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (schemaField.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return asArray(value).map((v) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        dataType.transformToObjectFormat(v, schemaField, dataObject),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return dataType.transformToObjectFormat(value, schemaField, dataObject);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Get all entity types whose schema includes fields referencing the given type.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * e.g. given Child -> [Note, ChildSchoolRelation, ...]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  getEntityTypesReferencingType(type: string): {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    referencingProperties: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const referencingTypes = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const t of this.injector.get(EntityRegistry).values()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      for (const [key, field] of t.schema.entries()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        if (asArray(field.additional).includes(type)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          let refType = referencingTypes.find((e) => e.entityType === t);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          if (!refType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            refType = { entityType: t, referencingProperties: [] };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            referencingTypes.push(refType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          refType.referencingProperties.push(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return referencingTypes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EntitySpecialLoaderService.html b/documentation/injectables/EntitySpecialLoaderService.html new file mode 100644 index 0000000000..4206431960 --- /dev/null +++ b/documentation/injectables/EntitySpecialLoaderService.html @@ -0,0 +1,532 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity/entity-special-loader/entity-special-loader.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Load data in a specially combined or indexed way as an alternative to the simple EntityMapperService.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This service might be refactored or removed when generic configurable indexes are implemented (#581, #262)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(childrenService: ChildrenService, historicalDataService: HistoricalDataService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    historicalDataService + HistoricalDataService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + loadData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +loadData(loaderMethod: LoaderMethod) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    loaderMethod + LoaderMethod + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<E[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + loadDataFor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + loadDataFor(loaderMethod: LoaderMethod, entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    loaderMethod + LoaderMethod + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<E[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ChildrenService } from "../../../child-dev-project/children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { HistoricalDataService } from "./historical-data/historical-data.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export enum LoaderMethod {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ChildrenService = "ChildrenService",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  HistoricalDataService = "HistoricalDataService",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Load data in a specially combined or indexed way as an alternative to the simple EntityMapperService.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This service might be refactored or removed when generic configurable indexes are implemented (#581, #262)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class EntitySpecialLoaderService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private historicalDataService: HistoricalDataService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  loadData<E extends Entity = Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    loaderMethod: LoaderMethod,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<E[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (loaderMethod === LoaderMethod.ChildrenService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return this.childrenService.getChildren() as Promise<E[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async loadDataFor<E extends Entity = Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    loaderMethod: LoaderMethod,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<E[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (loaderMethod === LoaderMethod.HistoricalDataService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return this.historicalDataService.getHistoricalDataFor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        entity.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ) as Promise<E[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EventAttendanceDatatype.html b/documentation/injectables/EventAttendanceDatatype.html new file mode 100644 index 0000000000..a54eb6fe6e --- /dev/null +++ b/documentation/injectables/EventAttendanceDatatype.html @@ -0,0 +1,1135 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/child-dev-project/attendance/model/event-attendance.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + do not use externally, use EventAttendanceMap instead * +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + SchemaEmbedDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + transformToDatabaseFormat(value: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      value + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + transformToObjectFormat(value: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:49 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      value + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      val + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The value from an imported cell to be mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      additional + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      config as returned by the configComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : EventAttendance.DATA_TYPE +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:69 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + embeddedType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : EventAttendance as unknown as EntityConstructor +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from SchemaEmbedDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "EditText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:61 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : $localize`:datatype-label:any` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:49 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The human-readable name for this dataType, used in config UIs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : "DisplayText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in DefaultDatatype:60 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The default component how this datatype should be displayed in lists and forms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SchemaEmbedDatatype } from "../../../core/basic-datatypes/schema-embed/schema-embed.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntitySchemaService } from "../../../core/entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityConstructor } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EventAttendance, EventAttendanceMap } from "./event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DefaultDatatype } from "../../../core/entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Holds a full register of EventAttendance entries.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * (previously this was "MapDatatype")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EventAttendanceMapDatatype extends DefaultDatatype<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Map<string, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [string, any][]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static override dataType = EventAttendanceMap.DATA_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  embeddedType: EventAttendanceDatatype;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(schemaService: EntitySchemaService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.embeddedType = new EventAttendanceDatatype(schemaService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override transformToDatabaseFormat(value: Map<string, any>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!(value instanceof Map)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      console.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        'property to be saved with "map" EntitySchema is not of expected type',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return value as any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const result: [string, any][] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    value.forEach((item, key) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      result.push([key, this.embeddedType.transformToDatabaseFormat(item)]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override transformToObjectFormat(value: any[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (value instanceof Map) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // usually this shouldn't already be a map but in MockDatabase somehow this can happen
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!Array.isArray(value) || value === null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      console.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        'property to be loaded with "map" EntitySchema is not valid',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return value as any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const result = new EventAttendanceMap();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const keyValue of value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const transformedElement = this.embeddedType.transformToObjectFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        keyValue[1],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ) as unknown as EventAttendance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      result.set(keyValue[0], transformedElement);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/** @deprecated do not use externally, use EventAttendanceMap instead **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EventAttendanceDatatype extends SchemaEmbedDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static override dataType = EventAttendance.DATA_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override embeddedType = EventAttendance as unknown as EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(schemaService: EntitySchemaService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super(schemaService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/EventAttendanceMapDatatype.html b/documentation/injectables/EventAttendanceMapDatatype.html new file mode 100644 index 0000000000..47eabdcb71 --- /dev/null +++ b/documentation/injectables/EventAttendanceMapDatatype.html @@ -0,0 +1,1127 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/child-dev-project/attendance/model/event-attendance.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Holds a full register of EventAttendance entries. +(previously this was "MapDatatype")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DefaultDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + transformToDatabaseFormat(value: Map) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:26 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + Map<string | any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + transformToObjectFormat(value: any[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + any[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        val + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The value from an imported cell to be mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        additional + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        config as returned by the configComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : EventAttendanceMap.DATA_TYPE +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:17 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + embeddedType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventAttendanceDatatype + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "EditText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:61 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : $localize`:datatype-label:any` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:49 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The human-readable name for this dataType, used in config UIs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "DisplayText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:60 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The default component how this datatype should be displayed in lists and forms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SchemaEmbedDatatype } from "../../../core/basic-datatypes/schema-embed/schema-embed.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitySchemaService } from "../../../core/entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityConstructor } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EventAttendance, EventAttendanceMap } from "./event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DefaultDatatype } from "../../../core/entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Holds a full register of EventAttendance entries.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * (previously this was "MapDatatype")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class EventAttendanceMapDatatype extends DefaultDatatype<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Map<string, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [string, any][]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override dataType = EventAttendanceMap.DATA_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  embeddedType: EventAttendanceDatatype;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(schemaService: EntitySchemaService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.embeddedType = new EventAttendanceDatatype(schemaService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override transformToDatabaseFormat(value: Map<string, any>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!(value instanceof Map)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      console.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        'property to be saved with "map" EntitySchema is not of expected type',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return value as any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const result: [string, any][] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    value.forEach((item, key) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      result.push([key, this.embeddedType.transformToDatabaseFormat(item)]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override transformToObjectFormat(value: any[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (value instanceof Map) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // usually this shouldn't already be a map but in MockDatabase somehow this can happen
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!Array.isArray(value) || value === null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      console.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        'property to be loaded with "map" EntitySchema is not valid',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return value as any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const result = new EventAttendanceMap();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const keyValue of value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const transformedElement = this.embeddedType.transformToObjectFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        keyValue[1],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ) as unknown as EventAttendance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      result.set(keyValue[0], transformedElement);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/** @deprecated do not use externally, use EventAttendanceMap instead **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class EventAttendanceDatatype extends SchemaEmbedDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override dataType = EventAttendance.DATA_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override embeddedType = EventAttendance as unknown as EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(schemaService: EntitySchemaService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super(schemaService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/FileDatatype.html b/documentation/injectables/FileDatatype.html new file mode 100644 index 0000000000..bf9c3e2b50 --- /dev/null +++ b/documentation/injectables/FileDatatype.html @@ -0,0 +1,1008 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/file/file.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Datatype for saving a file on an entity property.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The name of the file is saved on the property while the file itself is stored in another database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Usage in code:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @DatabaseProperty({ dataType: "file", label: "My label"}) myFileProperty: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Usage in config:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  "name": "myFileProperty",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  "schema": {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    "dataType": "file",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    "label": "My label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + StringDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + anonymize(value: string, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:33 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          parent + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToDatabaseFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:38 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformToObjectFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          val + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The value from an imported cell to be mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          additional + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          config as returned by the configComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "file" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:27 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "EditFile" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:31 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : $localize`:datatype-label:file attachment` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:28 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "ViewFile" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:30 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { StringDatatype } from "../../core/basic-datatypes/string/string.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaField } from "../../core/entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Datatype for saving a file on an entity property.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * The name of the file is saved on the property while the file itself is stored in another database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Usage in code:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * ```javascript
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * @DatabaseProperty({ dataType: "file", label: "My label"}) myFileProperty: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Usage in config:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * ```json
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *   "name": "myFileProperty",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *   "schema": {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *     "dataType": "file",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *     "label": "My label"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *   }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class FileDatatype extends StringDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override dataType = "file";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static override label: string = $localize`:datatype-label:file attachment`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override viewComponent = "ViewFile";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override editComponent = "EditFile";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  override async anonymize(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    parent: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // accessing the id of the entity property seems difficult here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // file anonymization requires the FileService to actively delete - not supporting partial anonymization for now
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // --> see EntityRemoveService for full anonymization, removing files
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    throw new Error(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      "'retain-anonymized' is not implemented for 'file' datatype",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/FilterGeneratorService.html b/documentation/injectables/FilterGeneratorService.html new file mode 100644 index 0000000000..8128392195 --- /dev/null +++ b/documentation/injectables/FilterGeneratorService.html @@ -0,0 +1,603 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/filter/filter-generator/filter-generator.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(enumService: ConfigurableEnumService, entities: EntityRegistry, entityMapperService: EntityMapperService, filterService: FilterService, schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            enumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapperService + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            filterService + FilterService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + generate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + generate(filterConfigs: FilterConfig[], entityConstructor: EntityConstructor<T>, data: T[], onlyShowUsedOptions) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            filterConfigs + FilterConfig[] + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityConstructor + EntityConstructor<T> + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            data + T[] + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            onlyShowUsedOptions + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (Optional) whether to remove those filter options for selection that are not present in the data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<Filter[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Filter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  FilterSelectionOption,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  SelectableFilter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  BooleanFilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  DateRangeFilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  FilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  PrebuiltFilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ConfigurableEnumService } from "../../basic-datatypes/configurable-enum/configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FilterService } from "../filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { defaultDateFilters } from "../../basic-datatypes/date/date-range-filter/date-range-filter-panel/date-range-filter-panel.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DateDatatype } from "../../basic-datatypes/date/date.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DateFilter } from "../filters/dateFilter";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { BooleanFilter } from "../filters/booleanFilter";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ConfigurableEnumFilter } from "../filters/configurableEnumFilter";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityFilter } from "../filters/entityFilter";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class FilterGeneratorService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private enumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param filterConfigs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param entityConstructor
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param onlyShowUsedOptions (Optional) whether to remove those filter options for selection that are not present in the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async generate<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    filterConfigs: FilterConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    entityConstructor: EntityConstructor<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    data: T[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    onlyShowUsedOptions = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Promise<Filter<T>[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const filters: Filter<T>[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (const filterConfig of filterConfigs) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const schema = entityConstructor.schema.get(filterConfig.id) || {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      let filter: Filter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const label = filterConfig.label ?? schema.labelShort ?? schema.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const type = filterConfig.type ?? schema.dataType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (type == "configurable-enum") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter = new ConfigurableEnumFilter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filterConfig.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          this.enumService.getEnumValues(schema.additional),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else if (type == "boolean") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter = new BooleanFilter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filterConfig.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filterConfig as BooleanFilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else if (type == "prebuilt") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter = new SelectableFilter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filterConfig.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          (filterConfig as PrebuiltFilterConfig<T>).options,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.schemaService.getDatatypeOrDefault(type, true) instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        DateDatatype
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter = new DateFilter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filterConfig.id,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          (filterConfig as DateRangeFilterConfig).options ?? defaultDateFilters,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // type: entity reference
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entities.has(filterConfig.type) ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.entities.has(schema.additional)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const entityType = filterConfig.type || schema.additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const filterEntities =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          await this.entityMapperService.loadType(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter = new EntityFilter(filterConfig.id, label, filterEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const options = [...new Set(data.map((c) => c[filterConfig.id]))];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        const fSO: FilterSelectionOption<T>[] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          SelectableFilter.generateOptions(options, filterConfig.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter = new SelectableFilter<T>(filterConfig.id, fSO, label);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (filterConfig.hasOwnProperty("default")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        filter.selectedOptionValues = [filterConfig.default];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (filter instanceof SelectableFilter) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (onlyShowUsedOptions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          filter.options = filter.options.filter((option) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            data.some(this.filterService.getFilterPredicate(option.filter)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // Filters should only be added, if they have more than one (the default) option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        if (filter.options?.length <= 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      filters.push(filter);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return filters;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/FilterService.html b/documentation/injectables/FilterService.html new file mode 100644 index 0000000000..7f9d9cc08f --- /dev/null +++ b/documentation/injectables/FilterService.html @@ -0,0 +1,710 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/filter/filter.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Utility service to help handling and aligning filters with entities.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(enumService: ConfigurableEnumService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              enumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + alignEntityWithFilter + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +alignEntityWithFilter(entity: T, filter: DataFilter<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Patches an entity with values required to pass the filter query. +This patch happens in-place.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + T + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              the entity to be patched

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              filter + DataFilter<T> + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              the filter which the entity should pass afterward

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + combineFilters + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +combineFilters(entityFilters: EntityFilter[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityFilters + EntityFilter<T>[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + getFilterPredicate + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +getFilterPredicate(filter: DataFilter<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Builds a predicate for a given filter object. +This predicate can be used to filter arrays of objects.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              const predicate = this.filterService.getFilterPredicate(filterObj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +const filtered = this.data.filter(predicate)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              filter + DataFilter<T> + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              a valid filter object, e.g. as provided by the FilterComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntitySchemaField } from "../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  allInterpreters,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  allParsingInstructions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  compare,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  createFactory,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Filter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@ucast/mongo2js";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfigurableEnumService } from "../basic-datatypes/configurable-enum/configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DataFilter, Filter as EntityFilter } from "./filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MongoQuery } from "@casl/ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Utility service to help handling and aligning filters with entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class FilterService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private filterFactory = createFactory(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    allParsingInstructions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    allInterpreters,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    { compare: this.extendedCompare.bind(this) },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) as Filter;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(private enumService: ConfigurableEnumService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  combineFilters<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entityFilters: EntityFilter<T>[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): DataFilter<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (entityFilters.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return {} as DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      $and: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ...entityFilters.map((value: EntityFilter<T>): DataFilter<T> => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          return value.getFilter();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } as unknown as DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Builds a predicate for a given filter object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * This predicate can be used to filter arrays of objects.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * ```javascript
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * const predicate = this.filterService.getFilterPredicate(filterObj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * const filtered = this.data.filter(predicate)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param filter a valid filter object, e.g. as provided by the `FilterComponent`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  getFilterPredicate<T extends Entity>(filter: DataFilter<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.filterFactory<T>(filter as MongoQuery<T>);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Patches an entity with values required to pass the filter query.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * This patch happens in-place.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param entity the entity to be patched
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param filter the filter which the entity should pass afterward
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  alignEntityWithFilter<T extends Entity>(entity: T, filter: DataFilter<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const schema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Object.entries(filter ?? {}).forEach(([key, value]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (typeof value !== "object") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // only simple equality filters are automatically applied to new entities, complex conditions (e.g. $lt / $gt) are ignored)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.assignValueToEntity(key, value, schema, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else if (value["$elemMatch"]?.["$eq"]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // e.g. { children: { $elemMatch: { $eq: "Child:some-id" } } }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.assignValueToEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          [value["$elemMatch"]["$eq"]],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          schema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private assignValueToEntity<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    key: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    schema: Map<string, EntitySchemaField>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    newEntity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (key.includes(".")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // TODO only one level deep nesting is supported (also by ucast https://github.com/stalniy/ucast/issues/32)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      [key, value] = this.transformNestedKey(key, value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const property = schema.get(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!property) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // not a schema property
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (property?.dataType === "configurable-enum") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      value = this.parseConfigurableEnumValue(property, value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (property?.dataType.includes("date")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      value = moment(value).toDate();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    newEntity[key] = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private transformNestedKey(key: string, value): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const [first, second] = key.split(".");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return [first, { [second]: value }];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private parseConfigurableEnumValue(property: EntitySchemaField, value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const enumValues = this.enumService.getEnumValues(property.additional);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return enumValues.find(({ id }) => id === value["id"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private extendedCompare<T>(a: T, b: T): 1 | -1 | 0 {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (a instanceof Date && typeof b === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return this.compareDates(a, b);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return compare(a, b);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private compareDates(a: Date, b: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const [momentA, momentB] = [moment(a), moment(b)];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (momentA.isSame(momentB, "days")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else if (momentA.isBefore(momentB, "days")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return -1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/FormDialogService.html b/documentation/injectables/FormDialogService.html new file mode 100644 index 0000000000..ae3dd29108 --- /dev/null +++ b/documentation/injectables/FormDialogService.html @@ -0,0 +1,765 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/form-dialog/form-dialog.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(dialog: MatDialog, schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + getSchemaFieldsForDetailsView + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + getSchemaFieldsForDetailsView(entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + openFormPopup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +openFormPopup(entity: E, columnsOverall?: ColumnConfig[], component: ComponentType) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Open a form in a popup that allows to edit the given entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptionalDefault value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + E + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                columnsOverall + ColumnConfig[] + + Yes + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                component + ComponentType<T> + + No + + RowDetailsComponent as ComponentType<T> +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : MatDialogRef<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + openView + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +openView(entity: E, component: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • E
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                entity + E + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                component + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + dialogSettings + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : MatDialogConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : { + width: "99%", + maxWidth: "980px", + } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatDialogConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ComponentType } from "@angular/cdk/overlay";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { RowDetailsComponent } from "./row-details/row-details.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  toFormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchemaService } from "../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  DialogViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  DialogViewData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../ui/dialog-view/dialog-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class FormDialogService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static dialogSettings: MatDialogConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    width: "99%",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    maxWidth: "980px",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  openView<E extends Entity>(entity: E, component: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.dialog.open(DialogViewComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      width: "99%",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      maxWidth: "95vw",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      maxHeight: "90vh",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // EntityDetails with its multiple tabs needs an explicit height to not change size between tabs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      height: component === "EntityDetails" ? "90vh" : undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        component: component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      } as DialogViewData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Open a form in a popup that allows to edit the given entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param columnsOverall
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  openFormPopup<E extends Entity, T = RowDetailsComponent>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: E,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    columnsOverall?: ColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    component: ComponentType<T> = RowDetailsComponent as ComponentType<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): MatDialogRef<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!columnsOverall) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      columnsOverall = FormDialogService.getSchemaFieldsForDetailsView(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const columns: FormFieldConfig[] = this.inferFormFieldColumns(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      columnsOverall,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ).filter((col) => !col.hideFromForm);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const columnsToDisplay = columns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .filter((col) => col.editComponent)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .map((col) => Object.assign({}, col, { forTable: false }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.dialog.open(component, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ...FormDialogService.dialogSettings,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        columns: columnsToDisplay,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        viewOnlyColumns: columns.filter((col) => !col.editComponent),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private inferFormFieldColumns(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    columnsOverall: ColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const columns = columnsOverall.map(toFormFieldConfig);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const c of columns) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!c.editComponent) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        c.editComponent = this.schemaService.getComponent(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          entity.getSchema().get(c.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          "edit",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return columns;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static getSchemaFieldsForDetailsView(entity: Entity): FormFieldConfig[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let formFields: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let isUsingShowFlag = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const [key, field] of entity.getSchema()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (field.showInDetailsView) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        formFields.push(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (field.showInDetailsView !== undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        isUsingShowFlag = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!isUsingShowFlag) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const excludedFields = Array.from(Entity.schema.keys());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      formFields = Array.from(entity.getSchema().keys()).filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (k: string) => !excludedFields.includes(k),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return formFields.map((k: string) => ({ id: k }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/GeoService.html b/documentation/injectables/GeoService.html new file mode 100644 index 0000000000..e29058d2a0 --- /dev/null +++ b/documentation/injectables/GeoService.html @@ -0,0 +1,603 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/location/geo.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A service that uses nominatim to lookup locations https://nominatim.org/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(http: HttpClient, analytics: AnalyticsService, configService: ConfigService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  http + HttpClient + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  analytics + AnalyticsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + lookup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +lookup(searchTerm: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns locations that match the search term

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  searchTerm + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  e.g. Rollbergstraße Berlin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Observable<GeoResult[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + reverseLookup + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +reverseLookup(coordinates: Coordinates) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns the location at the provided coordinates

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  coordinates + Coordinates + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  of a place (lat and lon)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Observable<GeoResult> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Coordinates } from "./coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ConfigService } from "../../core/config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AnalyticsService } from "../../core/analytics/analytics.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MAP_CONFIG_KEY, MapConfig } from "./map-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface GeoResult extends Coordinates {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  display_name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * A service that uses nominatim to lookup locations {@link https://nominatim.org/}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class GeoService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private readonly remoteUrl = "/nominatim";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private countrycodes = "de";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private defaultOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    format: "json",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    addressdetails: 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    email: environment.email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private http: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private analytics: AnalyticsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    configService.configUpdates.subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const config = configService.getConfig<MapConfig>(MAP_CONFIG_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (config?.countrycodes) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.countrycodes = config.countrycodes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Returns locations that match the search term
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param searchTerm e.g. `Rollbergstraße Berlin`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  lookup(searchTerm: string): Observable<GeoResult[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.analytics.eventTrack("lookup_executed", {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      category: "Map",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      value: searchTerm.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .get<OpenStreetMapsSearchResult[]>(`${this.remoteUrl}/search`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        params: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ...this.defaultOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          q: searchTerm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          countrycodes: this.countrycodes,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        map((results) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          Array.isArray(results)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            ? results.map((x) => this.reformatDisplayName(x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            : [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private reformatDisplayName(result: OpenStreetMapsSearchResult): GeoResult {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const addr = result?.address;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (addr) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const city = addr.city ?? addr.town;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      result.display_name = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        addr.amenity ?? addr.office,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        addr.road ? addr.road + " " + addr.house_number : undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        addr.postcode ? addr.postcode + " " + city : city,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        .filter((x) => !!x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        .join(", ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Returns the location at the provided coordinates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param coordinates of a place (`lat` and `lon`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  reverseLookup(coordinates: Coordinates): Observable<GeoResult> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.analytics.eventTrack("reverse_lookup_executed", {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      category: "Map",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .get<OpenStreetMapsSearchResult>(`${this.remoteUrl}/reverse`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        params: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ...this.defaultOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          lat: coordinates.lat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          lon: coordinates.lon,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .pipe(map((result) => this.reformatDisplayName(result)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +type OpenStreetMapsSearchResult = GeoResult & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  address: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    amenity?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    office?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    house_number?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    road?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    neighbourhood?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    suburb?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    borough?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    city?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    town?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    postcode?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    country?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    country_code?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/HistoricalDataService.html b/documentation/injectables/HistoricalDataService.html new file mode 100644 index 0000000000..2edd79b96e --- /dev/null +++ b/documentation/injectables/HistoricalDataService.html @@ -0,0 +1,435 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity/entity-special-loader/historical-data/historical-data.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Will be replaced by generic index generation (#262) +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(dbIndexingService: DatabaseIndexingService, entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    dbIndexingService + DatabaseIndexingService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + getHistoricalDataFor + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +getHistoricalDataFor(entityId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DatabaseIndexingService } from "../../database-indexing/database-indexing.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityRegistry } from "../../database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * @deprecated Will be replaced by generic index generation (#262)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class HistoricalDataService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private dbIndexingService: DatabaseIndexingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.createHistoricalDataIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private createHistoricalDataIndex(): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const designDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      _id: "_design/historicalData_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        by_entity: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          map: `(doc) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            if (doc._id.startsWith("HistoricalEntityData")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +              emit([doc.relatedEntity, new Date(doc.date).getTime()]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          }`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.dbIndexingService.createIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  getHistoricalDataFor(entityId: string): Promise<Entity[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.dbIndexingService.queryIndexDocs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.entityRegistry.get("HistoricalEntityData"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      "historicalData_index/by_entity",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        startkey: [entityId, "\uffff"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        endkey: [entityId],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        descending: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/HorizontalHammerConfig.html b/documentation/injectables/HorizontalHammerConfig.html new file mode 100644 index 0000000000..42068f29ea --- /dev/null +++ b/documentation/injectables/HorizontalHammerConfig.html @@ -0,0 +1,577 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/child-dev-project/attendance/add-day-attendance/roll-call/roll-call.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + HammerGestureConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + overrides + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : object + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Default value : { + swipe: { direction: Hammer.DIRECTION_HORIZONTAL }, + pinch: { enable: false }, + rotate: { enable: false }, + } +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Injectable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { animate, style, transition, trigger } from "@angular/animations";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  AttendanceStatusType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "../../model/attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Note } from "../../../notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EventAttendance } from "../../model/event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Logging } from "../../../../core/logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { sortByAttribute } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FormDialogService } from "../../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgClass, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ChildBlockComponent } from "../../../children/child-block/child-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { RollCallTabComponent } from "./roll-call-tab/roll-call-tab.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  HAMMER_GESTURE_CONFIG,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  HammerGestureConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  HammerModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/platform-browser";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import Hammer from "hammerjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumService } from "../../../../core/basic-datatypes/configurable-enum/configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfirmationDialogService } from "../../../../core/common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +// Only allow horizontal swiping
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +class HorizontalHammerConfig extends HammerGestureConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  override overrides = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    swipe: { direction: Hammer.DIRECTION_HORIZONTAL },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    pinch: { enable: false },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    rotate: { enable: false },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Displays the participants of the given event one by one to mark attendance status.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-roll-call",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./roll-call.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./roll-call.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  animations: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    trigger("completeRollCall", [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      transition("void => *", [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        style({ backgroundColor: "transparent" }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        animate(1000),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ChildBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgClass,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    RollCallTabComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    HammerModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  providers: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      provide: HAMMER_GESTURE_CONFIG,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      useClass: HorizontalHammerConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class RollCallComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The event to be displayed and edited.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() eventEntity: Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (optional) property name of the participant entities by which they are sorted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() sortParticipantsBy?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Emitted when the roll call is finished and results can be saved.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Output() complete = new EventEmitter<Note>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Emitted when the user wants to dismiss & leave the roll call view.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Output() exit = new EventEmitter();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The index, child and attendance that is currently being processed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  currentIndex = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  currentChild: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  currentAttendance: EventAttendance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * whether any changes have been made to the model
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  isDirty: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** options available for selecting an attendance status */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  availableStatus: AttendanceStatusType[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  children: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  inactiveParticipants: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private enumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private confirmationDialog: ConfirmationDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async ngOnChanges(changes: SimpleChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (changes.eventEntity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.loadAttendanceStatusTypes();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      await this.loadParticipants();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.setInitialIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (changes.sortParticipantsBy) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.sortParticipants();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Set the index of the first child that expects user input.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This is the first entry of the list, if the user has never recorded attendance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * for this event. Else it is the first child without any attendance information
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (i.e. got skipped or the user left at this child)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private setInitialIndex() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let index = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const entry of this.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (!this.eventEntity.getAttendance(entry.getId())?.status?.id) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      index += 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // do not jump to end - if all participants are recorded, start with first instead
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (index >= this.children.length) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      index = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.goToParticipantWithIndex(index);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private loadAttendanceStatusTypes() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.availableStatus = this.enumService.getEnumValues<AttendanceStatusType>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ATTENDANCE_STATUS_CONFIG_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async loadParticipants() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.children = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.inactiveParticipants = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const childId of this.eventEntity.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      let child: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        child = await this.entityMapper.load(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          Entity.extractTypeFromId(childId),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          childId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          "Could not find child " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            childId +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            " for event " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            this.eventEntity.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.eventEntity.removeChild(childId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (child.isActive) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.children.push(child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.inactiveParticipants.push(child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.sortParticipants();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private sortParticipants() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.sortParticipantsBy) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.children.sort(sortByAttribute<any>(this.sortParticipantsBy, "asc"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // also sort the participants in the Note entity itself for display in details view later
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.eventEntity.children = this.children.map((e) => e.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  markAttendance(status: AttendanceStatusType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.currentAttendance.status = status;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.isDirty = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.goToNext();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  goToParticipantWithIndex(newIndex: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.currentIndex = newIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.isFinished) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.complete.emit(this.eventEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.currentChild = this.children[this.currentIndex];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.currentAttendance = this.eventEntity.getAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.currentChild.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  goToPrevious() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.currentIndex - 1 >= 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.goToParticipantWithIndex(this.currentIndex - 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  goToNext() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.currentIndex + 1 <= this.children.length) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.goToParticipantWithIndex(this.currentIndex + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  goToFirst() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.goToParticipantWithIndex(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  goToLast() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // jump directly to completed state, i.e. beyond last participant index
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.goToParticipantWithIndex(this.children.length);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  get isFirst(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.currentIndex === 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  get isLast(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.currentIndex === this.children.length - 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  get isFinished(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.currentIndex >= this.children.length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  finish() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.exit.emit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  showDetails() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.formDialog.openView(this.eventEntity, "NoteDetails");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async includeInactive() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const confirmation = await this.confirmationDialog.getConfirmation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      $localize`Also include archived participants?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      $localize`This event has some participants who are "archived". We automatically remove them from the attendance list for you. Do you want to also include archived participants for this event?`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (confirmation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.children = [...this.children, ...this.inactiveParticipants];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.inactiveParticipants = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ImportColumnMappingService.html b/documentation/injectables/ImportColumnMappingService.html new file mode 100644 index 0000000000..6e2a64d1d2 --- /dev/null +++ b/documentation/injectables/ImportColumnMappingService.html @@ -0,0 +1,396 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/import/import-column-mapping/import-column-mapping.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Infer most likely entity fields that the column from an imported file could be mapped to. +This is used by the Import Module to give users smart pre-selections in the user interface.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + automaticallySelectMappings + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +automaticallySelectMappings(columnMapping: ColumnMapping[], entitySchema: EntitySchema) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        columnMapping + ColumnMapping[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entitySchema + EntitySchema + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ColumnMapping } from "../column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitySchema } from "app/core/entity/schema/entity-schema";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Infer most likely entity fields that the column from an imported file could be mapped to.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This is used by the Import Module to give users smart pre-selections in the user interface.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ImportColumnMappingService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor() {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  automaticallySelectMappings(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    columnMapping: ColumnMapping[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entitySchema: EntitySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const allPropertyNames = Array.from(entitySchema.keys());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const colMap of columnMapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const lowerCaseColumn = colMap.column.toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      for (const propertyName of allPropertyNames) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const propertyLabel = entitySchema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          .get(propertyName)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          ?.label?.toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          lowerCaseColumn === propertyName.toLowerCase() ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          (propertyLabel && lowerCaseColumn === propertyLabel)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          colMap.propertyName = propertyName;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ImportService.html b/documentation/injectables/ImportService.html new file mode 100644 index 0000000000..6175d1683d --- /dev/null +++ b/documentation/injectables/ImportService.html @@ -0,0 +1,847 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/import/import.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Supporting import of data from spreadsheets.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(entityMapper: EntityMapperService, entityTypes: EntityRegistry, schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityTypes + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + executeImport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + executeImport(entitiesToImport: Entity[], settings: ImportSettings) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entitiesToImport + Entity[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          settings + ImportSettings + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<ImportMetadata> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + getLinkableEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +getLinkableEntities(entityType: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityType + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + transformRawDataToEntities + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + transformRawDataToEntities(rawData: any[], entityType: string, columnMapping: ColumnMapping[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Use the given mapping to transform raw data into Entity instances that can be displayed or saved.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rawData + any[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityType + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          columnMapping + ColumnMapping[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + undoImport + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +undoImport(item: ImportMetadata) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          item + ImportMetadata + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { RecurringActivity } from "../../child-dev-project/attendance/model/recurring-activity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ImportMetadata, ImportSettings } from "./import-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ColumnMapping } from "./column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaService } from "../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ChildSchoolRelation } from "../../child-dev-project/children/model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Supporting import of data from spreadsheets.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class ImportService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private linkableEntities: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [key: string]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [key: string]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        create: (entities: Entity[], id: string) => Promise<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        undo: (importMeta: ImportMetadata, id: string) => Promise<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  } = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // TODO: generalize this somehow by analyzing schemas?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ["Child"]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [RecurringActivity.ENTITY_TYPE]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        create: this.linkToActivity.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        undo: this.undoActivityLink.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ["School"]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        create: this.linkToSchool.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        undo: this.undoSchoolLink.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityTypes: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  getLinkableEntities(entityType: string): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Object.keys(this.linkableEntities[entityType] ?? {});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async executeImport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entitiesToImport: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    settings: ImportSettings,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<ImportMetadata> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await this.entityMapper.saveAll(entitiesToImport);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await this.linkEntities(entitiesToImport, settings);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.saveImportHistory(entitiesToImport, settings);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private async saveImportHistory(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    savedEntities: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    settings: ImportSettings,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const importMeta = new ImportMetadata();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    importMeta.config = settings;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    importMeta.ids = savedEntities.map((entity) => entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await this.entityMapper.save(importMeta);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return importMeta;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private linkEntities(entities: Entity[], settings: ImportSettings) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Promise.all(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      settings.additionalActions?.map(({ type, id }) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.linkableEntities[settings.entityType][type].create(entities, id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ) ?? [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private linkToSchool(entities: Entity[], id: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const relations = entities.map((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const relation = new ChildSchoolRelation();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      relation.childId = entity.getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      relation.schoolId = id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return relation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.entityMapper.saveAll(relations);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private async undoSchoolLink(importMeta: ImportMetadata) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const relations = await this.entityMapper.loadType(ChildSchoolRelation);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const imported = relations.filter((rel) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      importMeta.ids.includes(Entity.createPrefixedId("Child", rel.childId)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Promise.all(imported.map((rel) => this.entityMapper.remove(rel)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private async linkToActivity(entities: Entity[], id: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const activity = await this.entityMapper.load(RecurringActivity, id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const ids = entities.map((e) => e.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    activity.participants.push(...ids);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.entityMapper.save(activity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private async undoActivityLink(importMeta: ImportMetadata, id: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const activity = await this.entityMapper.load(RecurringActivity, id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    activity.participants = activity.participants.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (p) => !importMeta.ids.includes(Entity.createPrefixedId("Child", p)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.entityMapper.save(activity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  undoImport(item: ImportMetadata) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const removes = item.ids.map((id) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .load(item.config.entityType, id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .then((e) => this.entityMapper.remove(e))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .catch(() => undefined),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const undoes =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      item.config.additionalActions?.map(({ type, id }) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.linkableEntities[item.config.entityType][type].undo(item, id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ) ?? [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // Or should the ImportMetadata still be kept indicating that it has been undone?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Promise.all([...removes, ...undoes, this.entityMapper.remove(item)]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Use the given mapping to transform raw data into Entity instances that can be displayed or saved.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param rawData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param columnMapping
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async transformRawDataToEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    rawData: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    columnMapping: ColumnMapping[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<Entity[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!rawData || !entityType || !columnMapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const entityConstructor = this.entityTypes.get(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const mappedEntities: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const row of rawData) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const entity = new entityConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      let hasMappedProperty = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      for (const col in row) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const mapping: ColumnMapping = columnMapping.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          (c) => c.column === col,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (!mapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const parsed = await this.parseRow(row[col], mapping, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (parsed === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // ignoring falsy values except 0 (=> null, undefined, empty string)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (!!parsed || parsed === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          // enforcing array values to be correctly assigned
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          entity[mapping.propertyName] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            entityConstructor.schema.get(mapping.propertyName)?.isArray &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            !Array.isArray(parsed)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              ? [parsed]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              : parsed;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          hasMappedProperty = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (hasMappedProperty) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        mappedEntities.push(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return mappedEntities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private parseRow(val: any, mapping: ColumnMapping, entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (val === undefined || val === null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const schema = entity.getSchema().get(mapping.propertyName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!schema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.schemaService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .getDatatypeOrDefault(schema.dataType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .importMapFunction(val, schema, mapping.additional);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/InheritedValueService.html b/documentation/injectables/InheritedValueService.html new file mode 100644 index 0000000000..7858cc9aff --- /dev/null +++ b/documentation/injectables/InheritedValueService.html @@ -0,0 +1,966 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/default-values/inherited-value.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            An advanced default-value strategy that sets values based on the value in a referenced related entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This allows to configure hierarchies and inherited fields, +e.g. setting the category field based on the category field in a linked "parent entity".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + DefaultValueStrategy +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + getDefaultValueUiHint + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +getDefaultValueUiHint(form: EntityForm<T>, fieldId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Get details about the status and context of an inherited value field +to display to the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fieldId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + Async + initEntityForm + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + initEntityForm(form: EntityForm<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultValueStrategy +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + Async + onFormValueChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + onFormValueChanges(form: EntityForm<T>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultValueStrategy +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • T
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<T> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + setDefaultValue + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + setDefaultValue(targetFormControl: AbstractControl, fieldConfig: EntitySchemaField, form: EntityForm<any>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultValueStrategy +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Set up the inheritance value for a field, triggering an initial inheritance +and watching future changes of the source (parent) field for automatic updates.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            targetFormControl + AbstractControl<any | any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fieldConfig + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            form + EntityForm<any> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { AbstractControl } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntitySchemaField } from "../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityForm } from "../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  DefaultValueStrategy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  getConfigsByMode,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "./default-value-strategy.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DefaultValueConfig } from "../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DefaultValueHint } from "./default-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { asArray } from "../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * An advanced default-value strategy that sets values based on the value in a referenced related entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This allows to configure hierarchies and inherited fields,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * e.g. setting the category field based on the category field in a linked "parent entity".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class InheritedValueService extends DefaultValueStrategy {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(private entityMapper: EntityMapperService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override async initEntityForm<T extends Entity>(form: EntityForm<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.updateLinkedEntities(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Set up the inheritance value for a field, triggering an initial inheritance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * and watching future changes of the source (parent) field for automatic updates.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param targetFormControl
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param fieldConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    targetFormControl: AbstractControl<any, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form: EntityForm<any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // load inherited from initial entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.onSourceValueChange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      fieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.getParentRefId(form, fieldConfig.defaultValue),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // subscribe to update inherited whenever source field changes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let sourceFormControl: AbstractControl<any, any> | null =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.formGroup.get(fieldConfig.defaultValue.localAttribute);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (sourceFormControl && targetFormControl) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.watcher.set(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        "sourceFormControlValueChanges_" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          fieldConfig.defaultValue.localAttribute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        sourceFormControl.valueChanges.subscribe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          async (change) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            await this.onSourceValueChange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              fieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +              change,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Update the inherited (target field) value based on the change of the source field (parent reference) change.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param targetFormControl
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param fieldConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param change The new entity ID value of the source (parent ref) field.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async onSourceValueChange(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form: EntityForm<any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    targetFormControl: AbstractControl<any, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    change,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (form.formGroup.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      targetFormControl.dirty &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      !!targetFormControl.value &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.entity.isNew
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!form.entity.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!change || "") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      targetFormControl.setValue(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // source field is array, use first element if only one element
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (Array.isArray(change)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (change.length === 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        change = change[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        targetFormControl.setValue(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let parentEntity: Entity = await this.entityMapper.load(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Entity.extractTypeFromId(change),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      change,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      !parentEntity ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      parentEntity[fieldConfig.defaultValue.field] === undefined
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (fieldConfig.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      targetFormControl.setValue([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ...parentEntity[fieldConfig.defaultValue.field],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      targetFormControl.setValue(parentEntity[fieldConfig.defaultValue.field]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    targetFormControl.markAsUntouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    targetFormControl.markAsPristine();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override async onFormValueChanges<T extends Entity>(form: EntityForm<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.updateLinkedEntities(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Get details about the status and context of an inherited value field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * to display to the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param fieldId
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  getDefaultValueUiHint<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): DefaultValueHint | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const defaultConfig = form?.defaultValueConfigs?.get(fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!defaultConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const parentRefValue = this.getParentRefId(form, defaultConfig);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!parentRefValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        inheritedFromField: defaultConfig.localAttribute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        isEmpty: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      inheritedFromField: defaultConfig.localAttribute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      inheritedFromType: parentRefValue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ? Entity.extractTypeFromId(parentRefValue)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        : undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      isInSync:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        JSON.stringify(form.inheritedParentValues.get(fieldId)) ===
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        JSON.stringify(form.formGroup.get(fieldId)?.value),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      syncFromParentField: () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        form.formGroup
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          .get(fieldId)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          .setValue(form.inheritedParentValues.get(fieldId));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async updateLinkedEntities<T extends Entity>(form: EntityForm<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let inheritedConfigs: Map<string, DefaultValueConfig> = getConfigsByMode(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.defaultValueConfigs,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ["inherited"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const linkedEntityRefs: Map<string, string[]> = this.getLinkedEntityRefs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      inheritedConfigs,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (let [fieldId, parentEntityIds] of linkedEntityRefs) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (parentEntityIds.length > 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // multi-inheritance not supported (yet) -> keep values in form and stop inheritance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        form.inheritedParentValues.delete(fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      let parentEntity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (parentEntityIds.length === 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        parentEntity = await this.entityMapper.load(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Entity.extractTypeFromId(parentEntityIds[0]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          parentEntityIds[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // if value empty -> set inherited values to undefined
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.inheritedParentValues.set(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        fieldId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        parentEntity?.[inheritedConfigs.get(fieldId).field],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Get the linked entity references from the form.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param inheritedConfigs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @return Entity ids of the linked parent entities (always wrapped as an array)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private getLinkedEntityRefs<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    inheritedConfigs: Map<string, DefaultValueConfig>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Map<string, string[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const linkedEntityRefs: Map<string, string[]> = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (const [key, defaultValueConfig] of inheritedConfigs) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      let linkedEntities: null | string | string[] = this.getParentRefId(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        defaultValueConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (linkedEntities == null || linkedEntities.length == 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      linkedEntityRefs.set(key, asArray(linkedEntities));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return linkedEntityRefs;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Get the parent reference id from the form or entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param defaultConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param castToSingle Whether for arrays of IDs, this should be cast to a single ID only.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private getParentRefId<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    defaultConfig: DefaultValueConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    castToSingle = true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): string | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const linkedFieldValue =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.formGroup?.get(defaultConfig.localAttribute)?.value ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      form.entity?.[defaultConfig.localAttribute];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!castToSingle) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return linkedFieldValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (Array.isArray(linkedFieldValue)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // inheritance is only supported for a single parent reference
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return linkedFieldValue?.length === 1 ? linkedFieldValue[0] : undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return linkedFieldValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/KeycloakAuthService.html b/documentation/injectables/KeycloakAuthService.html new file mode 100644 index 0000000000..f23e9f6713 --- /dev/null +++ b/documentation/injectables/KeycloakAuthService.html @@ -0,0 +1,1376 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/session/auth/keycloak/keycloak-auth.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Handles the remote session with keycloak

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(httpClient: HttpClient, keycloak: KeycloakService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              httpClient + HttpClient + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              keycloak + KeycloakService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + addAuthHeader + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +addAuthHeader(headers: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Add the Bearer auth header to a existing header object.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              headers + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + changePassword + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +changePassword() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Open password reset page in browser. +Only works with internet connection.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + createUser + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +createUser(user: Partial<KeycloakUserDto>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              user + Partial<KeycloakUserDto> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + deleteUser + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +deleteUser(username: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              username + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + getRoles + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +getRoles() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Get a list of all roles generally available in the user management system.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<Role[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + getUser + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +getUser(username: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              username + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<KeycloakUserDto> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + getUserinfo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + getUserinfo() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<KeycloakUserDto> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + login + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + login() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Check for an existing session or forward to the login page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<SessionInfo> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Async + logout + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + logout() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Forward to the keycloak logout endpoint to clear the session.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + logSuccessfulAuth + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +logSuccessfulAuth() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Log timestamp of last successful authentication

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + setEmail + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +setEmail(email: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              email + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + updateUser + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +updateUser(userId: string, user: Partial<KeycloakUserDto>) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              userId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              user + Partial<KeycloakUserDto> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + accessToken + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + Readonly + ACCOUNT_MANAGER_ROLE + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "account_manager" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Users with this role can create and update other accounts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + Readonly + LAST_AUTH_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "LAST_REMOTE_LOGIN" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { environment } from "../../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { SessionInfo } from "../session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { KeycloakEventType, KeycloakService } from "keycloak-angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ParsedJWT, parseJwt } from "../../session-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RemoteLoginNotAvailableError } from "./remote-login-not-available.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { switchMap } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Handles the remote session with keycloak
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class KeycloakAuthService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Users with this role can create and update other accounts.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static readonly ACCOUNT_MANAGER_ROLE = "account_manager";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static readonly LAST_AUTH_KEY = "LAST_REMOTE_LOGIN";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private keycloakInitialised = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  accessToken: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private httpClient: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private keycloak: KeycloakService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Check for an existing session or forward to the login page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async login(): Promise<SessionInfo> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this.keycloakInitialised) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.initKeycloak();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    await this.keycloak.updateToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let token = await this.keycloak.getToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!token) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // Forward to the keycloak login page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.keycloak.login({ redirectUri: location.href });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      token = await this.keycloak.getToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.processToken(token);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async initKeycloak() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.keycloak.init({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        config: window.location.origin + "/assets/keycloak.json",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        initOptions: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          onLoad: "check-sso",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          silentCheckSsoRedirectUri:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            window.location.origin + "/assets/silent-check-sso.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // GitHub API rejects if non GitHub bearer token is present
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        shouldAddToken: ({ url }) => !url.includes("api.github.com"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        err?.error ===
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        "Timeout when waiting for 3rd party check iframe message."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // this is actually an expected scenario, user's internet is slow or not available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        err = new RemoteLoginNotAvailableError();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.error("Keycloak init failed", err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.keycloakInitialised = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // auto-refresh expiring tokens, as suggested by https://github.com/mauriciovigolo/keycloak-angular?tab=readme-ov-file#keycloak-js-events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.keycloak.keycloakEvents$.subscribe((event) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (event.type == KeycloakEventType.OnTokenExpired) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.login().catch((err) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Logging.debug("automatic token refresh failed", err),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.keycloakInitialised = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private processToken(token: string): SessionInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!token) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw new Error("No token received from Keycloak");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.accessToken = token;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.logSuccessfulAuth();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const parsedToken: ParsedJWT = parseJwt(this.accessToken);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const sessionInfo: SessionInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      name: parsedToken.username ?? parsedToken.sub,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      id: parsedToken.sub,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      roles: parsedToken["_couchdb.roles"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      email: parsedToken.email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (parsedToken.username) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      sessionInfo.entityId = parsedToken.username.includes(":")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ? parsedToken.username
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        : // fallback for legacy config: manually add "User" entity prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Entity.createPrefixedId("User", parsedToken.username);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        `User not linked with an entity (userId: ${sessionInfo.id} | ${sessionInfo.name})`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (parsedToken.email) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      sessionInfo.email = parsedToken.email;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return sessionInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Add the Bearer auth header to a existing header object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param headers
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  addAuthHeader(headers: any) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.accessToken) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (headers.set && typeof headers.set === "function") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // PouchDB headers are set as a map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        headers.set("Authorization", "Bearer " + this.accessToken);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // Interceptor headers are set as a simple object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        headers["Authorization"] = "Bearer " + this.accessToken;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Forward to the keycloak logout endpoint to clear the session.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async logout() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return await this.keycloak.logout(location.href);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Open password reset page in browser.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Only works with internet connection.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  changePassword(): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.keycloak.login({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      action: "UPDATE_PASSWORD",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      redirectUri: location.href,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async getUserinfo(): Promise<KeycloakUserDto> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const user = await this.keycloak.getKeycloakInstance().loadUserInfo();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return user as KeycloakUserDto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  setEmail(email: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.put(`${environment.account_url}/account/set-email`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  createUser(user: Partial<KeycloakUserDto>): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.post(`${environment.account_url}/account`, user);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  deleteUser(username: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.getUser(username).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      switchMap((value) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.httpClient.delete(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          `${environment.account_url}/account/${value.id}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  updateUser(userId: string, user: Partial<KeycloakUserDto>): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.put(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      `${environment.account_url}/account/${userId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      user,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  getUser(username: string): Observable<KeycloakUserDto> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.get<KeycloakUserDto>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      `${environment.account_url}/account/${username}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Get a list of all roles generally available in the user management system.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  getRoles(): Observable<Role[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.get<Role[]>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      `${environment.account_url}/account/roles`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Log timestamp of last successful authentication
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  logSuccessfulAuth() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      KeycloakAuthService.LAST_AUTH_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      new Date().toISOString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Extract of Keycloak role object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * See {@link https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_rolerepresentation}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface Role {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  description: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Extract of Keycloak user object as provided by the external Keycloak Service.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * See {@link https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_userrepresentation}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * These fields overlap with our internal `SessionInfo` interface that is seen as abstracted from Keycloak.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface KeycloakUserDto {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  username: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  email: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  roles: Role[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  enabled: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/LanguageService.html b/documentation/injectables/LanguageService.html new file mode 100644 index 0000000000..69b0ed5509 --- /dev/null +++ b/documentation/injectables/LanguageService.html @@ -0,0 +1,461 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/language/language.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Service that provides the currently active locale and applies a newly selected one.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(baseLocale: string, window: Window, siteSettings: SiteSettingsService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                baseLocale + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                window + Window + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                siteSettings + SiteSettingsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + currentRegionCode + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +currentRegionCode() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                returns the region code of the locale currently used +Extracts the region code (i.e. 'de', 'us', 'in') in lowercase letters +from a locale (i.e. 'en-US', 'hi-IN')

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + initDefaultLanguage + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +initDefaultLanguage() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Inject, Injectable, LOCALE_ID } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { LANGUAGE_LOCAL_STORAGE_KEY } from "./language-statics";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { WINDOW_TOKEN } from "../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { SiteSettingsService } from "../site-settings/site-settings.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Service that provides the currently active locale and applies a newly selected one.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class LanguageService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @Inject(LOCALE_ID) private baseLocale: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @Inject(WINDOW_TOKEN) private window: Window,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private siteSettings: SiteSettingsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  initDefaultLanguage(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const languageSelected = this.window.localStorage.getItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      LANGUAGE_LOCAL_STORAGE_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!languageSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.siteSettings.defaultLanguage.subscribe(({ id }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (id !== this.baseLocale) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          // Reload app with default language from config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.window.localStorage.setItem(LANGUAGE_LOCAL_STORAGE_KEY, id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.window.location.reload();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * returns the region code of the locale currently used
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Extracts the region code (i.e. 'de', 'us', 'in') in lowercase letters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * from a locale (i.e. 'en-US', 'hi-IN')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  currentRegionCode(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const components = this.baseLocale.split("-");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (components.length >= 2) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return components[1].toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return components[0].toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/LatestChangesDialogService.html b/documentation/injectables/LatestChangesDialogService.html new file mode 100644 index 0000000000..abac7f2cc9 --- /dev/null +++ b/documentation/injectables/LatestChangesDialogService.html @@ -0,0 +1,602 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/ui/latest-changes/latest-changes-dialog.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Manage the changelog information and display it to the user +on request or automatically on the first visit of a new version after update.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(dialog: MatDialog, latestChangesService: LatestChangesService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  dialog + MatDialog + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  latestChangesService + LatestChangesService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + getCurrentVersion + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +getCurrentVersion() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Get current app version inferred from the latest changelog entry.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + showLatestChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + showLatestChanges(previousVersion?: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Open a modal window displaying the changelog of the latest version.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  previousVersion + string + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Optional) previous version back to which all changes should be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Public + showLatestChangesIfUpdated + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + showLatestChangesIfUpdated() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Display the latest changes info box automatically if the current user has not seen this version before.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Static + Readonly + VERSION_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "AppVersion" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ChangelogComponent } from "./changelog/changelog.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { environment } from "../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { LatestChangesService } from "./latest-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Manage the changelog information and display it to the user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * on request or automatically on the first visit of a new version after update.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class LatestChangesDialogService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public static readonly VERSION_KEY = "AppVersion";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private latestChangesService: LatestChangesService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Get current app version inferred from the latest changelog entry.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  getCurrentVersion(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return environment.appVersion;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Open a modal window displaying the changelog of the latest version.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param previousVersion (Optional) previous version back to which all changes should be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public showLatestChanges(previousVersion?: string): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .open(ChangelogComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        width: "80%",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        data: this.latestChangesService.getChangelogsBetweenVersions(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          this.getCurrentVersion(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          previousVersion,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe(() => this.updateCurrentVersion());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private updateCurrentVersion() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    window.localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      LatestChangesDialogService.VERSION_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.getCurrentVersion(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Display the latest changes info box automatically if the current user has not seen this version before.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public showLatestChangesIfUpdated() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const previousVersion = window.localStorage.getItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      LatestChangesDialogService.VERSION_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (previousVersion && this.getCurrentVersion() !== previousVersion) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.showLatestChanges(previousVersion);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/LatestChangesService.html b/documentation/injectables/LatestChangesService.html new file mode 100644 index 0000000000..b1077240cb --- /dev/null +++ b/documentation/injectables/LatestChangesService.html @@ -0,0 +1,647 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/ui/latest-changes/latest-changes.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Manage the changelog information and display it to the user +on request or automatically on the first visit of a new version after update.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(http: HttpClient, alertService: AlertService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    http + HttpClient + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + getChangelogsBeforeVersion + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +getChangelogsBeforeVersion(version: string, count: number) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Load the changelog information of a number of releases before (excluding) the given version.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    version + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The version for which preceding releases should be returned.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    count + number + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The number of releases before the given version to be returned

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Observable<Changelog[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + getChangelogsBetweenVersions + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +getChangelogsBetweenVersions(currentVersion: string, previousVersion?: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Load the changelog information of changes since the last update.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    currentVersion + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The current version for which changes are to be loaded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    previousVersion + string + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (Optional) The older version since which changes of all versions until the currentVersion will be loaded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Observable<Changelog[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { catchError, map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Observable, throwError } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Changelog } from "./changelog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { AlertService } from "../../alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { environment } from "../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Manage the changelog information and display it to the user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * on request or automatically on the first visit of a new version after update.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class LatestChangesService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private static GITHUB_API = "https://api.github.com/repos/";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private http: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Load the changelog information of changes since the last update.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param currentVersion The current version for which changes are to be loaded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param previousVersion (Optional) The older version since which changes of all versions until the currentVersion will be loaded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  getChangelogsBetweenVersions(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    currentVersion: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    previousVersion?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Observable<Changelog[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.getChangelogs((releases) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.filterReleasesBetween(releases, currentVersion, previousVersion),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private filterReleasesBetween(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    releases: Changelog[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    currentVersion: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    previousVersion?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const releasesUpToCurrentVersion = releases.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      (r) => this.compareVersion(r.tag_name, currentVersion) <= 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (releasesUpToCurrentVersion.length < 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (previousVersion) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return releasesUpToCurrentVersion
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .filter((r) => this.compareVersion(r.tag_name, previousVersion) > 0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .sort((a, b) => this.compareVersion(b.tag_name, a.tag_name));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return [releasesUpToCurrentVersion[0]];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Load the changelog information of a number of releases before (excluding) the given version.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param version The version for which preceding releases should be returned.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param count The number of releases before the given version to be returned
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  getChangelogsBeforeVersion(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    version: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    count: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Observable<Changelog[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.getChangelogs((releases: Changelog[]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.filterReleasesBefore(releases, version, count),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private filterReleasesBefore(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    releases: Changelog[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    version: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    count: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return releases
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .filter((r) => (version ? r.tag_name < version : true))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .sort((a, b) => this.compareVersion(b.tag_name, a.tag_name))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .slice(0, count);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private compareVersion(a: string, b: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return a.localeCompare(b, "en", { numeric: true });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Load release information from GitHub based on a given filter to select relevant releases.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param releaseFilter Filter function that is selecting relevant objects from the array of GitHub releases
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private getChangelogs(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    releaseFilter: (releases: Changelog[]) => Changelog[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Observable<Changelog[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .get<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        Changelog[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      >(`${LatestChangesService.GITHUB_API}${environment.repositoryId}/releases`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        map(excludePrereleases),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        map(releaseFilter),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        map((relevantReleases) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          relevantReleases.map((r) => this.parseGithubApiRelease(r)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        catchError((error) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          this.alertService.addWarning(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            $localize`Could not load latest changes: ${error}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          return throwError(() => new Error("Could not load latest changes."));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    function excludePrereleases(releases: Changelog[]): Changelog[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return releases.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        (release) => !release.prerelease && !release.draft,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private parseGithubApiRelease(githubResponse: Changelog): Changelog {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const cleanedReleaseNotes = githubResponse.body
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .replace(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // remove heading
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        /#{1,2}[^###]*/,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .replace(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // remove commit refs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        / \(\[\w{7}\]\([^\)]*\)\)/g,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .replace(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // remove lines starting with "." after markdown characters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        /^(\*|\#)* *\.(.*)(\n|\r\n)/gm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      tag_name: githubResponse.tag_name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      name: githubResponse.name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      published_at: githubResponse.published_at,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      body: cleanedReleaseNotes,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/LocalAuthService.html b/documentation/injectables/LocalAuthService.html new file mode 100644 index 0000000000..c9f042be18 --- /dev/null +++ b/documentation/injectables/LocalAuthService.html @@ -0,0 +1,408 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/session/auth/local/local-auth.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Manages the offline login.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + getStoredUsers + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +getStoredUsers() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get a list of users stored in the local storage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : SessionInfo[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + saveUser + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +saveUser(user: SessionInfo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Saves a user to the local storage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      user + SessionInfo + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      a object holding the username and the roles of the user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SessionInfo } from "../session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Manages the offline login.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class LocalAuthService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private readonly STORED_USER_PREFIX = "USER-";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Get a list of users stored in the local storage.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  getStoredUsers(): SessionInfo[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return Object.entries(localStorage)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .filter(([key]) => key.startsWith(this.STORED_USER_PREFIX))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .map(([_, user]) => JSON.parse(user));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Saves a user to the local storage
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param user a object holding the username and the roles of the user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  saveUser(user: SessionInfo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.STORED_USER_PREFIX + user.name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      JSON.stringify(user),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/LocationDatatype.html b/documentation/injectables/LocationDatatype.html new file mode 100644 index 0000000000..4631048b51 --- /dev/null +++ b/documentation/injectables/LocationDatatype.html @@ -0,0 +1,1067 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/features/location/location.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DefaultDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(geoService: GeoService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        geoService + GeoService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + importMapFunction(val: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:46 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        val + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<GeoLocation> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + transformToObjectFormat(value: GeoLocation) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:29 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + GeoLocation + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : GeoLocation + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +transformToDatabaseFormat(value: EntityType, schemaField?: EntitySchemaField, parent?: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:72 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Transformation function taking a value in the format that is used in entity instances and returning the value +in the format used in database objects.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             This can be set as a parameter to the `@DatabaseField()` annotation in Entity classes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The value (in Entity format) to be transformed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The EntitySchemaField configuration providing details of how the value should be transformed. +This can be set as a parameter to the @DatabaseField() annotation in Entity classes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        parent + Entity + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The full entity instance this value is part of (e.g. to allow cross-related transformations)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : DBType + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "location" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:19 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "EditLocation" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:22 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : $localize`:datatype-label:location (address + map)` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:20 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "ViewLocation" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:23 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { DefaultDatatype } from "../../core/entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { GeoResult, GeoService } from "./geo.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { lastValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * A location both as custom string and an optional geo location lookup.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface GeoLocation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  locationString?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  geoLookup?: GeoResult;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class LocationDatatype extends DefaultDatatype<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  GeoLocation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  GeoLocation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override dataType = "location";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override label: string = $localize`:datatype-label:location (address + map)`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override editComponent = "EditLocation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override viewComponent = "ViewLocation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(private geoService: GeoService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override transformToObjectFormat(value: GeoLocation): GeoLocation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (typeof value !== "object") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // until we have an extended location datatype that includes a custom address addition field, discard invalid values (e.g. in case datatype was changed)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!value.hasOwnProperty("locationString")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // migrate from legacy format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        locationString: value["display_name"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        geoLookup: value as unknown as GeoResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override async importMapFunction(val: any): Promise<GeoLocation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!val) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const geoResults = await lastValueFrom(this.geoService.lookup(val));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return { locationString: val, geoLookup: geoResults[0] };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/LoginStateSubject.html b/documentation/injectables/LoginStateSubject.html new file mode 100644 index 0000000000..04339c4ab4 --- /dev/null +++ b/documentation/injectables/LoginStateSubject.html @@ -0,0 +1,283 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/session/session-type.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + BehaviorSubject +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { LoginState } from "./session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SyncState } from "./session-states/sync-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Available Session types with their keys that can be used in the app-config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export enum SessionType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * synced local PouchDB and remote CouchDB connection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  synced = "synced",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * local only demo mode - PouchDB database without a remote sync counterpart
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  local = "local",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * in-memory adapter of pouchdb database - data is lost after leaving the page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mock = "mock",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class LoginStateSubject extends BehaviorSubject<LoginState> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super(LoginState.LOGGED_OUT);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class SyncStateSubject extends BehaviorSubject<SyncState> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super(SyncState.UNSYNCED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/LongTextDatatype.html b/documentation/injectables/LongTextDatatype.html new file mode 100644 index 0000000000..a7daa0fa12 --- /dev/null +++ b/documentation/injectables/LongTextDatatype.html @@ -0,0 +1,982 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/basic-datatypes/string/long-text.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Datatype for multi-line string fields.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + StringDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + transformToDatabaseFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:38 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + transformToObjectFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            val + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The value from an imported cell to be mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            additional + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            config as returned by the configComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "long-text" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:9 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "EditLongText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:12 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : $localize`:datatype-label:text (long)` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:10 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "DisplayText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:60 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The default component how this datatype should be displayed in lists and forms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { StringDatatype } from "./string.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Datatype for multi-line string fields.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class LongTextDatatype extends StringDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static override dataType = "long-text";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static override label: string = $localize`:datatype-label:text (long)`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override editComponent = "EditLongText";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/MockFileService.html b/documentation/injectables/MockFileService.html new file mode 100644 index 0000000000..659f68a2ab --- /dev/null +++ b/documentation/injectables/MockFileService.html @@ -0,0 +1,841 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/file/mock-file.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A mock implementation of the file service which only stores the file temporarily in the browser. +This can be used in the demo mode. +NO FILES ARE UPLOADED OR DOWNLOADED

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + FileService +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(entityMapper: EntityMapperService, entities: EntityRegistry, syncState: SyncStateSubject, sanitizer: DomSanitizer) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              syncState + SyncStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              sanitizer + DomSanitizer + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + loadFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +loadFile(entity: Entity, property: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in FileService:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<SafeUrl> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + removeAllFiles + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +removeAllFiles(entity: Entity) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in FileService:33 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + removeFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +removeFile(entity: Entity, property: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in FileService:28 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + showFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +showFile(entity: Entity, property: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in FileService:37 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + uploadFile + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +uploadFile(file: File, entity: Entity, property: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Inherited from FileService +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Defined in FileService:47 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              file + File + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              entity + Entity + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EMPTY, Observable, of } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FileService } from "./file.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityRegistry } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { SyncStateSubject } from "../../core/session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * A mock implementation of the file service which only stores the file temporarily in the browser.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * This can be used in the demo mode.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * NO FILES ARE UPLOADED OR DOWNLOADED
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class MockFileService extends FileService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private fileMap = new Map<string, string>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    syncState: SyncStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private sanitizer: DomSanitizer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    super(entityMapper, entities, syncState);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  removeFile(entity: Entity, property: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.fileMap.delete(`${entity.getId()}:${property}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return of({ ok: true });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  removeAllFiles(entity: Entity): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return EMPTY;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  showFile(entity: Entity, property: string): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const url = this.fileMap.get(`${entity.getId()}:${property}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    window.open(url, "_blank");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  loadFile(entity: Entity, property: string): Observable<SafeUrl> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const url = this.fileMap.get(`${entity.getId()}:${property}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return of(this.sanitizer.bypassSecurityTrustUrl(url));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  uploadFile(file: File, entity: Entity, property: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const fileURL = URL.createObjectURL(file);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.fileMap.set(`${entity.getId()}:${property}`, fileURL);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return of({ ok: true });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/MonthDatatype.html b/documentation/injectables/MonthDatatype.html new file mode 100644 index 0000000000..bde4fe0e4e --- /dev/null +++ b/documentation/injectables/MonthDatatype.html @@ -0,0 +1,996 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/basic-datatypes/month/month.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Datatype for the EntitySchemaService transforming Date values to/from a short string month format ("YYYY-mm").

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Throws an exception if the property is set to something that is not a Date instance and cannot be cast to Date either. +Uses the import value mapping properties of the general DateDatatype.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                For example: +@DatabaseField({dataType: 'month'}) myMonth: Date = new Date('2020-01-15'); // will be "2020-01" in the database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + DateOnlyDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + transformToDatabaseFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:23 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + transformToObjectFormat(value: string, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:34 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                value + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                parent + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + anonymize(value: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:80 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                value + Date + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Promise<Date> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:67 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                val + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                schemaField + EntitySchemaField + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                additional + any + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "month" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:17 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "EditMonth" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:21 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : $localize`:datatype-label:month (date without day of month)` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:18 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "DisplayMonth" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:20 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Default value : "DateImportConfig" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Defined in DefaultDatatype:65 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DateOnlyDatatype } from "../date-only/date-only.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Datatype for the EntitySchemaService transforming Date values to/from a short string month format ("YYYY-mm").
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Throws an exception if the property is set to something that is not a Date instance and cannot be cast to Date either.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Uses the import value mapping properties of the general DateDatatype.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * For example:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * `@DatabaseField({dataType: 'month'}) myMonth: Date = new Date('2020-01-15'); // will be "2020-01" in the database`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class MonthDatatype extends DateOnlyDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static override dataType = "month";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static override label: string = $localize`:datatype-label:month (date without day of month)`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override viewComponent = "DisplayMonth";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override editComponent = "EditMonth";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override transformToDatabaseFormat(value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!(value instanceof Date)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      value = new Date(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      value.getFullYear().toString() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      "-" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (value.getMonth() + 1).toString().replace(/^(\d)$/g, "0$1")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override transformToObjectFormat(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    schemaField: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    parent: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const values = value.split("-").map((v) => Number(v));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const date = new Date(values[0], values[1] - 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (Number.isNaN(date.getTime())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        `failed to convert data '${value}' to Date object for ${parent?._id}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/NumberDatatype.html b/documentation/injectables/NumberDatatype.html new file mode 100644 index 0000000000..c3fd97bd63 --- /dev/null +++ b/documentation/injectables/NumberDatatype.html @@ -0,0 +1,999 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/basic-datatypes/number/number.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Datatype for the EntitySchemaService transforming values to "number".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This type is automatically used if you annotate a class's property that has the TypeScript type "number" +ensuring that even if values in the database from other sources are not of type number they will be cast to number.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  For example:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @DatabaseField() myNumber: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @DatabaseField({dataType: 'number'}) myValue: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + DefaultDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + transformToDatabaseFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:41 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + transformToObjectFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:45 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  val + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The value from an imported cell to be mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  additional + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  config as returned by the configComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "number" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:35 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "EditNumber" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:39 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : $localize`:datatype-label:number` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:36 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Default value : "DisplayText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:38 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { DefaultDatatype } from "../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Datatype for the EntitySchemaService transforming values to "number".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This type is automatically used if you annotate a class's property that has the TypeScript type "number"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * ensuring that even if values in the database from other sources are not of type number they will be cast to number.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * For example:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * `@DatabaseField() myNumber: number;`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * `@DatabaseField({dataType: 'number'}) myValue: any;`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class NumberDatatype extends DefaultDatatype<number, number> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static override dataType = "number";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static override label: string = $localize`:datatype-label:number`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override viewComponent = "DisplayText";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override editComponent = "EditNumber";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override transformToDatabaseFormat(value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return Number(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  override transformToObjectFormat(value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return Number(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/PermissionEnforcerService.html b/documentation/injectables/PermissionEnforcerService.html new file mode 100644 index 0000000000..fb6e029f00 --- /dev/null +++ b/documentation/injectables/PermissionEnforcerService.html @@ -0,0 +1,647 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/permissions/permission-enforcer/permission-enforcer.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This service checks whether the relevant rules for the current user changed. +If it detects a change, all Entity types that have read restrictions are collected. +All entities of these entity types are loaded and checked whether the currently logged-in user has read permissions. +If one entity is found for which the user does not have read permissions, then the local database is destroyed and a new sync has to start.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(sessionInfo: SessionSubject, ability: EntityAbility, entityMapper: EntityMapperService, database: Database, analyticsService: AnalyticsService, entities: EntityRegistry, location: Location, configService: ConfigService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ability + EntityAbility + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    database + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    analyticsService + AnalyticsService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + enforcePermissionsOnLocalData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + enforcePermissionsOnLocalData(userRules: DatabaseRule[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    userRules + DatabaseRule[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Static + Readonly + LOCALSTORAGE_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "RULES" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This is a suffix used to persist the user-relevant rules in local storage to later check for changes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DatabaseRule } from "../permission-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Database } from "../../database/database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LOCATION_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { AnalyticsService } from "../../analytics/analytics.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityAbility } from "../ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfigService } from "../../config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { firstValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This service checks whether the relevant rules for the current user changed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * If it detects a change, all Entity types that have read restrictions are collected.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * All entities of these entity types are loaded and checked whether the currently logged-in user has read permissions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * If one entity is found for which the user does **not** have read permissions, then the local database is destroyed and a new sync has to start.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class PermissionEnforcerService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This is a suffix used to persist the user-relevant rules in local storage to later check for changes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static readonly LOCALSTORAGE_KEY = "RULES";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private database: Database,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private analyticsService: AnalyticsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Inject(LOCATION_TOKEN) private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async enforcePermissionsOnLocalData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    userRules: DatabaseRule[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const userRulesString = JSON.stringify(userRules);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this.sessionInfo.value || !this.userRulesChanged(userRulesString)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const subjects = this.getSubjectsWithReadRestrictions(userRules);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (await this.dbHasEntitiesWithoutPermissions(subjects)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.analyticsService.eventTrack(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        "destroying local db due to lost permissions",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        { category: "Migration" },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.database.destroy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.location.reload();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    window.localStorage.setItem(this.getUserStorageKey(), userRulesString);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private userRulesChanged(newRules: string): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const storedRules = window.localStorage.getItem(this.getUserStorageKey());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return storedRules !== newRules;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private getUserStorageKey() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return `${this.sessionInfo.value.id}-${PermissionEnforcerService.LOCALSTORAGE_KEY}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private getSubjectsWithReadRestrictions(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    rules: DatabaseRule[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): EntityConstructor[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const subjects = new Set<string>(this.entities.keys());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    rules
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .filter((rule) => this.isReadRule(rule))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .forEach((rule) => this.collectSubjectsFromRule(rule, subjects));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return [...subjects].map((subj) => this.entities.get(subj));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private collectSubjectsFromRule(rule: DatabaseRule, subjects: Set<string>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const relevantSubjects = this.getRelevantSubjects(rule);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (rule.inverted || rule.conditions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // Add subject if the rule can prevent someone from having access
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      relevantSubjects.forEach((subject) => subjects.add(subject));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // Remove subject if rule gives access
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      relevantSubjects.forEach((subject) => subjects.delete(subject));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private isReadRule(rule: DatabaseRule): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      rule.action === "read" ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      rule.action.includes("read") ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      rule.action === "manage"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private getRelevantSubjects(rule: DatabaseRule): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let subjects: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (rule.subject === "all") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      subjects = [...this.entities.keys()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else if (Array.isArray(rule.subject)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      subjects = rule.subject;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      subjects = [rule.subject];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // Only return valid entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return subjects.filter((sub) => this.entities.has(sub));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async dbHasEntitiesWithoutPermissions(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    subjects: EntityConstructor[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // wait for config service to be ready before using the entity mapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await firstValueFrom(this.configService.configUpdates);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    for (const subject of subjects) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const entities = await this.entityMapper.loadType(subject);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (entities.some((entity) => this.ability.cannot("read", entity))) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/PouchDatabase.html b/documentation/injectables/PouchDatabase.html new file mode 100644 index 0000000000..fc6a3e1bae --- /dev/null +++ b/documentation/injectables/PouchDatabase.html @@ -0,0 +1,2194 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/database/pouch-database.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Wrapper for a PouchDB instance to decouple the code from +that external library.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Additional convenience functions on top of the PouchDB API +should be implemented in the abstract Database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Database +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(authService?: KeycloakAuthService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Create a PouchDB database manager.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      authService + KeycloakAuthService + + Yes +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + allDocs + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + allDocs(options?: GetAllOptions) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:214 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Load all documents (matching the given PouchDB options) from the database. +(see Database)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Normally you should rather use "getAll()" or another well typed method of this class +instead of passing PouchDB specific options here +because that will make your code tightly coupled with PouchDB rather than any other database provider.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      options + GetAllOptions + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      PouchDB options object as in the normal PouchDB library

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + changes + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +changes(prefix: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:318 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Listen to changes to documents which have an _id with the given prefix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      prefix + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      for which document changes are emitted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Observable<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      observable which emits the filtered changes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Static + create + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + create() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Small helper function which creates a database with in-memory PouchDB initialized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : PouchDatabase + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + destroy + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + destroy() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:352 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Destroy the database and all saved data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + get + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + get(id: string, options: GetOptions, returnUndefined?: boolean) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:185 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Load a single document by id from the database. +(see Database)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      id + string + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The primary key of the document to be loaded

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      options + GetOptions + + No + + {} + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Optional PouchDB options for the request

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      returnUndefined + boolean + + Yes + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (Optional) return undefined instead of throwing error if doc is not found in database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + getPouchDB + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +getPouchDB() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Get the actual instance of the PouchDB

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : PouchDB.Database + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + getPouchDBOnceReady + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + getPouchDBOnceReady() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<PouchDB.Database> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + initIndexedDB + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +initIndexedDB(dbName: string, options?: PouchDB.Configuration.DatabaseConfiguration) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Initialize the PouchDB with the IndexedDB/in-browser adapter (default). +See {link https://github.com/pouchdb/pouchdb/tree/master/packages/node_modules/pouchdb-browser}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      dbName + string + + No + + "indexed-database" + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      the name for the database under which the IndexedDB entries will be created

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      options + PouchDB.Configuration.DatabaseConfiguration + + Yes + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      PouchDB options which are directly passed to the constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : PouchDatabase + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + initInMemoryDB + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +initInMemoryDB(dbName: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      dbName + string + + No + + "in-memory-database" + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      the name for the database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : PouchDatabase + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + initRemoteDB + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +initRemoteDB(dbName) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Initializes the PouchDB with the http adapter to directly access a remote CouchDB without replication +See https://pouchdb.com/adapters.html#pouchdb_over_http

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      dbName + No + + `${environment.DB_PROXY_PREFIX}/${environment.DB_NAME}` + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (relative) path to the remote database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : PouchDatabase + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + isEmpty + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +isEmpty() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:307 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Check if a database is new/empty. +Returns true if there are no documents in the database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + put + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + put(object: any, forceOverwrite) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:233 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Save a document to the database. +(see Database)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      object + any + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The document to be saved

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forceOverwrite + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      (Optional) Whether conflicts should be ignored and an existing conflicting document forcefully overwritten.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Async + putAll + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + putAll(objects: any[], forceOverwrite) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:256 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Save an array of documents to the database + The save can partially fail and return a mix of success and error states in the array (e.g. [{ ok: true, ... }, { error: true, ... }])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      objects + any[] + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      the documents to be saved

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      forceOverwrite + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      whether conflicting versions should be overwritten

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      array with the result for each object to be saved, if any item fails to be saved, this returns a rejected Promise. +The save can partially fail and return a mix of success and error states in the array (e.g. [{ ok: true, ... }, { error: true, ... }])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + query + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +query(fun: string | , options: QueryOptions) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:378 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Query data from the database based on a more complex, indexed request. +(see Database)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This is directly calling the PouchDB implementation of this function. +Also see the documentation there: https://pouchdb.com/api.html#query_database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      fun + string | + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The name of a previously saved database index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      options + QueryOptions + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Additional options for the query, like a key. See the PouchDB docs for details.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + remove + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +remove(object: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:295 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Delete a document from the database +(see Database)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      object + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The document to be deleted (usually this object must at least contain the _id and _rev)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + reset + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +reset() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Reset the database state so a new one can be opened.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + saveDatabaseIndex + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +saveDatabaseIndex(designDoc: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:400 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Create a database index to query() certain data more efficiently in the future. +(see Database)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Also see the PouchDB documentation regarding indices and queries: https://pouchdb.com/api.html#query_database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      designDoc + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The PouchDB style design document for the map/reduce query

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + getAll + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +getAll(prefix: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Inherited from Database +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Defined in Database:88 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Load all documents (with the given prefix) from the database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      prefix + string + + No + + "" + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The string prefix of document ids that should be retrieved

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : Promise<Array<any>> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Database, GetAllOptions, GetOptions, QueryOptions } from "./database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Logging } from "../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import PouchDB from "pouchdb-browser";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import memory from "pouchdb-adapter-memory";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { PerformanceAnalysisLogging } from "../../utils/performance-analysis-logging";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Injectable, Optional } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { firstValueFrom, Observable, Subject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { HttpStatusCode } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { KeycloakAuthService } from "../session/auth/keycloak/keycloak-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Wrapper for a PouchDB instance to decouple the code from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * that external library.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Additional convenience functions on top of the PouchDB API
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * should be implemented in the abstract {@link Database}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class PouchDatabase extends Database {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Small helper function which creates a database with in-memory PouchDB initialized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static create(): PouchDatabase {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return new PouchDatabase().initInMemoryDB();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The reference to the PouchDB instance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private pouchDB: PouchDB.Database;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * A list of promises that resolve once all the (until now saved) indexes are created
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private indexPromises: Promise<any>[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * An observable that emits a value whenever the PouchDB receives a new change.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This change can come from the current user or remotely from the (live) synchronization
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private changesFeed: Subject<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private databaseInitialized = new Subject<void>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Create a PouchDB database manager.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(@Optional() private authService?: KeycloakAuthService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Initialize the PouchDB with the in-memory adapter.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * See {@link https://github.com/pouchdb/pouchdb/tree/master/packages/node_modules/pouchdb-adapter-memory}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param dbName the name for the database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  initInMemoryDB(dbName = "in-memory-database"): PouchDatabase {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    PouchDB.plugin(memory);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.pouchDB = new PouchDB(dbName, { adapter: "memory" });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.databaseInitialized.complete();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Initialize the PouchDB with the IndexedDB/in-browser adapter (default).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * See {link https://github.com/pouchdb/pouchdb/tree/master/packages/node_modules/pouchdb-browser}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param dbName the name for the database under which the IndexedDB entries will be created
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param options PouchDB options which are directly passed to the constructor
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  initIndexedDB(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    dbName = "indexed-database",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    options?: PouchDB.Configuration.DatabaseConfiguration,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): PouchDatabase {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.pouchDB = new PouchDB(dbName, options);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.databaseInitialized.complete();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Initializes the PouchDB with the http adapter to directly access a remote CouchDB without replication
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * See {@link https://pouchdb.com/adapters.html#pouchdb_over_http}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param dbName (relative) path to the remote database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param fetch a overwrite for the default fetch handler
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  initRemoteDB(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    dbName = `${environment.DB_PROXY_PREFIX}/${environment.DB_NAME}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): PouchDatabase {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const options = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      adapter: "http",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      skip_setup: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      fetch: (url: string | Request, opts: RequestInit) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.defaultFetch(url, opts),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.pouchDB = new PouchDB(dbName, options);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.databaseInitialized.complete();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private defaultFetch: Fetch = async (url: string | Request, opts: any) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (typeof url !== "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const err = new Error("PouchDatabase.fetch: url is not a string");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      err["details"] = url;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const remoteUrl =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      environment.DB_PROXY_PREFIX + url.split(environment.DB_PROXY_PREFIX)[1];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.authService.addAuthHeader(opts.headers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    let result: Response;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      result = await PouchDB.fetch(remoteUrl, opts);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.debug("navigator.onLine", navigator.onLine);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.warn("Failed to fetch from DB", err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // retry login if request failed with unauthorized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!result || result.status === HttpStatusCode.Unauthorized) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        await this.authService.login();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.authService.addAuthHeader(opts.headers);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        result = await PouchDB.fetch(remoteUrl, opts);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        Logging.debug("navigator.onLine", navigator.onLine);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        Logging.warn("Failed to fetch from DB", err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!result || result.status >= 500) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.debug("Actual DB Fetch response", result);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.debug("navigator.onLine", navigator.onLine);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      throw new DatabaseException({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        error: "Failed to fetch from DB",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        actualResponse: JSON.stringify(result.headers),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        actualResponseBody: await result?.text(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async getPouchDBOnceReady(): Promise<PouchDB.Database> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    await firstValueFrom(this.databaseInitialized, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      defaultValue: this.pouchDB,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.pouchDB;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Get the actual instance of the PouchDB
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  getPouchDB(): PouchDB.Database {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.pouchDB;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Load a single document by id from the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (see {@link Database})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param id The primary key of the document to be loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param options Optional PouchDB options for the request
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param returnUndefined (Optional) return undefined instead of throwing error if doc is not found in database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    id: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    options: GetOptions = {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    returnUndefined?: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return await (await this.getPouchDBOnceReady()).get(id, options);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (err.status === 404) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        Logging.debug("Doc not found in database: " + id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        if (returnUndefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      throw new DatabaseException(err, id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Load all documents (matching the given PouchDB options) from the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (see {@link Database})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Normally you should rather use "getAll()" or another well typed method of this class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * instead of passing PouchDB specific options here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * because that will make your code tightly coupled with PouchDB rather than any other database provider.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param options PouchDB options object as in the normal PouchDB library
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async allDocs(options?: GetAllOptions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const result = await (await this.getPouchDBOnceReady()).allDocs(options);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return result.rows.map((row) => row.doc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      throw new DatabaseException(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        err,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        "allDocs; startkey: " + options?.["startkey"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Save a document to the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (see {@link Database})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param object The document to be saved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param forceOverwrite (Optional) Whether conflicts should be ignored and an existing conflicting document forcefully overwritten.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async put(object: any, forceOverwrite = false): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (forceOverwrite) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      object._rev = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return await (await this.getPouchDBOnceReady()).put(object);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (err.status === 409) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        return this.resolveConflict(object, forceOverwrite, err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        throw new DatabaseException(err, object._id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Save an array of documents to the database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param objects the documents to be saved
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param forceOverwrite whether conflicting versions should be overwritten
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @returns array with the result for each object to be saved, if any item fails to be saved, this returns a rejected Promise.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *          The save can partially fail and return a mix of success and error states in the array (e.g. `[{ ok: true, ... }, { error: true, ... }]`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async putAll(objects: any[], forceOverwrite = false): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (forceOverwrite) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      objects.forEach((obj) => (obj._rev = undefined));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const pouchDB = await this.getPouchDBOnceReady();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const results = await pouchDB.bulkDocs(objects);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (let i = 0; i < results.length; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // Check if document update conflicts happened in the request
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const result = results[i] as PouchDB.Core.Error;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (result.status === 409) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        results[i] = await this.resolveConflict(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          objects.find((obj) => obj._id === result.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          forceOverwrite,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          result,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ).catch((e) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            "error during putAll",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            e,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            objects.map((x) => x._id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          return new DatabaseException(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (results.some((r) => r instanceof Error)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return Promise.reject(results);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return results;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Delete a document from the database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (see {@link Database})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param object The document to be deleted (usually this object must at least contain the _id and _rev)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  remove(object: any) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.getPouchDBOnceReady()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .then((pouchDB) => pouchDB.remove(object))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .catch((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        throw new DatabaseException(err, object["_id"]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Check if a database is new/empty.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Returns true if there are no documents in the database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  isEmpty(): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.getPouchDBOnceReady()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .then((pouchDB) => pouchDB.info())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .then((res) => res.doc_count === 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Listen to changes to documents which have an _id with the given prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param prefix for which document changes are emitted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @returns observable which emits the filtered changes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  changes(prefix: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.changesFeed) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.changesFeed = new Subject();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.subscribeChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.changesFeed.pipe(filter((doc) => doc._id.startsWith(prefix)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async subscribeChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    (await this.getPouchDBOnceReady())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .changes({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        live: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        since: "now",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        include_docs: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .addListener("change", (change) => this.changesFeed.next(change.doc))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .catch((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          err.statusCode === HttpStatusCode.Unauthorized ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          err.statusCode === HttpStatusCode.GatewayTimeout
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          Logging.warn(err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          Logging.error(err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        // retry
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        setTimeout(() => this.subscribeChanges(), 10000);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Destroy the database and all saved data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async destroy(): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    await Promise.all(this.indexPromises);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.pouchDB) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return this.pouchDB.destroy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Reset the database state so a new one can be opened.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  reset() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.pouchDB = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.changesFeed = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.databaseInitialized = new Subject();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Query data from the database based on a more complex, indexed request.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (see {@link Database})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This is directly calling the PouchDB implementation of this function.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Also see the documentation there: {@link https://pouchdb.com/api.html#query_database}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param fun The name of a previously saved database index
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param options Additional options for the query, like a `key`. See the PouchDB docs for details.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  query(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    fun: string | ((doc: any, emit: any) => void),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    options: QueryOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return this.getPouchDBOnceReady()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .then((pouchDB) => pouchDB.query(fun, options))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .catch((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        throw new DatabaseException(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          err,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          typeof fun === "string" ? fun : undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Create a database index to `query()` certain data more efficiently in the future.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * (see {@link Database})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Also see the PouchDB documentation regarding indices and queries: {@link https://pouchdb.com/api.html#query_database}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param designDoc The PouchDB style design document for the map/reduce query
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  saveDatabaseIndex(designDoc: any): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const creationPromise = this.createOrUpdateDesignDoc(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.indexPromises.push(creationPromise);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return creationPromise;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async createOrUpdateDesignDoc(designDoc): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const existingDesignDoc = await this.get(designDoc._id, {}, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!existingDesignDoc) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.debug("creating new database index");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      JSON.stringify(existingDesignDoc.views) !==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      JSON.stringify(designDoc.views)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.debug("replacing existing database index");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      designDoc._rev = existingDesignDoc._rev;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // already up to date, nothing more to do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    await this.put(designDoc, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    await this.prebuildViewsOfDesignDoc(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @PerformanceAnalysisLogging
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async prebuildViewsOfDesignDoc(designDoc: any): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const viewName of Object.keys(designDoc.views)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const queryName = designDoc._id.replace(/_design\//, "") + "/" + viewName;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      await this.query(queryName, { key: "1" });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Attempt to intelligently resolve conflicting document versions automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param newObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param overwriteChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param existingError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private async resolveConflict(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    newObject: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    overwriteChanges = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    existingError: any = {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const existingObject = await this.get(newObject._id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const resolvedObject = this.mergeObjects(existingObject, newObject);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (resolvedObject) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        "resolved document conflict automatically (" + resolvedObject._id + ")",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return this.put(resolvedObject);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else if (overwriteChanges) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        "overwriting conflicting document version (" + newObject._id + ")",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      newObject._rev = existingObject._rev;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return this.put(newObject);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      existingError.message = `${
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        existingError.message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      } (unable to resolve) ID: ${JSON.stringify(newObject)}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      throw new DatabaseException(existingError);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private mergeObjects(_existingObject: any, _newObject: any) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // TODO: implement automatic merging of conflicting entity versions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * This overwrites PouchDB's error class which only logs limited information
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +class DatabaseException extends Error {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    error: PouchDB.Core.Error | { [key: string]: any },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    entityId?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (entityId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      error["entityId"] = entityId;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    Object.assign(this, error);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/PwaInstallService.html b/documentation/injectables/PwaInstallService.html new file mode 100644 index 0000000000..cdcd30e2f0 --- /dev/null +++ b/documentation/injectables/PwaInstallService.html @@ -0,0 +1,600 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/pwa-install/pwa-install.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(window: Window) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        window + Window + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + getPWAInstallType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +getPWAInstallType() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : PWAInstallType + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + installPWA + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +installPWA() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + registerPWAInstallListener + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + registerPWAInstallListener() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + canInstallDirectly + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Promise<void> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Resolves once/if it is possible to directly install the app

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { WINDOW_TOKEN } from "../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export enum PWAInstallType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ShowiOSInstallInstructions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  RunningAsPWA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  NotAvailable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +enum Browser {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Opera,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MicrosoftInternetExplorer,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Edge,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Safari,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Chrome,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Firefox,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Other,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +enum OS {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  iOS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MacOS,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Android,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Linux,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Windows,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Other,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class PwaInstallService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Resolves once/if it is possible to directly install the app
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static canInstallDirectly: Promise<void>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private static deferredInstallPrompt: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(@Inject(WINDOW_TOKEN) private window: Window) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static registerPWAInstallListener() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.canInstallDirectly = new Promise((resolve) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      window.addEventListener("beforeinstallprompt", (e) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        e.preventDefault();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.deferredInstallPrompt = e;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        resolve();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  installPWA(): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!PwaInstallService.deferredInstallPrompt) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      throw new Error(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        "InstallPWA called, but PWA install prompt has not fired.",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    PwaInstallService.deferredInstallPrompt.prompt();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return PwaInstallService.deferredInstallPrompt.userChoice;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getPWAInstallType(): PWAInstallType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const os: OS = this.detectOS();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const browser: Browser = this.detectBrowser();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const standaloneMode: boolean = this.detectStandaloneMode();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let pwaInstallType: PWAInstallType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (standaloneMode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      pwaInstallType = PWAInstallType.RunningAsPWA;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (os === OS.iOS && browser === Browser.Safari) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      pwaInstallType = PWAInstallType.ShowiOSInstallInstructions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      pwaInstallType = PWAInstallType.NotAvailable;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return pwaInstallType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private detectOS(): OS {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let os: OS;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const userAgent = this.window.navigator.userAgent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (/iphone|ipad|ipod|macintosh/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (this.window.innerWidth < 1025) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        os = OS.iOS;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        os = OS.MacOS;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/android/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      os = OS.Android;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/windows|win32|win64|WinCE/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      os = OS.Windows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/linux|X11/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      os = OS.Linux;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return os;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private detectBrowser(): Browser {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let browser: Browser;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const userAgent = this.window.navigator.userAgent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (/opera/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      browser = Browser.Opera;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/msie|trident/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      browser = Browser.MicrosoftInternetExplorer;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/edg/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      browser = Browser.Edge;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/chrome/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      browser = Browser.Chrome;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/safari/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      browser = Browser.Safari;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (/crios|fxios/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        browser = Browser.Chrome;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (/firefox/i.test(userAgent)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      browser = Browser.Firefox;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      browser = Browser.Other;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return browser;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private detectStandaloneMode(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ("standalone" in this.window.navigator &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        !!this.window.navigator["standalone"]) ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.window.matchMedia("(display-mode: standalone)").matches
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/QueryService.html b/documentation/injectables/QueryService.html new file mode 100644 index 0000000000..c096034591 --- /dev/null +++ b/documentation/injectables/QueryService.html @@ -0,0 +1,1079 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/export/query.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A query service which uses the json-query library (https://github.com/auditassistant/json-query).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(entityMapper: EntityMapperService, childrenService: ChildrenService, attendanceService: AttendanceService, entityRegistry: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          childrenService + ChildrenService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          attendanceService + AttendanceService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entityRegistry + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + cacheRequiredData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + cacheRequiredData(query: string, from: Date, to: Date) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Call this function to prefetch required data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          query + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          single query or concatenation of all query strings that will be executed soon

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          from + Date + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          date from which data should be available

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          to + Date + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          date to which data should be available

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Public + queryData + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + queryData(query: string, from?: Date, to?: Date, data?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Runs the query on the passed data object

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          query + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          a string or array according to the json-query language (https://github.com/auditassistant/json-query)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          from + Date + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          a date which can be accessed in the query using a ?.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          to + Date + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          a date which can be accessed in the query using another ?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          data + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          the data on which the query should run, default is all entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          the results of the query on the data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity, EntityConstructor } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Note } from "../../child-dev-project/notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EventNote } from "../../child-dev-project/attendance/model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ChildSchoolRelation } from "../../child-dev-project/children/model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ChildrenService } from "../../child-dev-project/children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AttendanceService } from "../../child-dev-project/attendance/attendance.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EventAttendance } from "../../child-dev-project/attendance/model/event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import jsonQuery from "json-query";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A query service which uses the json-query library (https://github.com/auditassistant/json-query).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class QueryService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private entities: { [type: string]: { [id: string]: Entity } } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A map of information about the loading state of the different entity types
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private entityInfo: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [type: string]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * A optional function which can be used to load this entity that might use a start and end date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dataFunction?: (form, to) => Promise<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * Whether already all entities of this type have been loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      allLoaded?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * A certain range in which entities of this type have been loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      rangeLoaded?: { from: Date; to: Date };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * Whether updates of this entity are listened to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      updating?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  } = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    Note: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dataFunction: (from, to) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.childrenService.getNotesInTimespan(from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    EventNote: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dataFunction: (from, to) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.attendanceService.getEventsOnDate(from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A list of further aliases for which a certain entity needs to be loaded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * This can be necessary if a function requires a certain entity to be present.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private queryStringMap: [string, EntityConstructor][] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ["getAttendanceArray\\(true\\)", ChildSchoolRelation],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityRegistry.forEach((entity, name) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.queryStringMap.push([name, entity]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Runs the query on the passed data object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param query a string or array according to the json-query language (https://github.com/auditassistant/json-query)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from a date which can be accessed in the query using a ?.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to a date which can be accessed in the query using another ?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the data on which the query should run, default is all entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the results of the query on the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  public queryData(query: string, from?: Date, to?: Date, data?: any): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from = from ?? new Date(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to = to ?? new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!data) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      data = this.entities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return jsonQuery([query, from, to], {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      data: data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      locals: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        toArray: this.toArray,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        unique: this.unique,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        count: this.count,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        sum: this.sum,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        avg: this.avg,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        toEntities: this.toEntities.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getRelated: this.getRelated.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        filterByObjectAttribute: this.filterByObjectAttribute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getIds: this.getIds,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getParticipantsWithAttendance: this.getParticipantsWithAttendance,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getAttendanceArray: this.getAttendanceArray.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getAttendanceReport: this.getAttendanceReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        addEntities: this.addEntities.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        setString: this.setString,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }).value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Call this function to prefetch required data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param query single query or concatenation of all query strings that will be executed soon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from date from which data should be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to date to which data should be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async cacheRequiredData(query: string, from: Date, to: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from = from ?? new Date(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to = to ?? new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const uncachedEntities = this.getUncachedEntities(query, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const dataPromises = uncachedEntities.map((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const info = this.entityInfo[entity.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (info?.dataFunction) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return info.dataFunction(from, to).then((loadedEntities) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.setEntities(entity, loadedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          info.rangeLoaded = { from, to };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.entityMapper.loadType(entity).then((loadedEntities) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.setEntities(entity, loadedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.entityInfo[entity.ENTITY_TYPE] = { allLoaded: true };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await Promise.all(dataPromises);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.applyEntityUpdates(uncachedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private applyEntityUpdates(uncachedEntities: EntityConstructor[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    uncachedEntities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter(({ ENTITY_TYPE }) => !this.entityInfo[ENTITY_TYPE].updating)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .forEach(({ ENTITY_TYPE }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.entityInfo[ENTITY_TYPE].updating = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          .receiveUpdates(ENTITY_TYPE)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          .subscribe(({ entity, type }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            if (type === "remove") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              delete this.entities[ENTITY_TYPE][entity.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              this.entities[ENTITY_TYPE][entity.getId()] = entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Get entities that are referenced in the query string and are not sufficiently cached.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param query
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getUncachedEntities(query: string, from: Date, to: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.queryStringMap
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter(([matcher]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // matches query string without any alphanumeric characters before or after (e.g. so Child does not match ChildSchoolRelation)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        query?.match(new RegExp(`(^|\\W)${matcher}(\\W|$)`)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map(([_, entity]) => entity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const info = this.entityInfo[entity.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          info === undefined ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          !(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            info.allLoaded ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            (info.rangeLoaded?.from <= from && info.rangeLoaded?.to >= to)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private setEntities<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityClass: EntityConstructor<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entities: T[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.entities[entityClass.ENTITY_TYPE] = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entities.forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (this.entities[entityClass.ENTITY_TYPE][entity.getId()] = entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Creates an array containing the value of each key of the object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * e.g. `{a: 1, b: 2} => [1,2]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * This should be used when iterating over all documents of a given entity type because they are stored as
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * `"{entity._id}": {entity}`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param obj the object which should be transformed to an array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the values of the input object as a list
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private toArray(obj): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Object.values(obj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns a copy of the input array without duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the array where duplicates should be removed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a list without duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private unique(data: any[]): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return new Array(...new Set(data));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Get the size of an array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the data for which the length should be returned
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the length of the input array or 0 if no array is provided
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private count(data: any[]): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return data ? data.length : 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns the (integer) sum of the provided array.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * It can also handle integers in strings, e.g. "3"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data an integer array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private sum(data: any[]): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return data.reduce((res, cur) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const parsed = Number.parseInt(cur);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return Number.isNaN(parsed) ? res : res + parsed;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns the avg of the provided array as string.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * It can also handle integers in strings, e.g. "3".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The average is only calculated if the value exists and is a valid number.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data an integer array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param decimals the amount of decimals for the result, default 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private avg(data: any[], decimals = 0): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const numbers = data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((d) => Number.parseInt(d))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((i) => !Number.isNaN(i));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const result =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      numbers.length === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ? 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        : numbers.reduce((i, sum) => sum + i, 0) / numbers.length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return result.toFixed(decimals);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Turns a list of ids (with the entity prefix) into a list of entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param ids the array of ids with entity prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityPrefix indicate the type of entity that should be loaded. This is required for pre-loading the required entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a list of entity objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private toEntities(ids: string[], entityPrefix: string): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!entityPrefix) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      throw new Error("Entity type not defined");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!ids) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return ids
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((id) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (typeof id !== "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          console.debug("invalid entity id in Query :toEntities", id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((id) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const prefix = id.split(":")[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.entities[prefix][id];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((entity) => !!entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns all entities which reference a entity from the passed list of entities (by their id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param srcEntities the entities for which relations should be found
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityType the type of entities where relations should be looked for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param relationKey the name of the attribute that holds the reference.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *                    The attribute can be a string or a list of strings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a list of the related unique entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getRelated(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    srcEntities: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    relationKey: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const targetEntities = this.toArray(this.entities[entityType]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const srcIds = srcEntities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((entity) => typeof entity.getId === "function") // skip empty placeholder objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((entity) => entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      targetEntities.length > 0 &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Array.isArray(targetEntities[0][relationKey])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return targetEntities.filter((entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (entity[relationKey] as string[]).some((id) => srcIds.includes(id)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return targetEntities.filter((entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        entity[relationKey] ? srcIds.includes(entity[relationKey]) : false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Filters the data when the filter value is a object (e.g. configurable enum) rather than a simple value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param objs the objects to be filtered
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param attr the attribute of the objects which is a object itself
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param key the key of the attribute-object which should be compared
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param value the value which will be compared with `obj[attr][key]` for each obj in objs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *              The value can be a simple value or list of values separated by `|` (e.g. SCHOOL_CLASS|LIFE_SKILLS).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *              If it is a list of values, then the object is returned if its value matches any of the given values.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the filtered objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private filterByObjectAttribute(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    objs: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attr: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    key: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // splits at "|" and removes optional whitespace before or after the symbol
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const values = value.trim().split(/\s*\|\s*/);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return objs.filter((obj) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (obj?.hasOwnProperty(attr)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return values.includes(obj[attr][key]?.toString());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns a list of IDs held by each object (e.g. the children-IDs held by an array of notes)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param objs the objects which each holds a list of IDs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param key the key on which each object holds a list of IDs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a one dimensional string array holding all IDs which are held by the objects.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *            This list may contain duplicate IDs. If this is not desired, use `:unique` afterwards.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getIds(objs: any[], key: string): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const ids: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    objs.forEach((obj) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (obj.hasOwnProperty(key)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ids.push(...obj[key]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return ids;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Return the ids of all the participants of the passed events with the defined attendance status using the `countAs`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * attribute. The list may contain duplicates and the id does not necessarily have the entity prefix.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param events the array of events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param attendanceStatus the status for which should be looked for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the ids of children which have the specified attendance in an event
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getParticipantsWithAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    events: EventNote[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attendanceStatus: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const attendedChildren: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    events.forEach((e) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      e.children.forEach((childId) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (e.getAttendance(childId).status.countAs === attendanceStatus) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          attendedChildren.push(childId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return attendedChildren;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Transforms a list of notes or event-notes into a flattened list of participants and their attendance for each event.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param events the input list of type Note or EventNote
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param includeSchool (optional) also include the school to which a participant belongs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns AttendanceInfo[] a list holding information about the attendance of a single participant
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getAttendanceArray(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    events: Note[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    includeSchool = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): AttendanceInfo[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const attendances: AttendanceInfo[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const event of events) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const linkedRelations = includeSchool
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ? this.getMembersOfGroupsForEvent(event)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        : [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      for (const child of event.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const attendance: AttendanceInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          participant: child,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          status: event.getAttendance(child),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const relation = linkedRelations.find((rel) => rel.childId === child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (relation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          attendance.school = relation.schoolId;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        attendances.push(attendance);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return attendances;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getMembersOfGroupsForEvent(event: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.toArray(this.entities[ChildSchoolRelation.ENTITY_TYPE]).filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (relation) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        event.schools.includes(relation.schoolId) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        relation.isActiveAt(event.date),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Transforms a list of attendances infos into an aggregated report for each participant
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param attendances an array of AttendanceInfo objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns AttendanceReport[] for each participant the ID, the number of present and total absences as well as the attendance percentage.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getAttendanceReport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attendances: AttendanceInfo[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): AttendanceReport[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const participantMap: { [key in string]: AttendanceReport } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attendances.forEach((attendance) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (!participantMap.hasOwnProperty(attendance.participant)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        participantMap[attendance.participant] = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          participant: attendance.participant,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          total: 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          present: 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          percentage: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          detailedStatus: {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const report = participantMap[attendance.participant];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      report.detailedStatus[attendance.status.status.id] = report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .detailedStatus[attendance.status.status.id]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ? report.detailedStatus[attendance.status.status.id] + 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        : 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (attendance.status.status.countAs === "PRESENT") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        report.present++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (attendance.status.status.countAs !== "IGNORE") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        report.total++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (report.total > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        report.percentage = (report.present / report.total).toFixed(2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Object.values(participantMap);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Adds all entities of the given type to the input array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entities the array before
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityType the type of entities which should be added
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the input array concatenated with all entities of the entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private addEntities(entities: Entity[], entityType: string): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return entities.concat(...this.toArray(this.entities[entityType]));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Replaces all input values by the string provided
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the data which will be replaced
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param value the string which should replace initial data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns array of same length as data where every input is value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private setString(data: any[], value: string): string[] | string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Array.isArray(data) ? data.map(() => value) : value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface AttendanceInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  participant: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  status: EventAttendance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  school?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface AttendanceReport {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  participant: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  total: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  present: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  percentage: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** counts by all custom configured status **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  detailedStatus?: { [key: string]: number };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/RoutePermissionsService.html b/documentation/injectables/RoutePermissionsService.html new file mode 100644 index 0000000000..cd6ef9fc3e --- /dev/null +++ b/documentation/injectables/RoutePermissionsService.html @@ -0,0 +1,429 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/config/dynamic-routing/route-permissions.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Service that checks permissions for routes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(roleGuard: UserRoleGuard, permissionGuard: EntityPermissionGuard) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            roleGuard + UserRoleGuard + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            permissionGuard + EntityPermissionGuard + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + filterPermittedRoutes + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + filterPermittedRoutes(items: MenuItem[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Filters menu items based on the route and entity permissions on the link.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            items + MenuItem[] + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<MenuItem[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { UserRoleGuard } from "../../permissions/permission-guard/user-role.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityPermissionGuard } from "../../permissions/permission-guard/entity-permission.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MenuItem } from "../../ui/navigation/menu-item";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Service that checks permissions for routes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class RoutePermissionsService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private roleGuard: UserRoleGuard,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private permissionGuard: EntityPermissionGuard,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Filters menu items based on the route and entity permissions on the link.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async filterPermittedRoutes(items: MenuItem[]): Promise<MenuItem[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const accessibleRoutes: MenuItem[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    for (const item of items) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (await this.isAccessibleRouteForUser(item.link)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        accessibleRoutes.push(item);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return accessibleRoutes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async isAccessibleRouteForUser(path: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (await this.roleGuard.checkRoutePermissions(path)) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      (await this.permissionGuard.checkRoutePermissions(path))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/RouterService.html b/documentation/injectables/RouterService.html new file mode 100644 index 0000000000..9533298c44 --- /dev/null +++ b/documentation/injectables/RouterService.html @@ -0,0 +1,566 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/config/dynamic-routing/router.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The RouterService dynamically sets up Angular routing from config loaded through the ConfigService.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              You can define ViewConfig objects in the central configuration and build the routing at runtime +rather than hard-coding the available paths and settings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(configService: ConfigService, router: Router) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + initRouting + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +initRouting() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Initialize routes from the config while respecting existing routes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + reloadRouting + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +reloadRouting(viewConfigs: ViewConfig[], additionalRoutes: Route[]) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Reset the routing config and reload it from the global config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              viewConfigs + ViewConfig[] + + No + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The configs loaded from the ConfigService

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              additionalRoutes + Route[] + + No + + [] + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Optional array of routes to keep in addition to the ones loaded from config

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Route, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfigService } from "../config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { PREFIX_VIEW_CONFIG, ViewConfig } from "./view-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { UserRoleGuard } from "../../permissions/permission-guard/user-role.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NotFoundComponent } from "./not-found/not-found.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { AuthGuard } from "../../session/auth.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { UnsavedChangesService } from "../../entity-details/form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RoutedViewComponent } from "../../ui/routed-view/routed-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityPermissionGuard } from "../../permissions/permission-guard/entity-permission.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * The RouterService dynamically sets up Angular routing from config loaded through the {@link ConfigService}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * You can define {@link ViewConfig} objects in the central configuration and build the routing at runtime
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * rather than hard-coding the available paths and settings.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class RouterService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Initialize routes from the config while respecting existing routes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  initRouting() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const viewConfigs =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.configService.getAllConfigs<ViewConfig>(PREFIX_VIEW_CONFIG);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.reloadRouting(viewConfigs, this.router.config);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Reset the routing config and reload it from the global config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param viewConfigs The configs loaded from the ConfigService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param additionalRoutes Optional array of routes to keep in addition to the ones loaded from config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  reloadRouting(viewConfigs: ViewConfig[], additionalRoutes: Route[] = []) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const routes: Route[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const view of viewConfigs) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const newRoute = this.createRoute(view, additionalRoutes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        routes.push(newRoute);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.warn(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          `Failed to create route for view ${view._id}: ${e.message}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // add routes from other sources (e.g. pre-existing  hard-coded routes)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const noDuplicates = additionalRoutes.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (r) => !routes.find((o) => o.path === r.path),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // change wildcard route to show not-found component instead of empty page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const wildcardRoute = noDuplicates.find((route) => route.path === "**");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (wildcardRoute) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      wildcardRoute.component = NotFoundComponent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    routes.push(...noDuplicates);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.router.resetConfig(routes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private createRoute(view: ViewConfig, additionalRoutes: Route[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const path = view._id.substring(PREFIX_VIEW_CONFIG.length);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const existingRoute = additionalRoutes.find((r) => r.path === path);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (existingRoute) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return this.generateRouteFromConfig(view, existingRoute);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return this.generateRouteFromConfig(view, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        path,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        component: RoutedViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        data: { component: view.component },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private generateRouteFromConfig(view: ViewConfig, route: Route): Route {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    route.data = { ...route?.data }; // data of currently active route is readonly, which can throw errors here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    route.canActivate = [AuthGuard, EntityPermissionGuard];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    route.canDeactivate = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      () => inject(UnsavedChangesService).checkUnsavedChanges(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (view.permittedUserRoles) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      route.canActivate.push(UserRoleGuard);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      route.data.permittedUserRoles = view.permittedUserRoles;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (view.config) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      route.data.config = view.config;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return route;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ScreenWidthObserver.html b/documentation/injectables/ScreenWidthObserver.html new file mode 100644 index 0000000000..d6cd34d583 --- /dev/null +++ b/documentation/injectables/ScreenWidthObserver.html @@ -0,0 +1,666 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/utils/media/screen-size-observer.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This can be used to check the current screen size programmatically +and get notified when it changes. Use the shared observable to +get notified on any changes. This observable is shared across all instances and +will persist throughout the lifespan of the app.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The platform observable emits changes whenever the screen size changes to +where the app is considered to be in Mobile mode vs. desktop mode.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This class can also be used statically to check the current screen size and/or check whether +the app is currently considered to be in mobile mode or desktop mode.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor(window: Window) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                window + Window + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + currentScreenSize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + currentScreenSize() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Return the current screen size as determined by the media queries

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : ScreenSize + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + isDesktop + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + isDesktop() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                returns whether the app is currently considered to be in desktop mode +looking only at the screen size.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : IsDesktop + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + platform + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + platform() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                An observable that emits whenever the screen size changes so that the app is considered +to be on a mobile device or a desktop device.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Observable<IsDesktop> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + Public + shared + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + shared() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The observable shared amongst all instances. +Subscribers to this observable get notified whenever the current screen size changes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                When getting a new observable (or, in other words, when calling this function), the current +screen size is injected so that when you subscribe the first element that arrives is the current screen size.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Returns : Observable<ScreenSize> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { combineLatest, fromEvent, Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { distinctUntilChanged, map, startWith } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { WINDOW_TOKEN } from "../di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Constants describing the threshold values.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * These constants are considered the lower limit, i.e. if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * a screen is more than 576px large but less than 768px
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * the screen is considered SM.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Any screen smaller than `SM` is considered `XS`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +const SM = "576px";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +const MD = "768px";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +const LG = "992px";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +const XL = "1200px";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +const XXL = "1400px";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Different ranges of screen sizes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/* Implementation note: This is implemented as an enum (as opposed to a string-type)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * so that
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * sizeA: ScreenSize = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * sizeB: ScreenSize = ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * aIsGreaterThanB: boolean = sizeA > sizeB
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * makes sense.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export enum ScreenSize {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // extra small (0px <= width < 576px)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  xs = 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // medium small (576px <= width < 768px)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  sm = 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // medium (768px <= width < 992px)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  md = 2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // large (992px <= width < 1200px)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  lg = 3,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // extra large (1200px <= width < 1400px)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  xl = 4,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // extra-extra large (1400 <= width)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  xxl = 5,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The screen size where anything smaller and this size itself is considered mobile while anything strictly larger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * is considered desktop.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export const MOBILE_THRESHOLD: ScreenSize = ScreenSize.sm;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A type that is used to document the return type of the `platform` observable.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A variable that has this type shall only have two values that are encoded in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * a boolean way:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * - `true`: the variable represents that the width of something is considered 'desktop width'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * - `false`: the variable represents that the width of something is considered 'mobile width'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export type IsDesktop = boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * This can be used to check the current screen size programmatically
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * and get notified when it changes. Use the {@link shared} observable to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * get notified on any changes. This observable is shared across all instances and
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * will persist throughout the lifespan of the app.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The `platform` observable emits changes whenever the screen size changes to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * where the app is considered to be in Mobile mode vs. desktop mode.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * This class can also be used statically to check the current screen size and/or check whether
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * the app is currently considered to be in mobile mode or desktop mode.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class ScreenWidthObserver {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * create an observable that emits whenever the `query` matches.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Also emits the current state to begin with.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param query The query to check
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private static matching(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    query: MediaQueryList,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Observable<MediaQueryListEvent> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return fromEvent<MediaQueryListEvent>(query, "change").pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      startWith({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        matches: query.matches,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        media: query.media,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      } as MediaQueryListEvent),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The internal query lists that are used to check the current screen sizes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private queryLists: MediaQueryList[] = [SM, MD, LG, XL, XXL].map((size) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // matches when the screen's width is greater than `size`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.window.matchMedia(`screen and (min-width: ${size})`),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private readonly _shared: Observable<ScreenSize>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The observable shared amongst all instances.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Subscribers to this observable get notified whenever the current screen size changes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * When getting a new observable (or, in other words, when calling this function), the current
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * screen size is injected so that when you subscribe the first element that arrives is the current screen size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public shared(): Observable<ScreenSize> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this._shared.pipe(startWith(this.currentScreenSize()));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private readonly _platform: Observable<IsDesktop>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * An observable that emits whenever the screen size changes so that the app is considered
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * to be on a mobile device or a desktop device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public platform(): Observable<IsDesktop> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this._platform.pipe(startWith(this.isDesktop()));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(@Inject(WINDOW_TOKEN) private window: Window) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._shared = combineLatest(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.queryLists.map((queryList) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ScreenWidthObserver.matching(queryList),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      map(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        // Listening to the events requires parsing (or understanding) the event and the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        // attached media-string which requires more logic than simply computing the result in-place.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        return this.currentScreenSize();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._platform = this._shared.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      map((screenSize) => screenSize > MOBILE_THRESHOLD),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      distinctUntilChanged(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Return the current screen size as determined by the media queries
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public currentScreenSize(): ScreenSize {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // when this returns -1 then no query is active. This means
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // that the screen size is less than `SM`, i.e. `XS`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.queryLists.map((queryList) => queryList.matches).lastIndexOf(true) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * returns whether the app is currently considered to be in desktop mode
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * looking only at the screen size.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public isDesktop(): IsDesktop {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.currentScreenSize() > MOBILE_THRESHOLD;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SearchService.html b/documentation/injectables/SearchService.html new file mode 100644 index 0000000000..e5943140e4 --- /dev/null +++ b/documentation/injectables/SearchService.html @@ -0,0 +1,528 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/ui/search/search.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This service handles to logic for global searches across all entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(indexingService: DatabaseIndexingService, schemaService: EntitySchemaService, entities: EntityRegistry) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  indexingService + DatabaseIndexingService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entities + EntityRegistry + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + getSearchResults + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + getSearchResults(searchTerm: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns the results matching the provided search term. +Multiple search terms should be separated by a space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  searchTerm + string + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  for which entities should be returned

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : Promise<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DatabaseIndexingService } from "../../entity/database-indexing/database-indexing.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This service handles to logic for global searches across all entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class SearchService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private searchableEntities: [string, string[]][];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private indexingService: DatabaseIndexingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.createSearchIndex();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Creates the search index based on the `toStringAttributes` and the `searchable` schema property
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private createSearchIndex() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.initializeSearchableEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const designDoc = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      _id: "_design/search_index",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      views: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        by_name: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          map: this.getSearchIndexDesignDoc(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.indexingService.createIndex(designDoc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private initializeSearchableEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.searchableEntities = [...this.entities.entries()]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map(([name, ctr]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        const stringAttributes = ctr.toStringAttributes.filter((attr) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ctr.schema.has(attr),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        const searchableAttributes = [...ctr.schema.entries()]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          .filter(([_, schema]) => schema.searchable)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          .map(([name]) => name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return [name, [...stringAttributes, ...searchableAttributes]] as [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          string[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .filter(([_, props]) => props.length > 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private getSearchIndexDesignDoc() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let searchIndex = `(doc) => {\n`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.searchableEntities.forEach(([type, attributes]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      searchIndex += `if (doc._id.startsWith("${type}:")) {\n`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      attributes.forEach((attr) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        searchIndex += `if (doc["${attr}"]) {\n`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        searchIndex += `doc["${attr}"].toString().toLowerCase().split(" ").forEach((val) => emit(val))\n`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        searchIndex += `}\n`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      searchIndex += `return\n`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      searchIndex += `}\n`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    searchIndex += `}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return searchIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Returns the results matching the provided search term.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Multiple search terms should be separated by a space
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param searchTerm for which entities should be returned
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async getSearchResults(searchTerm: string): Promise<Entity[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const searchTerms = searchTerm.toLowerCase().split(" ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const res = await this.indexingService.queryIndexRaw(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      "search_index/by_name",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        startkey: searchTerms[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        endkey: searchTerms[0] + "\ufff0",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        include_docs: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.getUniqueDocs(res.rows)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .filter((doc) => this.containsSecondarySearchTerms(doc, searchTerms))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map((doc) => this.transformDocToEntity(doc));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private getUniqueDocs(rows: any[]): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const uniques = new Map<string, any>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    rows.forEach((row) => uniques.set(row.doc._id, row.doc));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return [...uniques.values()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private containsSecondarySearchTerms(doc, searchTerms: string[]): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const entityType = Entity.extractTypeFromId(doc._id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const values = this.searchableEntities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .find(([type]) => type === entityType)[1]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map((attr) => doc[attr])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .join(" ")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .toLowerCase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return searchTerms.every((s) => values.includes(s));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private transformDocToEntity(doc): Entity {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const ctor = this.entities.get(Entity.extractTypeFromId(doc._id));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const entity = new ctor(doc._id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.schemaService.loadDataIntoEntity(entity, doc);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SessionManagerService.html b/documentation/injectables/SessionManagerService.html new file mode 100644 index 0000000000..d9d9ee8397 --- /dev/null +++ b/documentation/injectables/SessionManagerService.html @@ -0,0 +1,993 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/session/session-service/session-manager.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This service handles the user session. +This includes an online and offline login and logout. +After a successful login, the database for the current user is initialised.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(remoteAuthService: KeycloakAuthService, localAuthService: LocalAuthService, syncService: SyncService, sessionInfo: SessionSubject, currentUser: CurrentUserSubject, entityMapper: EntityMapperService, loginStateSubject: LoginStateSubject, router: Router, navigator: Navigator, configService: ConfigService, database: Database) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    remoteAuthService + KeycloakAuthService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    localAuthService + LocalAuthService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    syncService + SyncService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    loginStateSubject + LoginStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    navigator + Navigator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    configService + ConfigService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    database + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + clearRemoteSessionIfNecessary + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +clearRemoteSessionIfNecessary() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + getOfflineUsers + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +getOfflineUsers() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Get a list of all users that can log in offline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : SessionInfo[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + logout + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + logout() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    If online, clear the remote session. +If offline, reset the state and forward to login page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + offlineLogin + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +offlineLogin(user: SessionInfo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Login an offline session without sync.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    user + SessionInfo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + remoteLogin + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + remoteLogin() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Login for a remote session and start the sync. +After a user has logged in once online, this user can later also use the app offline. +Should only be called if there is an internet connection

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + remoteLoginAvailable + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +remoteLoginAvailable() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Readonly + DEPRECATED_DB_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "RESERVED_FOR" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Readonly + RESET_REMOTE_SESSION_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : "RESET_REMOTE" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SessionInfo, SessionSubject } from "../auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { SyncService } from "../../database/sync.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LoginStateSubject, SessionType } from "../session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LoginState } from "../session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { KeycloakAuthService } from "../auth/keycloak/keycloak-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { LocalAuthService } from "../auth/local/local-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { PouchDatabase } from "../../database/pouch-database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { environment } from "../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Database } from "../../database/database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { NAVIGATOR_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { CurrentUserSubject } from "../current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { filter, take } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Subscription } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfigService } from "../../config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This service handles the user session.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This includes an online and offline login and logout.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * After a successful login, the database for the current user is initialised.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class SessionManagerService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  readonly DEPRECATED_DB_KEY = "RESERVED_FOR";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  readonly RESET_REMOTE_SESSION_KEY = "RESET_REMOTE";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private pouchDatabase: PouchDatabase;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private remoteLoggedIn = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private updateSubscription: Subscription;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private remoteAuthService: KeycloakAuthService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private localAuthService: LocalAuthService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private syncService: SyncService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private loginStateSubject: LoginStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    @Inject(NAVIGATOR_TOKEN) private navigator: Navigator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    database: Database,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (database instanceof PouchDatabase) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.pouchDatabase = database;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Login for a remote session and start the sync.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * After a user has logged in once online, this user can later also use the app offline.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Should only be called if there is an internet connection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async remoteLogin() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loginStateSubject.next(LoginState.IN_PROGRESS);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.remoteLoginAvailable()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return this.remoteAuthService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .login()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .then((user) => this.handleRemoteLogin(user))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        .catch((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          this.loginStateSubject.next(LoginState.LOGIN_FAILED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          // ignore fall back to offline login - if there was a technical error, the AuthService has already logged/reported it
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loginStateSubject.next(LoginState.LOGIN_FAILED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  remoteLoginAvailable() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return navigator.onLine && environment.session_type === SessionType.synced;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Login an offline session without sync.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  offlineLogin(user: SessionInfo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.initializeUser(user);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async initializeUser(session: SessionInfo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await this.initializeDatabaseForCurrentUser(session);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.sessionInfo.next(session);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loginStateSubject.next(LoginState.LOGGED_IN);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (session.entityId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.configService.configUpdates.pipe(take(1)).subscribe(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // requires initial config to be loaded first!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.initUserEntity(session.entityId),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initUserEntity(entityId: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const entityType = Entity.extractTypeFromId(entityId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .load(entityType, entityId)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .catch(() => undefined)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .then((res) => this.currentUser.next(res));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.updateSubscription = this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .receiveUpdates(entityType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          ({ entity }) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +            entity.getId() === entityId || entity.getId(true) === entityId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .subscribe(({ entity }) => this.currentUser.next(entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Get a list of all users that can log in offline
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  getOfflineUsers(): SessionInfo[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.localAuthService.getStoredUsers();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * If online, clear the remote session.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * If offline, reset the state and forward to login page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async logout() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.remoteLoggedIn) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (this.navigator.onLine) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        // This will forward to the keycloak logout page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        await this.remoteAuthService.logout();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        localStorage.setItem(this.RESET_REMOTE_SESSION_KEY, "1");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // resetting app state
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.sessionInfo.next(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.updateSubscription?.unsubscribe();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.currentUser.next(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.loginStateSubject.next(LoginState.LOGGED_OUT);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.remoteLoggedIn = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.pouchDatabase.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return this.router.navigate(["/login"], {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      queryParams: { redirect_uri: this.router.routerState.snapshot.url },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  clearRemoteSessionIfNecessary() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (localStorage.getItem(this.RESET_REMOTE_SESSION_KEY)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      localStorage.removeItem(this.RESET_REMOTE_SESSION_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return this.remoteAuthService.logout();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async handleRemoteLogin(user: SessionInfo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.remoteLoggedIn = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    await this.initializeUser(user);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.syncService.startSync();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.localAuthService.saveUser(user);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async initializeDatabaseForCurrentUser(user: SessionInfo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const userDBName = `${user.name}-${environment.DB_NAME}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // Work on a temporary database before initializing the real one
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const tmpDB = new PouchDatabase();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initDatabase(userDBName, tmpDB);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!(await tmpDB.isEmpty())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // Current user has own database, we are done here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.initDatabase(userDBName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initDatabase(environment.DB_NAME, tmpDB);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const dbFallback = window.localStorage.getItem(this.DEPRECATED_DB_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const dbAvailable = !dbFallback || dbFallback === user.name;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (dbAvailable && !(await tmpDB.isEmpty())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      // Old database is available and can be used by the current user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      window.localStorage.setItem(this.DEPRECATED_DB_KEY, user.name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.initDatabase(environment.DB_NAME);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // Create a new database for the current user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.initDatabase(userDBName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private initDatabase(dbName: string, db = this.pouchDatabase) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (environment.session_type === SessionType.mock) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      db.initInMemoryDB(dbName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      db.initIndexedDB(dbName);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SessionSubject.html b/documentation/injectables/SessionSubject.html new file mode 100644 index 0000000000..f0923ec218 --- /dev/null +++ b/documentation/injectables/SessionSubject.html @@ -0,0 +1,306 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/session/auth/session-info.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Use this provider to get information about the currently active session. +E.g. for checking required roles or accessing the unique user identifier.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + BehaviorSubject +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * The session info which holds information about the currently logged-in user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * This is retrieved during the login process and will always be present once state changes to `LOGGED_IN`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface SessionInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The user account id from the auth server (e.g. User ID in Keycloak)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Name of user account.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @deprecated Use id or entityId instead as this is an unpredictable mix from different sources
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * List of roles the logged-in user hold.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  roles: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * List of linked projects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  projects?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * ID of the entity which is connected with the user account.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This is either a full ID or (e.g. Child:123) or only the last part.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * In the later case it refers to the `User` entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entityId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Email address of a user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  email?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Use this provider to get information about the currently active session.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * E.g. for checking required roles or accessing the unique user identifier.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class SessionSubject extends BehaviorSubject<SessionInfo> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SiteSettingsService.html b/documentation/injectables/SiteSettingsService.html new file mode 100644 index 0000000000..454eb94eda --- /dev/null +++ b/documentation/injectables/SiteSettingsService.html @@ -0,0 +1,939 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/site-settings/site-settings.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Access to site settings stored in the database, like styling, site name and logo.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + LatestEntityLoader +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(title: Title, fileService: FileService, schemaService: EntitySchemaService, enumService: ConfigurableEnumService, entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        title + Title + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        fileService + FileService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        enumService + ConfigurableEnumService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + getPropertyObservable + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +getPropertyObservable(property: P) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type parameters : +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • P
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property + P + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Observable<> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + loadOnce + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + loadOnce() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Do an initial load of the entity to be available through the entityUpdated property +(without watching for continuous updates).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<T | undefined> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + startLoading + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + startLoading() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Initialize the loader to make the entity available and emit continuous updates +through the entityUpdated property

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + DEFAULT_FAVICON + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "favicon.ico" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + defaultLanguage + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : this.getPropertyObservable("defaultLanguage") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + displayLanguageSelect + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : this.getPropertyObservable("displayLanguageSelect") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Readonly + SITE_SETTINGS_LOCAL_STORAGE_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : Entity.createPrefixedId( + SiteSettings.ENTITY_TYPE, + SiteSettings.ENTITY_ID, + ) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + siteName + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : this.getPropertyObservable("siteName") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + siteSettings + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : this.entityUpdated.pipe(shareReplay(1)) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + entityUpdated + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : new Subject<T>() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from LatestEntityLoader +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        subscribe to this and execute any actions required when the entity changes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SiteSettings } from "./site-settings";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { delay, firstValueFrom, Observable, skipWhile } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { distinctUntilChanged, map, shareReplay } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Title } from "@angular/platform-browser";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FileService } from "../../features/file/file.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import materialColours from "@aytek/material-color-picker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { LatestEntityLoader } from "../entity/latest-entity-loader";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Logging } from "../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitySchemaService } from "../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { availableLocales } from "../language/languages";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ConfigurableEnumService } from "../basic-datatypes/configurable-enum/configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Access to site settings stored in the database, like styling, site name and logo.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class SiteSettingsService extends LatestEntityLoader<SiteSettings> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly DEFAULT_FAVICON = "favicon.ico";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  readonly SITE_SETTINGS_LOCAL_STORAGE_KEY = Entity.createPrefixedId(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    SiteSettings.ENTITY_TYPE,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    SiteSettings.ENTITY_ID,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  siteSettings = this.entityUpdated.pipe(shareReplay(1));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  siteName = this.getPropertyObservable("siteName");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  defaultLanguage = this.getPropertyObservable("defaultLanguage");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  displayLanguageSelect = this.getPropertyObservable("displayLanguageSelect");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private title: Title,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private fileService: FileService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private enumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super(SiteSettings, SiteSettings.ENTITY_ID, entityMapper);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.initAvailableLocales();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.siteName.subscribe((name) => this.title.setTitle(name));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.subscribeFontChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.subscribeFaviconChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.subscribeColorChanges("primary");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.subscribeColorChanges("secondary");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.subscribeColorChanges("error");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.initFromLocalStorage();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.cacheInLocalStorage();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super.startLoading();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Making locales enum available at runtime
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * so that UI can show dropdown options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private initAvailableLocales() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.enumService["cacheEnum"](availableLocales);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Do an initial loading of settings from localStorage, if available.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private initFromLocalStorage() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let localStorageSettings: SiteSettings;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const stored = localStorage.getItem(this.SITE_SETTINGS_LOCAL_STORAGE_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (stored) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        localStorageSettings = this.schemaService.loadDataIntoEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          new SiteSettings(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          JSON.parse(stored),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } catch (e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        "SiteSettingsService: could not parse settings from localStorage: " + e,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (localStorageSettings) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.entityUpdated.next(localStorageSettings);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Store the latest SiteSettings in localStorage to be available before login also.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private cacheInLocalStorage() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.entityUpdated.subscribe((settings) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const dbFormat =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.schemaService.transformEntityToDatabaseFormat(settings);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.SITE_SETTINGS_LOCAL_STORAGE_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        JSON.stringify(dbFormat),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private subscribeFontChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.getPropertyObservable("font").subscribe((font) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      document.documentElement.style.setProperty("--font-family", font),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private subscribeFaviconChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.getPropertyObservable("favicon")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .pipe(delay(0))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe(async (icon) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const favIcon: HTMLLinkElement = document.querySelector("#appIcon");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (icon) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          const entity = await firstValueFrom(this.siteSettings);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          const imgUrl = await firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            this.fileService.loadFile(entity, "favicon"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          favIcon.href = Object.values(imgUrl)[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          favIcon.href = this.DEFAULT_FAVICON;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private subscribeColorChanges(property: "primary" | "secondary" | "error") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.getPropertyObservable(property).subscribe((color) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (color) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const palette = materialColours(color);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        palette["A100"] = palette["200"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        palette["A200"] = palette["300"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        palette["A400"] = palette["500"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        palette["A700"] = palette["800"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        Object.entries(palette).forEach(([key, value]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          document.documentElement.style.setProperty(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            `--${property}-${key}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            `#${value}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getPropertyObservable<P extends keyof SiteSettings>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    property: P,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Observable<SiteSettings[P]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.siteSettings.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      skipWhile((v) => !v[property]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      map((s) => s[property]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      distinctUntilChanged(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SqlReportService.html b/documentation/injectables/SqlReportService.html new file mode 100644 index 0000000000..cdd66020cc --- /dev/null +++ b/documentation/injectables/SqlReportService.html @@ -0,0 +1,747 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/reporting/sql-report/sql-report.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Service that handles management of necessary SQS configurations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(http: HttpClient) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          http + HttpClient + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + fetchReportCalculation + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +fetchReportCalculation(reportId: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          reportId + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Async + query + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + query(report: SqlReport, from: Date, to: Date, forceCalculation) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Get the combines results of the SQL statements in the report

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptionalDefault valueDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          report + SqlReport + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          from + Date + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          to + Date + + No + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          forceCalculation + + No + + false + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Creates a new Calculation, even when an existing calculation is available

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<ReportData> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Static + QUERY_PROXY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Default value : "/query" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SqlReport } from "../report-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { map, switchMap, takeWhile } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { firstValueFrom, interval, lastValueFrom, Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface ReportData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  report: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  calculation: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  data: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface ReportCalculation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  report: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  startDate: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  endDate: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  args: { [key: string]: string };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  status: "PENDING" | "RUNNING" | "FINISHED_SUCCESS" | "FINISHED_ERROR";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  outcome: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    result_hash: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Service that handles management of necessary SQS configurations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class SqlReportService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static QUERY_PROXY = "/query";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(private http: HttpClient) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Get the combines results of the SQL statements in the report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param forceCalculation Creates a new Calculation, even when an existing calculation is available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async query(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    report: SqlReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    forceCalculation = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (forceCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.createReportCalculation(report.getId(), from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .get<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          ReportCalculation[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        >(`${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/report/${report.getId()}`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          switchMap((reportDetails) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            let lastReports = this.getLastReports(reportDetails, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            if (lastReports.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              return this.createReportCalculation(report.getId(), from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              return this.fetchReportCalculationData(lastReports[0].id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getLastReports(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    reportDetails: ReportCalculation[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return reportDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.filterFromToDates(value, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .sort((a: ReportCalculation, b: ReportCalculation) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.sortByEndDate(a, b),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private createReportCalculation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    reportId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Observable<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let params = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (from && to) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      params = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        from: moment(from).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        to: moment(to).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .post<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/report/${reportId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          params: params,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        map((value) => value.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        switchMap((id) => lastValueFrom(this.waitForReportData(id))),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        switchMap((value: ReportCalculation) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          return this.handleReportCalculationResponse(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  fetchReportCalculation(reportId: string): Observable<ReportCalculation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http.get<ReportCalculation>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/${reportId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private waitForReportData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    reportCalculationId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Observable<ReportCalculation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return interval(1500).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      switchMap(() => this.fetchReportCalculation(reportCalculationId)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      takeWhile((response) => this.pollCondition(response), true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private fetchReportCalculationData(reportId: string): Observable<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http.get<ReportData>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/${reportId}/data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private handleReportCalculationResponse(value: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    switch (value.status) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      case "FINISHED_SUCCESS":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.fetchReportCalculationData(value.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        throw new Error("Invalid ReportCalculation outcome.");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private sortByEndDate(a: ReportCalculation, b: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return new Date(b.endDate).getTime() - new Date(a.endDate).getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private pollCondition(reportCalculation: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      reportCalculation.status !== "FINISHED_SUCCESS" &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      reportCalculation.status !== "FINISHED_ERROR"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private filterFromToDates(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    value: ReportCalculation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let argFrom = value.args["from"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let argTo = value.args["to"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!argFrom || !argTo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      moment(argFrom.toString()).format("YYYY-MM-DD") ==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        moment(from).format("YYYY-MM-DD") &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      moment(argTo.toString()).format("YYYY-MM-DD") ==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        moment(to).format("YYYY-MM-DD")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/StringDatatype.html b/documentation/injectables/StringDatatype.html new file mode 100644 index 0000000000..c1d873a7a2 --- /dev/null +++ b/documentation/injectables/StringDatatype.html @@ -0,0 +1,1000 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/basic-datatypes/string/string.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Datatype for the EntitySchemaService transforming values to "string".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This type is automatically used if you annotate a class's property that has the TypeScript type "string" +ensuring that even if values in the database from other sources are not of type string, the property will be a string.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            For example:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @DatabaseField() myString: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @DatabaseField({dataType: 'string'}) myValue: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + DefaultDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + transformToDatabaseFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:38 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + transformToObjectFormat(value) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            value + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            val + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The value from an imported cell to be mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            additional + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            config as returned by the configComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "string" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:35 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Static + + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : $localize`:datatype-label:text` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:36 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "EditText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:61 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Default value : "DisplayText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Defined in DefaultDatatype:60 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The default component how this datatype should be displayed in lists and forms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { DefaultDatatype } from "../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Datatype for the EntitySchemaService transforming values to "string".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This type is automatically used if you annotate a class's property that has the TypeScript type "string"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * ensuring that even if values in the database from other sources are not of type string, the property will be a string.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * For example:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * `@DatabaseField() myString: string;`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * `@DatabaseField({dataType: 'string'}) myValue: any;`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class StringDatatype extends DefaultDatatype<string, string> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static override dataType = "string";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static override label: string = $localize`:datatype-label:text`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override transformToDatabaseFormat(value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return String(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override transformToObjectFormat(value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return String(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SyncService.html b/documentation/injectables/SyncService.html new file mode 100644 index 0000000000..41ed2defec --- /dev/null +++ b/documentation/injectables/SyncService.html @@ -0,0 +1,702 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/database/sync.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This service initializes the remote DB and manages the sync between the local and remote DB.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +constructor(database: Database, authService: KeycloakAuthService, syncStateSubject: SyncStateSubject, navigator: Navigator) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              database + Database + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              authService + KeycloakAuthService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              syncStateSubject + SyncStateSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              navigator + Navigator + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + startSync + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +startSync() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Initializes the remote DB and starts the sync

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + sync + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +sync() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Execute a (one-time) sync between the local and server database.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Returns : Promise<SyncResult> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + Readonly + LAST_SYNC_KEY + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : "LAST_SYNC" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + liveSyncEnabled + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Continuous syncing in background.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + Static + Readonly + SYNC_INTERVAL + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Default value : 30000 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Database } from "./database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { PouchDatabase } from "./pouch-database";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { SyncState } from "../session/session-states/sync-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { SyncStateSubject } from "../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  debounceTime,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  filter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  mergeMap,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  retry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  takeWhile,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { KeycloakAuthService } from "../session/auth/keycloak/keycloak-auth.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Config } from "../config/config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { from, interval, merge, of, Subscription } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NAVIGATOR_TOKEN } from "../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * This service initializes the remote DB and manages the sync between the local and remote DB.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class SyncService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static readonly LAST_SYNC_KEY = "LAST_SYNC";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private readonly POUCHDB_SYNC_BATCH_SIZE = 500;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static readonly SYNC_INTERVAL = 30000;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private remoteDatabase: PouchDatabase;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private remoteDB: PouchDB.Database;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private localDB: PouchDB.Database;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private database: Database,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private authService: KeycloakAuthService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private syncStateSubject: SyncStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    @Inject(NAVIGATOR_TOKEN) private navigator: Navigator,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.remoteDatabase = new PouchDatabase(this.authService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.logSyncContext();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.syncStateSubject
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .pipe(filter((state) => state === SyncState.COMPLETED))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const lastSyncTime = new Date().toISOString();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        localStorage.setItem(SyncService.LAST_SYNC_KEY, lastSyncTime);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.logSyncContext();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async logSyncContext() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const lastSyncTime = localStorage.getItem(SyncService.LAST_SYNC_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const configRev = await this.database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .get(Entity.createPrefixedId(Config.ENTITY_TYPE, Config.CONFIG_KEY))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .catch(() => null)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .then((config) => config?._rev);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    Logging.addContext("Aam Digital sync", {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      "last sync completed": lastSyncTime,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      "config _rev": configRev,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Initializes the remote DB and starts the sync
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  startSync() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.initDatabases();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.liveSync();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Create the remote DB and configure it to use correct cookies.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private initDatabases() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.remoteDatabase.initRemoteDB(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      `${environment.DB_PROXY_PREFIX}/${environment.DB_NAME}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.remoteDB = this.remoteDatabase.getPouchDB();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.database instanceof PouchDatabase) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.localDB = this.database.getPouchDB();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Execute a (one-time) sync between the local and server database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  sync(): Promise<SyncResult> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this.navigator.onLine) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Logging.debug("Not syncing because offline");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.syncStateSubject.next(SyncState.UNSYNCED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return Promise.resolve({});
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.syncStateSubject.next(SyncState.STARTED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.localDB
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .sync(this.remoteDB, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        batch_size: this.POUCHDB_SYNC_BATCH_SIZE,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .then((res) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.debug("sync completed", res);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.syncStateSubject.next(SyncState.COMPLETED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return res as SyncResult;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .catch((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.debug("sync error", err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.syncStateSubject.next(SyncState.FAILED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Continuous syncing in background.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  liveSyncEnabled: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private liveSync() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.liveSyncEnabled = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    merge(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // do an initial sync immediately
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      of(true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // re-sync at regular interval
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      interval(SyncService.SYNC_INTERVAL),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // and immediately sync to upload any local changes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.database.changes(""),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        debounceTime(500),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        mergeMap(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          if (this.syncStateSubject.value == SyncState.STARTED) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            return of();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            return from(this.sync());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        retry({ delay: SyncService.SYNC_INTERVAL }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        takeWhile(() => this.liveSyncEnabled),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .subscribe();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +type SyncResult = PouchDB.Replication.SyncResultComplete<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SyncStateSubject.html b/documentation/injectables/SyncStateSubject.html new file mode 100644 index 0000000000..0ae35b5fd1 --- /dev/null +++ b/documentation/injectables/SyncStateSubject.html @@ -0,0 +1,283 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/session/session-type.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + BehaviorSubject +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +constructor() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { LoginState } from "./session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { SyncState } from "./session-states/sync-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Available Session types with their keys that can be used in the app-config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export enum SessionType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * synced local PouchDB and remote CouchDB connection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  synced = "synced",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * local only demo mode - PouchDB database without a remote sync counterpart
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  local = "local",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * in-memory adapter of pouchdb database - data is lost after leaving the page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  mock = "mock",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class LoginStateSubject extends BehaviorSubject<LoginState> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super(LoginState.LOGGED_OUT);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class SyncStateSubject extends BehaviorSubject<SyncState> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super(SyncState.UNSYNCED);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/TodoService.html b/documentation/injectables/TodoService.html new file mode 100644 index 0000000000..c8b028089f --- /dev/null +++ b/documentation/injectables/TodoService.html @@ -0,0 +1,521 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/todos/todo.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +constructor(currentUser: CurrentUserSubject, alertService: AlertService, entityMapper: EntityMapperService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  currentUser + CurrentUserSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  alertService + AlertService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  entityMapper + EntityMapperService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + completeTodo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + completeTodo(todo: Todo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  todo + Todo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + Async + uncompleteTodo + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + uncompleteTodo(todo: Todo) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  todo + Todo + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { AlertService } from "../../core/alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityMapperService } from "../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Todo } from "./model/todo";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import moment from "moment/moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { CurrentUserSubject } from "../../core/session/current-user-subject";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class TodoService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private currentUser: CurrentUserSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async completeTodo(todo: Todo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const nextTodo = await this.createNextRepetition(todo);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    todo.completed = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      completedBy: this.currentUser.value?.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      completedAt: new Date(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      nextRepetition: nextTodo?.getId(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.entityMapper.save(todo);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private async createNextRepetition(originalTodo: Todo): Promise<Todo | null> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!originalTodo.repetitionInterval) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const nextTodo = originalTodo.copy(true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    nextTodo.deadline = moment(nextTodo.deadline)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .add(nextTodo.repetitionInterval.amount, nextTodo.repetitionInterval.unit)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .toDate();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.entityMapper.save(nextTodo);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.alertService.addInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      $localize`:snackbar message informing about next recurring task:A new recurring ${Todo.label} has been created based on the repetition interval.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return nextTodo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async uncompleteTodo(todo: Todo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    todo.completed = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.entityMapper.save(todo);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // we do not delete recurring todos created when completing this for now
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/UnsavedChangesService.html b/documentation/injectables/UnsavedChangesService.html new file mode 100644 index 0000000000..72a432c54e --- /dev/null +++ b/documentation/injectables/UnsavedChangesService.html @@ -0,0 +1,448 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity-details/form/unsaved-changes.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This service handles the state whether there are currently some unsaved changes in the app. +These pending changes might come from a form component or popup. +If there are pending changes, certain actions in the app should trigger a user confirmation if the changes should be discarded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +constructor(confirmation: ConfirmationDialogService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    confirmation + ConfirmationDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + Async + checkUnsavedChanges + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + checkUnsavedChanges() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Shows a user confirmation popup if there are unsaved changes which will be discarded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Returns : unknown + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + pending + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Default value : false +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Set to true if the user has pending changes that are not yet saved. +Set to false once the changes have been saved or discarded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ConfirmationDialogService } from "../../common-components/confirmation-dialog/confirmation-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This service handles the state whether there are currently some unsaved changes in the app.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * These pending changes might come from a form component or popup.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * If there are pending changes, certain actions in the app should trigger a user confirmation if the changes should be discarded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class UnsavedChangesService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Set to true if the user has pending changes that are not yet saved.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Set to false once the changes have been saved or discarded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(private confirmation: ConfirmationDialogService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // prevent browser navigation if changes are pending
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    window.onbeforeunload = (e) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (this.pending) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        e.preventDefault();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        e.returnValue = "onbeforeunload";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Shows a user confirmation popup if there are unsaved changes which will be discarded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async checkUnsavedChanges() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.pending) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const confirmed = await this.confirmation.getDiscardConfirmation();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      if (confirmed) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/UpdateManagerService.html b/documentation/injectables/UpdateManagerService.html new file mode 100644 index 0000000000..8cbd51a5e2 --- /dev/null +++ b/documentation/injectables/UpdateManagerService.html @@ -0,0 +1,635 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/ui/latest-changes/update-manager.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Check with the server whether a new version of the app is available in order to notify the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      As we are using ServiceWorkers to cache the app to also work offline, explicit checking for updates is necessary. +The user receives a toast (hover message) if an update is available +and can click that to reload the app with the new version.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +constructor(appRef: ApplicationRef, updates: SwUpdate, snackBar: MatSnackBar, latestChangesDialogService: LatestChangesDialogService, unsavedChanges: UnsavedChangesService, location: Location) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      appRef + ApplicationRef + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      updates + SwUpdate + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      snackBar + MatSnackBar + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      latestChangesDialogService + LatestChangesDialogService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      unsavedChanges + UnsavedChangesService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      location + Location + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + detectUnrecoverableState + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + detectUnrecoverableState() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Notifies user if app ends up in an unrecoverable state due to SW updates

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + listenToAppUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + listenToAppUpdates() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Display a notification to the user in case a new app version is detected by the ServiceWorker.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + Public + regularlyCheckForUpdates + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + regularlyCheckForUpdates() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Schedule a regular check with the server for updates.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : void + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { ApplicationRef, Inject, Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { SwUpdate } from "@angular/service-worker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { filter, first } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { concat, interval } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Logging } from "../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { LatestChangesDialogService } from "./latest-changes-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { LOCATION_TOKEN } from "../../../utils/di-tokens";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { UnsavedChangesService } from "../../entity-details/form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Check with the server whether a new version of the app is available in order to notify the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * As we are using ServiceWorkers to cache the app to also work offline, explicit checking for updates is necessary.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * The user receives a toast (hover message) if an update is available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * and can click that to reload the app with the new version.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class UpdateManagerService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private readonly UPDATE_PREFIX = "update-";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private appRef: ApplicationRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private updates: SwUpdate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private snackBar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private latestChangesDialogService: LatestChangesDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private unsavedChanges: UnsavedChangesService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Inject(LOCATION_TOKEN) private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.updates.unrecoverable.subscribe((err) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.error("App is in unrecoverable state: " + err.reason);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.location.reload();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const currentVersion = localStorage.getItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      LatestChangesDialogService.VERSION_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (currentVersion && currentVersion.startsWith(this.UPDATE_PREFIX)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        LatestChangesDialogService.VERSION_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        currentVersion.replace(this.UPDATE_PREFIX, ""),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.location.reload();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.latestChangesDialogService.showLatestChangesIfUpdated();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Display a notification to the user in case a new app version is detected by the ServiceWorker.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  public listenToAppUpdates() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.updates.isEnabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.updates.versionUpdates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .pipe(filter((e) => e.type === "VERSION_READY"))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .subscribe(() => this.updateIfPossible());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Schedule a regular check with the server for updates.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  public regularlyCheckForUpdates() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.updates.isEnabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    // Allow the app to stabilize first, before starting polling for updates with `interval()`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const appIsStable$ = this.appRef.isStable.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      first((isStable) => isStable === true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const everyHours$ = interval(60 * 60 * 1000);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const everyHoursOnceAppIsStable$ = concat(appIsStable$, everyHours$);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    everyHoursOnceAppIsStable$.subscribe(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.updates.checkForUpdate().catch((err) => Logging.error(err)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private updateIfPossible() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const currentVersion =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      localStorage.getItem(LatestChangesDialogService.VERSION_KEY) || "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (currentVersion.startsWith(this.UPDATE_PREFIX)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // Sometimes this is triggered multiple times for one update
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.unsavedChanges.pending) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // app cannot be safely reloaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        LatestChangesDialogService.VERSION_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.UPDATE_PREFIX + currentVersion,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.snackBar
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          $localize`A new version of the app is available!`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          $localize`:Action that a user can update the app with:Update`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .onAction()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            LatestChangesDialogService.VERSION_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            currentVersion,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          this.location.reload();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.location.reload();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Notifies user if app ends up in an unrecoverable state due to SW updates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  public detectUnrecoverableState() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this.updates.isEnabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.updates.unrecoverable.subscribe(({ reason }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      Logging.warn(`SW in unrecoverable state: ${reason}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.snackBar
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          $localize`The app is in a unrecoverable state, please reload.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          $localize`:Action that a user can reload the app with:Reload`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .onAction()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        .subscribe(() => this.location.reload());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/UpdateMetadataDatatype.html b/documentation/injectables/UpdateMetadataDatatype.html new file mode 100644 index 0000000000..1283828e20 --- /dev/null +++ b/documentation/injectables/UpdateMetadataDatatype.html @@ -0,0 +1,1077 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/entity/model/update-metadata.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Datatype for internally saved meta-data of entity edits.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + SchemaEmbedDatatype +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +constructor(schemaService: EntitySchemaService) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaService + EntitySchemaService + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + transformToDatabaseFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + transformToDatabaseFormat(value: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:42 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + transformToObjectFormat + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + transformToObjectFormat(value: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:49 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + anonymize + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:137 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value + EntityType + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The original value to be anonymized

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        parent + any + + No + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + importIncompleteAdditionalConfigBadge + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +importIncompleteAdditionalConfigBadge(col: ColumnMapping) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:129 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Output a label indicating whether the given column mapping needs user configuration for the "additional" config +or has a valid, complete "additional" config. +returns "undefined" if no user action is required.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        col + ColumnMapping + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Async + importMapFunction + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + importMapFunction(val: any, schemaField: EntitySchemaField, additional?: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:103 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The function used to map values from the import data to values in the entities to be created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NameTypeOptionalDescription
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        val + any + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The value from an imported cell to be mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schemaField + EntitySchemaField + + No + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The schema field definition for the target property into which the value is mapped

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        additional + any + + Yes + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        config as returned by the configComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Returns : Promise<EntityType | []> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Properties +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + + dataType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : UpdateMetadata.DATA_TYPE +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:12 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + embeddedType + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : UpdateMetadata as unknown as EntityConstructor +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from SchemaEmbedDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + editComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "EditText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:61 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Optional + importConfigComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:121 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A component to be display as a dialog to configure the transformation function +(e.g. defining a format or mapping)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + Static + label + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : $localize`:datatype-label:any` +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:49 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The human-readable name for this dataType, used in config UIs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + viewComponent + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Default value : "DisplayText" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Inherited from DefaultDatatype +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Defined in DefaultDatatype:60 +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The default component how this datatype should be displayed in lists and forms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { UpdateMetadata } from "./update-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SchemaEmbedDatatype } from "../../basic-datatypes/schema-embed/schema-embed.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityConstructor } from "./entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitySchemaService } from "../schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Datatype for internally saved meta-data of entity edits.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class UpdateMetadataDatatype extends SchemaEmbedDatatype {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static override dataType = UpdateMetadata.DATA_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  override embeddedType = UpdateMetadata as unknown as EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(schemaService: EntitySchemaService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    super(schemaService);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/UserRoleGuard.html b/documentation/injectables/UserRoleGuard.html new file mode 100644 index 0000000000..c728c7ce13 --- /dev/null +++ b/documentation/injectables/UserRoleGuard.html @@ -0,0 +1,431 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/permissions/permission-guard/user-role.guard.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A guard that checks the roles of the current user against the permissions which are saved in the route data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + AbstractPermissionGuard +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +constructor(router: Router, sessionInfo: SessionSubject) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          router + Router + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sessionInfo + SessionSubject + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + Protected + Async + canAccessRoute + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + canAccessRoute(routeData: DynamicComponentConfig) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          routeData + DynamicComponentConfig + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : Promise<boolean> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AbstractPermissionGuard } from "./abstract-permission.guard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponentConfig } from "../../config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A guard that checks the roles of the current user against the permissions which are saved in the route data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class UserRoleGuard extends AbstractPermissionGuard {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super(router);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  protected async canAccessRoute(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    routeData: DynamicComponentConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<boolean> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const permittedRoles = routeData?.permittedUserRoles;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const user = this.sessionInfo.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (permittedRoles?.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // Check if user has a role which is in the list of permitted roles
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return permittedRoles.some((role) => user.roles.includes(role));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // No config set => all users are allowed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interceptors/AcceptLanguageInterceptor.html b/documentation/interceptors/AcceptLanguageInterceptor.html new file mode 100644 index 0000000000..78dab709fe --- /dev/null +++ b/documentation/interceptors/AcceptLanguageInterceptor.html @@ -0,0 +1,400 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/language/accept-language.interceptor.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +constructor(locale: string) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            locale + string + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + intercept + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +intercept(request: HttpRequest<>, next: HttpHandler) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            request + HttpRequest<> + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            next + HttpHandler + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Returns : Observable<HttpEvent<>> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Inject, Injectable, LOCALE_ID } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  HttpEvent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  HttpHandler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  HttpInterceptor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  HttpRequest,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class AcceptLanguageInterceptor implements HttpInterceptor {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(@Inject(LOCALE_ID) private locale: string) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  intercept(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    request: HttpRequest<unknown>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    next: HttpHandler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ): Observable<HttpEvent<unknown>> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return next.handle(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      request.clone({ setHeaders: { "Accept-Language": this.locale } }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AdditionalImportAction.html b/documentation/interfaces/AdditionalImportAction.html new file mode 100644 index 0000000000..0114ab01d9 --- /dev/null +++ b/documentation/interfaces/AdditionalImportAction.html @@ -0,0 +1,330 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/import/import-additional-actions/additional-import-action.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Definition of an additional generic import action, e.g. linking imported records to an existing group entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + type + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + type: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              export interface AdditionalImportAction {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  type: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AdminTabTemplateContext.html b/documentation/interfaces/AdminTabTemplateContext.html new file mode 100644 index 0000000000..5a7e6407d3 --- /dev/null +++ b/documentation/interfaces/AdminTabTemplateContext.html @@ -0,0 +1,343 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/admin/building-blocks/admin-tabs/admin-tab-template.directive.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + $implicit + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + $implicit: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + index + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + index: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Directive, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +// following guide from https://medium.com/@thomas.laforge/ngtemplateoutlet-type-checking-5d2dcb07a2c6
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +// to ensure typing of ng-template context
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +interface AdminTabTemplateContext<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  $implicit: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  index: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Directive({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "ng-template[appAdminTabTemplate]",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class AdminTabTemplateDirective<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input("appAdminTabTemplate") tabs!: T[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static ngTemplateContextGuard<TContext>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    dir: AdminTabTemplateDirective<TContext>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ctx: unknown,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): ctx is AdminTabTemplateContext<TContext> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/Aggregation.html b/documentation/interfaces/Aggregation.html new file mode 100644 index 0000000000..6920e33030 --- /dev/null +++ b/documentation/interfaces/Aggregation.html @@ -0,0 +1,553 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/reporting/data-aggregation.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + aggregations + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + aggregations: Aggregation[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Aggregation[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + groupBy + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + groupBy: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + query + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + query: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { QueryService } from "../../core/export/query.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { GroupByDescription, ReportRow } from "./report-row";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { groupBy } from "../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface Aggregation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  query: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  groupBy?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  aggregations?: Aggregation[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class DataAggregationService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private fromDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private toDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(private queryService: QueryService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public async calculateReport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    aggregations: Aggregation[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    from?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    to?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): Promise<ReportRow[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.fromDate = from;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.toDate = to;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const fullQuery = aggregations.map((a) => this.concatQueries(a)).join("|");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    await this.queryService.cacheRequiredData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      fullQuery,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.fromDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.toDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.calculateAggregations(aggregations);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private concatQueries(config: Aggregation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return (config.aggregations ?? []).reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      (query, c) => query + this.concatQueries(c),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      config.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private calculateAggregations(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    aggregations: Aggregation[] = [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    data?: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    additionalValues: GroupByDescription[] = [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): ReportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const resultRows: ReportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let currentSubRows = resultRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const aggregation of aggregations) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const queryResult = this.queryService.queryData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        aggregation.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.fromDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.toDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (aggregation.label) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        const newRow = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          header: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            label: aggregation.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            groupedBy: additionalValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            result: queryResult?.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          subRows: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        resultRows.push(newRow);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        currentSubRows = newRow.subRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (aggregation.aggregations) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        currentSubRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ...this.calculateAggregations(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            aggregation.aggregations,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            queryResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            additionalValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (aggregation.groupBy) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        currentSubRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ...this.calculateGroupBy(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            aggregation.groupBy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            aggregation.aggregations,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            aggregation.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            queryResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            additionalValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return resultRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private calculateGroupBy(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    properties: string[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    aggregations: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    label: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    data: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    additionalValues: GroupByDescription[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): ReportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const resultRows: ReportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (let i = properties.length; i > 0; i--) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const currentProperty = properties[i - 1];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const remainingProperties = properties.slice(i);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const groupingResults = groupBy(data, currentProperty);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      for (const [group, entries] of groupingResults) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        const groupingValues = additionalValues.concat({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          property: currentProperty,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          value: group,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        const newRow: ReportRow = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          header: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            label: label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            groupedBy: groupingValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            result: entries.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          subRows: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        newRow.subRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ...this.calculateAggregations(aggregations, entries, groupingValues),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        newRow.subRows.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ...this.calculateGroupBy(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            remainingProperties,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            aggregations,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            entries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            groupingValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        resultRows.push(newRow);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return resultRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AggregationReport.html b/documentation/interfaces/AggregationReport.html new file mode 100644 index 0000000000..47585e09ac --- /dev/null +++ b/documentation/interfaces/AggregationReport.html @@ -0,0 +1,407 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/features/reporting/report-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Reports handles by the {@class DataAggregationService}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ReportConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + aggregationDefinitions + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + aggregationDefinitions: Aggregation[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : Aggregation[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + mode + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + mode: + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Entity, EntityConstructor } from "../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DatabaseEntity } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Aggregation } from "./data-aggregation.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ExportColumnConfig } from "../../core/export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DatabaseField } from "../../core/entity/database-field.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * A report can be accessed by users to generate aggregated statistics or customized exports calculated from available data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * "read" permission for a ReportConfig entity is also used to control which users can generate the report's results.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This is the class which is saved to the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * However, when using this in code, use the {@link ReportEntity} instead which provides better type safety.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@DatabaseEntity("ReportConfig")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +class ReportConfig extends Entity {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** human-readable title of the report */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @DatabaseField() title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * (optional) mode of export.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The {@link ReportEntity} holds the restriction on valid report modes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is "reporting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @DatabaseField() mode?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * (sql only) list of arguments needed for the sql query. Placeholder "?" will be replaced.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @DatabaseField() neededArgs?: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** the definitions to calculate the report's aggregations */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @DatabaseField() aggregationDefinitions: any[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** (sql only) the definition to calculate the report */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @DatabaseField() aggregationDefinition: string | undefined = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Union type to enable type safety for report configs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Use this instead of the {@class ReportConfig}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export type ReportEntity = AggregationReport | ExportingReport | SqlReport;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This allows the `ReportEntity` to also be used as a constructor or in the `EntityMapper`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export const ReportEntity = ReportConfig as EntityConstructor<ReportEntity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Reports handles by the {@class DataAggregationService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface AggregationReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mode: "reporting";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  aggregationDefinitions: Aggregation[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Reports handles by the {@class DataTransformationService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ExportingReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * If no mode is set, it will default to 'exporting'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mode?: "exporting";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  aggregationDefinitions: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Reports handles by the {@class SqlReportService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface SqlReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mode: "sql";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * a valid SQL SELECT statements, can contain "?" placeholder for arguments
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  aggregationDefinition: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * a list of arguments, passed into the sql statement
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  neededArgs: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AlertConfig.html b/documentation/interfaces/AlertConfig.html new file mode 100644 index 0000000000..2388a89a1c --- /dev/null +++ b/documentation/interfaces/AlertConfig.html @@ -0,0 +1,402 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/alerts/alert-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + display + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + display: AlertDisplay + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : AlertDisplay + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The display style (e.g. whether the alert has to be actively dismissed by the user)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + message + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + message: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The text of the message

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + type + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + type: "info" | "warning" | "danger" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : "info" | "warning" | "danger" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The type of the message

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Info messages provide feedback or information to the user without any required action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Warning messages provide feedback about unexpected or potentially unintended events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Danger messages inform about errors or critical conditions that the user should not overlook
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { AlertDisplay } from "./alert-display";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface AlertConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** The text of the message */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  message: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** The type of the message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  - Info messages provide feedback or information to the user without any required action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  - Warning messages provide feedback about unexpected or potentially unintended events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  - Danger messages inform about errors or critical conditions that the user should not overlook
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  type: "info" | "warning" | "danger";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** The display style (e.g. whether the alert has to be actively dismissed by the user) */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  display: AlertDisplay;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface ExtendedAlertConfig extends AlertConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  timestamp: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AttendanceInfo.html b/documentation/interfaces/AttendanceInfo.html new file mode 100644 index 0000000000..8d06b64d4c --- /dev/null +++ b/documentation/interfaces/AttendanceInfo.html @@ -0,0 +1,861 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/export/query.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + participant + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + participant: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + school + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + school: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + status + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + status: EventAttendance + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EventAttendance + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity, EntityConstructor } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Note } from "../../child-dev-project/notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EventNote } from "../../child-dev-project/attendance/model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ChildSchoolRelation } from "../../child-dev-project/children/model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ChildrenService } from "../../child-dev-project/children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { AttendanceService } from "../../child-dev-project/attendance/attendance.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EventAttendance } from "../../child-dev-project/attendance/model/event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import jsonQuery from "json-query";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityRegistry } from "../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * A query service which uses the json-query library (https://github.com/auditassistant/json-query).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class QueryService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private entities: { [type: string]: { [id: string]: Entity } } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * A map of information about the loading state of the different entity types
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private entityInfo: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    [type: string]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       * A optional function which can be used to load this entity that might use a start and end date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      dataFunction?: (form, to) => Promise<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       * Whether already all entities of this type have been loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      allLoaded?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       * A certain range in which entities of this type have been loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      rangeLoaded?: { from: Date; to: Date };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       * Whether updates of this entity are listened to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      updating?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  } = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    Note: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      dataFunction: (from, to) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.childrenService.getNotesInTimespan(from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EventNote: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      dataFunction: (from, to) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.attendanceService.getEventsOnDate(from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * A list of further aliases for which a certain entity needs to be loaded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This can be necessary if a function requires a certain entity to be present.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private queryStringMap: [string, EntityConstructor][] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ["getAttendanceArray\\(true\\)", ChildSchoolRelation],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityRegistry.forEach((entity, name) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.queryStringMap.push([name, entity]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Runs the query on the passed data object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param query a string or array according to the json-query language (https://github.com/auditassistant/json-query)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param from a date which can be accessed in the query using a ?.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param to a date which can be accessed in the query using another ?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data the data on which the query should run, default is all entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns the results of the query on the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  public queryData(query: string, from?: Date, to?: Date, data?: any): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from = from ?? new Date(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to = to ?? new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!data) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data = this.entities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return jsonQuery([query, from, to], {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data: data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      locals: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        toArray: this.toArray,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        unique: this.unique,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        count: this.count,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        sum: this.sum,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        avg: this.avg,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        toEntities: this.toEntities.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        getRelated: this.getRelated.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        filterByObjectAttribute: this.filterByObjectAttribute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        getIds: this.getIds,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        getParticipantsWithAttendance: this.getParticipantsWithAttendance,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        getAttendanceArray: this.getAttendanceArray.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        getAttendanceReport: this.getAttendanceReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        addEntities: this.addEntities.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        setString: this.setString,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }).value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Call this function to prefetch required data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param query single query or concatenation of all query strings that will be executed soon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param from date from which data should be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param to date to which data should be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async cacheRequiredData(query: string, from: Date, to: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from = from ?? new Date(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to = to ?? new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const uncachedEntities = this.getUncachedEntities(query, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const dataPromises = uncachedEntities.map((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const info = this.entityInfo[entity.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (info?.dataFunction) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return info.dataFunction(from, to).then((loadedEntities) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.setEntities(entity, loadedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          info.rangeLoaded = { from, to };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return this.entityMapper.loadType(entity).then((loadedEntities) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.setEntities(entity, loadedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.entityInfo[entity.ENTITY_TYPE] = { allLoaded: true };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    await Promise.all(dataPromises);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.applyEntityUpdates(uncachedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private applyEntityUpdates(uncachedEntities: EntityConstructor[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    uncachedEntities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter(({ ENTITY_TYPE }) => !this.entityInfo[ENTITY_TYPE].updating)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .forEach(({ ENTITY_TYPE }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.entityInfo[ENTITY_TYPE].updating = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          .receiveUpdates(ENTITY_TYPE)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          .subscribe(({ entity, type }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            if (type === "remove") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              delete this.entities[ENTITY_TYPE][entity.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              this.entities[ENTITY_TYPE][entity.getId()] = entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Get entities that are referenced in the query string and are not sufficiently cached.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param query
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getUncachedEntities(query: string, from: Date, to: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.queryStringMap
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter(([matcher]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        // matches query string without any alphanumeric characters before or after (e.g. so Child does not match ChildSchoolRelation)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        query?.match(new RegExp(`(^|\\W)${matcher}(\\W|$)`)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .map(([_, entity]) => entity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const info = this.entityInfo[entity.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          info === undefined ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          !(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            info.allLoaded ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            (info.rangeLoaded?.from <= from && info.rangeLoaded?.to >= to)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private setEntities<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityClass: EntityConstructor<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entities: T[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.entities[entityClass.ENTITY_TYPE] = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entities.forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (this.entities[entityClass.ENTITY_TYPE][entity.getId()] = entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Creates an array containing the value of each key of the object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * e.g. `{a: 1, b: 2} => [1,2]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This should be used when iterating over all documents of a given entity type because they are stored as
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * `"{entity._id}": {entity}`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param obj the object which should be transformed to an array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns the values of the input object as a list
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private toArray(obj): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return Object.values(obj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Returns a copy of the input array without duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data the array where duplicates should be removed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns a list without duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private unique(data: any[]): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return new Array(...new Set(data));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Get the size of an array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data the data for which the length should be returned
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns the length of the input array or 0 if no array is provided
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private count(data: any[]): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return data ? data.length : 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Returns the (integer) sum of the provided array.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * It can also handle integers in strings, e.g. "3"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data an integer array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private sum(data: any[]): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return data.reduce((res, cur) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const parsed = Number.parseInt(cur);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return Number.isNaN(parsed) ? res : res + parsed;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Returns the avg of the provided array as string.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * It can also handle integers in strings, e.g. "3".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The average is only calculated if the value exists and is a valid number.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data an integer array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param decimals the amount of decimals for the result, default 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private avg(data: any[], decimals = 0): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const numbers = data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .map((d) => Number.parseInt(d))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((i) => !Number.isNaN(i));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const result =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      numbers.length === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ? 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        : numbers.reduce((i, sum) => sum + i, 0) / numbers.length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return result.toFixed(decimals);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Turns a list of ids (with the entity prefix) into a list of entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param ids the array of ids with entity prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param entityPrefix indicate the type of entity that should be loaded. This is required for pre-loading the required entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns a list of entity objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private toEntities(ids: string[], entityPrefix: string): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!entityPrefix) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      throw new Error("Entity type not defined");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!ids) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return ids
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((id) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (typeof id !== "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          console.debug("invalid entity id in Query :toEntities", id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .map((id) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const prefix = id.split(":")[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return this.entities[prefix][id];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((entity) => !!entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Returns all entities which reference a entity from the passed list of entities (by their id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param srcEntities the entities for which relations should be found
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param entityType the type of entities where relations should be looked for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param relationKey the name of the attribute that holds the reference.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *                    The attribute can be a string or a list of strings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns a list of the related unique entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getRelated(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    srcEntities: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    relationKey: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const targetEntities = this.toArray(this.entities[entityType]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const srcIds = srcEntities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((entity) => typeof entity.getId === "function") // skip empty placeholder objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .map((entity) => entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      targetEntities.length > 0 &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Array.isArray(targetEntities[0][relationKey])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return targetEntities.filter((entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (entity[relationKey] as string[]).some((id) => srcIds.includes(id)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return targetEntities.filter((entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        entity[relationKey] ? srcIds.includes(entity[relationKey]) : false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Filters the data when the filter value is a object (e.g. configurable enum) rather than a simple value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param objs the objects to be filtered
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param attr the attribute of the objects which is a object itself
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param key the key of the attribute-object which should be compared
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param value the value which will be compared with `obj[attr][key]` for each obj in objs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *              The value can be a simple value or list of values separated by `|` (e.g. SCHOOL_CLASS|LIFE_SKILLS).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *              If it is a list of values, then the object is returned if its value matches any of the given values.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns the filtered objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private filterByObjectAttribute(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    objs: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    attr: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    key: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // splits at "|" and removes optional whitespace before or after the symbol
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const values = value.trim().split(/\s*\|\s*/);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return objs.filter((obj) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (obj?.hasOwnProperty(attr)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return values.includes(obj[attr][key]?.toString());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Returns a list of IDs held by each object (e.g. the children-IDs held by an array of notes)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param objs the objects which each holds a list of IDs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param key the key on which each object holds a list of IDs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns a one dimensional string array holding all IDs which are held by the objects.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *            This list may contain duplicate IDs. If this is not desired, use `:unique` afterwards.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getIds(objs: any[], key: string): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const ids: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    objs.forEach((obj) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (obj.hasOwnProperty(key)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ids.push(...obj[key]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return ids;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Return the ids of all the participants of the passed events with the defined attendance status using the `countAs`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * attribute. The list may contain duplicates and the id does not necessarily have the entity prefix.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param events the array of events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param attendanceStatus the status for which should be looked for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns the ids of children which have the specified attendance in an event
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getParticipantsWithAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    events: EventNote[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    attendanceStatus: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const attendedChildren: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    events.forEach((e) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      e.children.forEach((childId) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (e.getAttendance(childId).status.countAs === attendanceStatus) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          attendedChildren.push(childId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return attendedChildren;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Transforms a list of notes or event-notes into a flattened list of participants and their attendance for each event.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param events the input list of type Note or EventNote
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param includeSchool (optional) also include the school to which a participant belongs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns AttendanceInfo[] a list holding information about the attendance of a single participant
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getAttendanceArray(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    events: Note[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    includeSchool = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): AttendanceInfo[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const attendances: AttendanceInfo[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const event of events) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const linkedRelations = includeSchool
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ? this.getMembersOfGroupsForEvent(event)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        : [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      for (const child of event.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const attendance: AttendanceInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          participant: child,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          status: event.getAttendance(child),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const relation = linkedRelations.find((rel) => rel.childId === child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (relation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          attendance.school = relation.schoolId;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        attendances.push(attendance);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return attendances;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getMembersOfGroupsForEvent(event: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.toArray(this.entities[ChildSchoolRelation.ENTITY_TYPE]).filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (relation) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        event.schools.includes(relation.schoolId) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        relation.isActiveAt(event.date),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Transforms a list of attendances infos into an aggregated report for each participant
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param attendances an array of AttendanceInfo objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns AttendanceReport[] for each participant the ID, the number of present and total absences as well as the attendance percentage.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getAttendanceReport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    attendances: AttendanceInfo[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): AttendanceReport[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const participantMap: { [key in string]: AttendanceReport } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    attendances.forEach((attendance) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (!participantMap.hasOwnProperty(attendance.participant)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        participantMap[attendance.participant] = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          participant: attendance.participant,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          total: 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          present: 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          percentage: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          detailedStatus: {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const report = participantMap[attendance.participant];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      report.detailedStatus[attendance.status.status.id] = report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .detailedStatus[attendance.status.status.id]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ? report.detailedStatus[attendance.status.status.id] + 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        : 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (attendance.status.status.countAs === "PRESENT") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        report.present++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (attendance.status.status.countAs !== "IGNORE") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        report.total++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (report.total > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        report.percentage = (report.present / report.total).toFixed(2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return Object.values(participantMap);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Adds all entities of the given type to the input array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param entities the array before
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param entityType the type of entities which should be added
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns the input array concatenated with all entities of the entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private addEntities(entities: Entity[], entityType: string): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return entities.concat(...this.toArray(this.entities[entityType]));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Replaces all input values by the string provided
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data the data which will be replaced
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param value the string which should replace initial data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns array of same length as data where every input is value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private setString(data: any[], value: string): string[] | string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return Array.isArray(data) ? data.map(() => value) : value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface AttendanceInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  participant: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  status: EventAttendance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  school?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface AttendanceReport {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  participant: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  total: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  present: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  percentage: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** counts by all custom configured status **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  detailedStatus?: { [key: string]: number };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AttendanceReport.html b/documentation/interfaces/AttendanceReport.html new file mode 100644 index 0000000000..53bad68e99 --- /dev/null +++ b/documentation/interfaces/AttendanceReport.html @@ -0,0 +1,945 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/export/query.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + detailedStatus + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + detailedStatus: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          counts by all custom configured status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + participant + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + participant: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + percentage + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + percentage: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + present + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + present: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + total + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + total: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity, EntityConstructor } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Note } from "../../child-dev-project/notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EventNote } from "../../child-dev-project/attendance/model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ChildSchoolRelation } from "../../child-dev-project/children/model/childSchoolRelation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ChildrenService } from "../../child-dev-project/children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AttendanceService } from "../../child-dev-project/attendance/attendance.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EventAttendance } from "../../child-dev-project/attendance/model/event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import jsonQuery from "json-query";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A query service which uses the json-query library (https://github.com/auditassistant/json-query).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class QueryService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private entities: { [type: string]: { [id: string]: Entity } } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A map of information about the loading state of the different entity types
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private entityInfo: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    [type: string]: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * A optional function which can be used to load this entity that might use a start and end date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * @param form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dataFunction?: (form, to) => Promise<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * Whether already all entities of this type have been loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      allLoaded?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * A certain range in which entities of this type have been loaded
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      rangeLoaded?: { from: Date; to: Date };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       * Whether updates of this entity are listened to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +       */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      updating?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  } = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    Note: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dataFunction: (from, to) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.childrenService.getNotesInTimespan(from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    EventNote: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dataFunction: (from, to) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.attendanceService.getEventsOnDate(from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A list of further aliases for which a certain entity needs to be loaded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * This can be necessary if a function requires a certain entity to be present.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private queryStringMap: [string, EntityConstructor][] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ["getAttendanceArray\\(true\\)", ChildSchoolRelation],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityRegistry.forEach((entity, name) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.queryStringMap.push([name, entity]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Runs the query on the passed data object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param query a string or array according to the json-query language (https://github.com/auditassistant/json-query)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from a date which can be accessed in the query using a ?.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to a date which can be accessed in the query using another ?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the data on which the query should run, default is all entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the results of the query on the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  public queryData(query: string, from?: Date, to?: Date, data?: any): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from = from ?? new Date(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to = to ?? new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!data) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      data = this.entities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return jsonQuery([query, from, to], {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      data: data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      locals: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        toArray: this.toArray,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        unique: this.unique,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        count: this.count,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        sum: this.sum,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        avg: this.avg,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        toEntities: this.toEntities.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getRelated: this.getRelated.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        filterByObjectAttribute: this.filterByObjectAttribute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getIds: this.getIds,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getParticipantsWithAttendance: this.getParticipantsWithAttendance,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getAttendanceArray: this.getAttendanceArray.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        getAttendanceReport: this.getAttendanceReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        addEntities: this.addEntities.bind(this),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        setString: this.setString,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }).value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Call this function to prefetch required data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param query single query or concatenation of all query strings that will be executed soon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from date from which data should be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to date to which data should be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async cacheRequiredData(query: string, from: Date, to: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from = from ?? new Date(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to = to ?? new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const uncachedEntities = this.getUncachedEntities(query, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const dataPromises = uncachedEntities.map((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const info = this.entityInfo[entity.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (info?.dataFunction) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return info.dataFunction(from, to).then((loadedEntities) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.setEntities(entity, loadedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          info.rangeLoaded = { from, to };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.entityMapper.loadType(entity).then((loadedEntities) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.setEntities(entity, loadedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.entityInfo[entity.ENTITY_TYPE] = { allLoaded: true };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await Promise.all(dataPromises);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.applyEntityUpdates(uncachedEntities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private applyEntityUpdates(uncachedEntities: EntityConstructor[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    uncachedEntities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter(({ ENTITY_TYPE }) => !this.entityInfo[ENTITY_TYPE].updating)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .forEach(({ ENTITY_TYPE }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.entityInfo[ENTITY_TYPE].updating = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.entityMapper
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          .receiveUpdates(ENTITY_TYPE)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          .subscribe(({ entity, type }) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            if (type === "remove") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              delete this.entities[ENTITY_TYPE][entity.getId()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              this.entities[ENTITY_TYPE][entity.getId()] = entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Get entities that are referenced in the query string and are not sufficiently cached.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param query
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getUncachedEntities(query: string, from: Date, to: Date) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.queryStringMap
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter(([matcher]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // matches query string without any alphanumeric characters before or after (e.g. so Child does not match ChildSchoolRelation)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        query?.match(new RegExp(`(^|\\W)${matcher}(\\W|$)`)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map(([_, entity]) => entity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const info = this.entityInfo[entity.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          info === undefined ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          !(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            info.allLoaded ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            (info.rangeLoaded?.from <= from && info.rangeLoaded?.to >= to)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private setEntities<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityClass: EntityConstructor<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entities: T[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.entities[entityClass.ENTITY_TYPE] = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entities.forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (this.entities[entityClass.ENTITY_TYPE][entity.getId()] = entity),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Creates an array containing the value of each key of the object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * e.g. `{a: 1, b: 2} => [1,2]`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * This should be used when iterating over all documents of a given entity type because they are stored as
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * `"{entity._id}": {entity}`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param obj the object which should be transformed to an array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the values of the input object as a list
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private toArray(obj): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Object.values(obj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns a copy of the input array without duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the array where duplicates should be removed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a list without duplicates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private unique(data: any[]): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return new Array(...new Set(data));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Get the size of an array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the data for which the length should be returned
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the length of the input array or 0 if no array is provided
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private count(data: any[]): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return data ? data.length : 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns the (integer) sum of the provided array.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * It can also handle integers in strings, e.g. "3"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data an integer array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private sum(data: any[]): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return data.reduce((res, cur) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const parsed = Number.parseInt(cur);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return Number.isNaN(parsed) ? res : res + parsed;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns the avg of the provided array as string.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * It can also handle integers in strings, e.g. "3".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The average is only calculated if the value exists and is a valid number.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data an integer array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param decimals the amount of decimals for the result, default 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private avg(data: any[], decimals = 0): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const numbers = data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((d) => Number.parseInt(d))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((i) => !Number.isNaN(i));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const result =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      numbers.length === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ? 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        : numbers.reduce((i, sum) => sum + i, 0) / numbers.length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return result.toFixed(decimals);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Turns a list of ids (with the entity prefix) into a list of entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param ids the array of ids with entity prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityPrefix indicate the type of entity that should be loaded. This is required for pre-loading the required entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a list of entity objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private toEntities(ids: string[], entityPrefix: string): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!entityPrefix) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      throw new Error("Entity type not defined");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!ids) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return ids
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((id) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (typeof id !== "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          console.debug("invalid entity id in Query :toEntities", id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((id) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const prefix = id.split(":")[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.entities[prefix][id];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((entity) => !!entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns all entities which reference a entity from the passed list of entities (by their id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param srcEntities the entities for which relations should be found
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityType the type of entities where relations should be looked for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param relationKey the name of the attribute that holds the reference.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *                    The attribute can be a string or a list of strings
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a list of the related unique entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getRelated(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    srcEntities: Entity[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    relationKey: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const targetEntities = this.toArray(this.entities[entityType]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const srcIds = srcEntities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((entity) => typeof entity.getId === "function") // skip empty placeholder objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((entity) => entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      targetEntities.length > 0 &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Array.isArray(targetEntities[0][relationKey])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return targetEntities.filter((entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (entity[relationKey] as string[]).some((id) => srcIds.includes(id)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return targetEntities.filter((entity) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        entity[relationKey] ? srcIds.includes(entity[relationKey]) : false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Filters the data when the filter value is a object (e.g. configurable enum) rather than a simple value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param objs the objects to be filtered
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param attr the attribute of the objects which is a object itself
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param key the key of the attribute-object which should be compared
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param value the value which will be compared with `obj[attr][key]` for each obj in objs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *              The value can be a simple value or list of values separated by `|` (e.g. SCHOOL_CLASS|LIFE_SKILLS).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *              If it is a list of values, then the object is returned if its value matches any of the given values.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the filtered objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private filterByObjectAttribute(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    objs: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attr: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    key: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): any[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // splits at "|" and removes optional whitespace before or after the symbol
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const values = value.trim().split(/\s*\|\s*/);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return objs.filter((obj) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (obj?.hasOwnProperty(attr)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return values.includes(obj[attr][key]?.toString());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Returns a list of IDs held by each object (e.g. the children-IDs held by an array of notes)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param objs the objects which each holds a list of IDs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param key the key on which each object holds a list of IDs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a one dimensional string array holding all IDs which are held by the objects.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *            This list may contain duplicate IDs. If this is not desired, use `:unique` afterwards.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getIds(objs: any[], key: string): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const ids: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    objs.forEach((obj) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (obj.hasOwnProperty(key)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ids.push(...obj[key]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return ids;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Return the ids of all the participants of the passed events with the defined attendance status using the `countAs`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * attribute. The list may contain duplicates and the id does not necessarily have the entity prefix.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param events the array of events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param attendanceStatus the status for which should be looked for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the ids of children which have the specified attendance in an event
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getParticipantsWithAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    events: EventNote[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attendanceStatus: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): string[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const attendedChildren: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    events.forEach((e) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      e.children.forEach((childId) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (e.getAttendance(childId).status.countAs === attendanceStatus) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          attendedChildren.push(childId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return attendedChildren;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Transforms a list of notes or event-notes into a flattened list of participants and their attendance for each event.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param events the input list of type Note or EventNote
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param includeSchool (optional) also include the school to which a participant belongs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns AttendanceInfo[] a list holding information about the attendance of a single participant
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getAttendanceArray(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    events: Note[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    includeSchool = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): AttendanceInfo[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const attendances: AttendanceInfo[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const event of events) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const linkedRelations = includeSchool
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ? this.getMembersOfGroupsForEvent(event)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        : [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      for (const child of event.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const attendance: AttendanceInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          participant: child,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          status: event.getAttendance(child),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const relation = linkedRelations.find((rel) => rel.childId === child);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (relation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          attendance.school = relation.schoolId;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        attendances.push(attendance);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return attendances;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getMembersOfGroupsForEvent(event: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.toArray(this.entities[ChildSchoolRelation.ENTITY_TYPE]).filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      (relation) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        event.schools.includes(relation.schoolId) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        relation.isActiveAt(event.date),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Transforms a list of attendances infos into an aggregated report for each participant
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param attendances an array of AttendanceInfo objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns AttendanceReport[] for each participant the ID, the number of present and total absences as well as the attendance percentage.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getAttendanceReport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attendances: AttendanceInfo[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): AttendanceReport[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const participantMap: { [key in string]: AttendanceReport } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    attendances.forEach((attendance) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (!participantMap.hasOwnProperty(attendance.participant)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        participantMap[attendance.participant] = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          participant: attendance.participant,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          total: 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          present: 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          percentage: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          detailedStatus: {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const report = participantMap[attendance.participant];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      report.detailedStatus[attendance.status.status.id] = report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .detailedStatus[attendance.status.status.id]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ? report.detailedStatus[attendance.status.status.id] + 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        : 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (attendance.status.status.countAs === "PRESENT") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        report.present++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (attendance.status.status.countAs !== "IGNORE") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        report.total++;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (report.total > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        report.percentage = (report.present / report.total).toFixed(2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Object.values(participantMap);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Adds all entities of the given type to the input array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entities the array before
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityType the type of entities which should be added
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns the input array concatenated with all entities of the entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private addEntities(entities: Entity[], entityType: string): Entity[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return entities.concat(...this.toArray(this.entities[entityType]));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Replaces all input values by the string provided
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param data the data which will be replaced
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param value the string which should replace initial data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns array of same length as data where every input is value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private setString(data: any[], value: string): string[] | string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Array.isArray(data) ? data.map(() => value) : value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface AttendanceInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  participant: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  status: EventAttendance;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  school?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface AttendanceReport {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  participant: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  total: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  present: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  percentage: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** counts by all custom configured status **/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  detailedStatus?: { [key: string]: number };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AttendanceStatusType.html b/documentation/interfaces/AttendanceStatusType.html new file mode 100644 index 0000000000..e32cc47a1e --- /dev/null +++ b/documentation/interfaces/AttendanceStatusType.html @@ -0,0 +1,534 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/child-dev-project/attendance/model/attendance-status.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Details of one status option users can assign to a participant's details attending an event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + ConfigurableEnumValue +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + countAs + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + countAs: AttendanceLogicalStatus + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : AttendanceLogicalStatus + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            how this status will be categorized and considered for statistics and analysis

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            persistent id that remains unchanged in the config database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            a clear, spelled out title of the status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + shortName + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + shortName: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            a short (one letter) representation e.g. used in calendar view

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + style + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + style: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            a css class with styling related to the status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { ConfigurableEnumValue } from "../../../core/basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * logical type of an attendance status, i.e. how it will be considered for statistics and analysis.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export enum AttendanceLogicalStatus {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  PRESENT = "PRESENT",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ABSENT = "ABSENT",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  IGNORE = "IGNORE",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * the id through which the available attendance status types can be loaded from the ConfigService.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export const ATTENDANCE_STATUS_CONFIG_ID = "attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Details of one status option users can assign to a participant's details attending an event.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface AttendanceStatusType extends ConfigurableEnumValue {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** persistent id that remains unchanged in the config database */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** a clear, spelled out title of the status */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** a short (one letter) representation e.g. used in calendar view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  shortName: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * how this status will be categorized and considered for statistics and analysis
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  countAs: AttendanceLogicalStatus;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** a css class with styling related to the status */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  style?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Null object representing an unknown attendance status.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This allows easier handling of attendance status logic because exceptional checks for undefined are not necessary.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export const NullAttendanceStatusType: AttendanceStatusType = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  id: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  shortName: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  countAs: AttendanceLogicalStatus.IGNORE,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AttendanceWeekRow.html b/documentation/interfaces/AttendanceWeekRow.html new file mode 100644 index 0000000000..c49331ee83 --- /dev/null +++ b/documentation/interfaces/AttendanceWeekRow.html @@ -0,0 +1,545 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/child-dev-project/attendance/dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + activity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + activity: RecurringActivity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : RecurringActivity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + attendanceDays + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + attendanceDays: (EventAttendance | undefined)[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : (EventAttendance | undefined)[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + childId + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + childId: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { AttendanceLogicalStatus } from "../../model/attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { AttendanceService } from "../../attendance.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EventAttendance } from "../../model/event-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ActivityAttendance } from "../../model/activity-attendance";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RecurringActivity } from "../../model/recurring-activity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import moment, { Moment } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { groupBy } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { AttendanceDayBlockComponent } from "./attendance-day-block/attendance-day-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EventNote } from "../../model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +interface AttendanceWeekRow {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  childId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  activity: RecurringActivity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  attendanceDays: (EventAttendance | undefined)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("AttendanceWeekDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-attendance-week-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./attendance-week-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./attendance-week-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    AttendanceDayBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class AttendanceWeekDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static override getRequiredEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return EventNote.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The offset from the default time period, which is the last complete week.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * For example:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * If you set the offset of 0, the widget displays attendance for the last completed week (i.e. ending last Saturday).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * If you set the offset to 7 and today is Thursday, the widget displays attendance from the Monday 3 days ago
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * (i.e. the current running week).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() daysOffset = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * description displayed to users for what this widget is analysing
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * e.g. "Absences this week"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() periodLabel: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Only participants who were absent more than this threshold are counted and shown in the dashboard.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The default is 1.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * That means if someone was absent two or more days within a specific activity in the given week
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * the person will be counted and displayed as a critical case in this dashboard widget.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() absentWarningThreshold: number = 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The special attendance status type for which this widget should filter.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * (Optional) If this is not set, all status types that are counted as logically "ABSENT" are considered.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() attendanceStatusType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entries: AttendanceWeekRow[][];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private attendanceService: AttendanceService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.periodLabel && !this.label) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.label = $localize`:Dashboard attendance component subtitle:Absences ${this.periodLabel}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.loadAttendanceOfAbsentees();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async loadAttendanceOfAbsentees() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const previousMonday = moment()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .startOf("isoWeek")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .subtract(1, "week")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .add(this.daysOffset, "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const previousSaturday = moment(previousMonday).add(5, "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const activityAttendances =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.attendanceService.getAllActivityAttendancesForPeriod(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        previousMonday.toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        previousSaturday.toDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const lowAttendanceCases = new Set<string>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const records: AttendanceWeekRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const att of activityAttendances) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const rows = this.generateRowsFromActivityAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        att,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        moment(previousMonday),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        moment(previousSaturday),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      records.push(...rows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      rows
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .filter((r) => this.filterLowAttendance(r))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .forEach((r) => lowAttendanceCases.add(r.childId));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const groups = groupBy(records, "childId");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.entries = groups
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .filter(([childId]) => lowAttendanceCases.has(childId))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .map(([_, attendance]) => attendance);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private generateRowsFromActivityAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    att: ActivityAttendance,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    from: Moment,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    to: Moment,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): AttendanceWeekRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!att.activity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const results: AttendanceWeekRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const participant of att.activity.participants) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const eventAttendances = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      let day = moment(from);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      while (day.isSameOrBefore(to, "day")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        const event = att.events.find((e) => day.isSame(e.date, "day"));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        if (event) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          eventAttendances.push(event.getAttendance(participant));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          // put a "placeholder" into the array for the current day
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          eventAttendances.push(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        day = day.add(1, "day");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      results.push({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        childId: participant,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        activity: att.activity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        attendanceDays: eventAttendances,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return results;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private filterLowAttendance(row: AttendanceWeekRow): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let countAbsences = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this.attendanceStatusType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      countAbsences = row.attendanceDays.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (e) => e?.status?.countAs === AttendanceLogicalStatus.ABSENT,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ).length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      countAbsences = row.attendanceDays.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (e) => e?.status?.id === this.attendanceStatusType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ).length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return countAbsences > this.absentWarningThreshold;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  goToChild(childId: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const Child = this.entityRegistry.get("Child");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.router.navigate([Child.route, childId]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/AverageAttendanceStats.html b/documentation/interfaces/AverageAttendanceStats.html new file mode 100644 index 0000000000..31b19bb451 --- /dev/null +++ b/documentation/interfaces/AverageAttendanceStats.html @@ -0,0 +1,481 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/child-dev-project/attendance/model/calculate-average-event-attendance.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + average + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + average: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + counted + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + counted: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + excludedUnknown + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + excludedUnknown: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + logicalStatusCounts + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + logicalStatusCounts: Map<string | number> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Map<string | number> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + statusCounts + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + statusCounts: Map<string | number> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Map<string | number> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Note } from "../../notes/model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  AttendanceLogicalStatus,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  NullAttendanceStatusType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "./attendance-status";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface AverageAttendanceStats {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  average: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  counted: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  excludedUnknown: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  statusCounts: Map<string, number>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  logicalStatusCounts: Map<string, number>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export function calculateAverageAttendance(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  event: Note,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +): AverageAttendanceStats {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  const stats = new Map<AttendanceLogicalStatus, number>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  stats.set(AttendanceLogicalStatus.PRESENT, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  stats.set(AttendanceLogicalStatus.ABSENT, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  stats.set(AttendanceLogicalStatus.IGNORE, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  const statusCounts = new Map<string, number>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  for (const childId of event.children) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const status = event.getAttendance(childId).status;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const countStatus = statusCounts.get(status?.id) ?? 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    statusCounts.set(status?.id, countStatus + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const attendanceType = status?.countAs ?? AttendanceLogicalStatus.IGNORE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const countType = stats.get(attendanceType) ?? 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    stats.set(attendanceType, countType + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  const countedForAverage =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    stats.get(AttendanceLogicalStatus.PRESENT) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    stats.get(AttendanceLogicalStatus.ABSENT);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    average: stats.get(AttendanceLogicalStatus.PRESENT) / countedForAverage,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    counted: countedForAverage,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    excludedUnknown: statusCounts.get(NullAttendanceStatusType.id) ?? 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    statusCounts: statusCounts,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    logicalStatusCounts: stats,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/BackgroundProcessState.html b/documentation/interfaces/BackgroundProcessState.html new file mode 100644 index 0000000000..036c8bf691 --- /dev/null +++ b/documentation/interfaces/BackgroundProcessState.html @@ -0,0 +1,511 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/ui/sync-status/background-process-state.interface.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Describe a task running in the background, such as index creation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + description + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + description: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  additional optional details explaining the process

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + details + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + details: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  specific details or context of the process. +this can serve as a "subtitle" for a common title of several similar processes also

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + error + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + error: any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  if the process has failed, contains the error details; otherwise undefined

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + pending + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + pending: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  whether the process is still running

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + title + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + title: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  unique name of the process as displayed to user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  export interface BackgroundProcessState {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** unique name of the process as displayed to user */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * specific details or context of the process.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * this can serve as a "subtitle" for a common title of several similar processes also
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  details?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** additional optional details explaining the process */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** whether the process is still running */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  pending: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** if the process has failed, contains the error details; otherwise undefined */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  error?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/BasicFilterConfig.html b/documentation/interfaces/BasicFilterConfig.html new file mode 100644 index 0000000000..0cec4f310e --- /dev/null +++ b/documentation/interfaces/BasicFilterConfig.html @@ -0,0 +1,524 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + default + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + default: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + type + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + type: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/BirthdayDashboardConfig.html b/documentation/interfaces/BirthdayDashboardConfig.html new file mode 100644 index 0000000000..a7ba6e85a5 --- /dev/null +++ b/documentation/interfaces/BirthdayDashboardConfig.html @@ -0,0 +1,431 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entities + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + entities: EntityPropertyMap + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : EntityPropertyMap + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + threshold + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + threshold: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +interface BirthdayDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entities: EntityPropertyMap;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  threshold: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("BirthdayDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-birthday-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./birthday-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./birthday-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DatePipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class BirthdayDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  implements BirthdayDashboardConfig, OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static override getRequiredEntities(config: BirthdayDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return config?.entities ? Object.keys(config.entities) : "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private readonly today: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * An object holding the names of entities and properties where they have a `DateOfBirth` attribute.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * E.g. (which is also the default)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * ```json
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * "entities": { "Child": "dateOfBirth" }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() entities: EntityPropertyMap = { ["Child"]: "dateOfBirth" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Birthdays that are less than "threshold" days away are shown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Default 32
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() threshold = 32;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entries: EntityWithBirthday[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(private entityMapper: EntityMapperService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.today = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.today.setHours(0, 0, 0, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const data: EntityWithBirthday[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    for (const [entityType, property] of Object.entries(this.entities)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const entities = await this.entityMapper.loadType(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      data.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ...entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          .filter((entity) => entity.isActive && entity[property])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          .map((entity) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            birthday: this.getNextBirthday(entity[property]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +            newAge: entity[property]?.age + 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          }))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          .filter((a) => this.daysUntil(a.birthday) < this.threshold),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    data.sort(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      (a, b) => this.daysUntil(a.birthday) - this.daysUntil(b.birthday),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entries = data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private getNextBirthday(dateOfBirth: Date): Date {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const birthday = new Date(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.today.getFullYear(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      dateOfBirth.getMonth(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      dateOfBirth.getDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.today.getTime() > birthday.getTime()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      birthday.setFullYear(birthday.getFullYear() + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return birthday;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private daysUntil(date: Date): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const diff = date.getTime() - this.today.getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return Math.floor(diff / (1000 * 60 * 60 * 24));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +interface EntityPropertyMap {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  [key: string]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +interface EntityWithBirthday {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  birthday: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  newAge: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/BooleanFilterConfig.html b/documentation/interfaces/BooleanFilterConfig.html new file mode 100644 index 0000000000..a365d6fc3c --- /dev/null +++ b/documentation/interfaces/BooleanFilterConfig.html @@ -0,0 +1,434 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + BasicFilterConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + false + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + false: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + true + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + true: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/CalculateReportOptions.html b/documentation/interfaces/CalculateReportOptions.html new file mode 100644 index 0000000000..ba5eea5ee3 --- /dev/null +++ b/documentation/interfaces/CalculateReportOptions.html @@ -0,0 +1,460 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/reporting/reporting/select-report/select-report.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + from + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + from: Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + report + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + report: ReportEntity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ReportEntity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + to + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + to: Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { JsonPipe, NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatDatepickerModule } from "@angular/material/datepicker";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ExportDataDirective } from "../../../../core/export/export-data-directive/export-data.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ReportEntity } from "../../report-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-select-report",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./select-report.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./select-report.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDatepickerModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ExportDataDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    JsonPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class SelectReportComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() reports: ReportEntity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() loading: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() exportableData: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() calculateClick = new EventEmitter<CalculateReportOptions>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Output() dataChanged = new EventEmitter<void>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selectedReport: ReportEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  fromDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  toDate: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** whether the currently selected report includes filter parameters for a "from" - "to" date range */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isDateRangeReport: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (changes.hasOwnProperty("reports")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (this.reports?.length === 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.selectedReport = this.reports[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.checkDateRangeReport();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  calculate(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this.isDateRangeReport) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.fromDate = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.toDate = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.calculateClick.emit({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      report: this.selectedReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      from: this.fromDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      to: this.toDate,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  reportChange() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dataChanged.emit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.checkDateRangeReport();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  dateChange() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dataChanged.emit();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private checkDateRangeReport(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.selectedReport.mode !== "sql") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.isDateRangeReport = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.isDateRangeReport =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.selectedReport.neededArgs.indexOf("from") !== -1 ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.selectedReport.neededArgs.indexOf("to") !== -1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +interface CalculateReportOptions {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  report: ReportEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  from: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  to: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ColumnGroupsConfig.html b/documentation/interfaces/ColumnGroupsConfig.html new file mode 100644 index 0000000000..edf3fd75fa --- /dev/null +++ b/documentation/interfaces/ColumnGroupsConfig.html @@ -0,0 +1,493 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + default + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + default: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The name of the group that should be selected by default. +Default is the name of the first group.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + groups + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + groups: GroupConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : GroupConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + mobile + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + mobile: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The name of the group that should be selected by default on a mobile device. +Default is the name of the first group.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ColumnMapping.html b/documentation/interfaces/ColumnMapping.html new file mode 100644 index 0000000000..49ac49a0ef --- /dev/null +++ b/documentation/interfaces/ColumnMapping.html @@ -0,0 +1,410 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/import/column-mapping.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Mapping of a column from an import dataset to define how it should be imported exactly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + additional + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + additional: any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              details of data transformation or parsing into the property.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              e.g. date format to be parsed or key-value transformation map

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + column + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + column: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import data column header id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + propertyName + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + propertyName: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              mapped entity property id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              export interface ColumnMapping {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** import data column header id */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  column: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** mapped entity property id */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  propertyName?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * details of data transformation or parsing into the property.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * e.g. date format to be parsed or key-value transformation map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  additional?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ConfigFieldRaw.html b/documentation/interfaces/ConfigFieldRaw.html new file mode 100644 index 0000000000..8c40bc1b81 --- /dev/null +++ b/documentation/interfaces/ConfigFieldRaw.html @@ -0,0 +1,607 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/config-setup/config-field.raw.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Structure of a row for config setup from imported CSV file. +Represents details of one entity property and is parsed into the app's Config format.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + additional_type_details + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + additional_type_details: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + dataType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + dataType: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + description + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + description: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + remarks + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + remarks: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + show_in_details + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + show_in_details: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + show_in_list + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + show_in_list: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                export interface ConfigFieldRaw {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  id?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  dataType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  additional_type_details?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  show_in_list?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  show_in_details?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  remarks?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ConfigurableEnumFilterConfig.html b/documentation/interfaces/ConfigurableEnumFilterConfig.html new file mode 100644 index 0000000000..4c8a751f8e --- /dev/null +++ b/documentation/interfaces/ConfigurableEnumFilterConfig.html @@ -0,0 +1,395 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + BasicFilterConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + enumId + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + enumId: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ConfigurableEnumValue.html b/documentation/interfaces/ConfigurableEnumValue.html new file mode 100644 index 0000000000..ae34baa438 --- /dev/null +++ b/documentation/interfaces/ConfigurableEnumValue.html @@ -0,0 +1,546 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/basic-datatypes/configurable-enum/configurable-enum.interface.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Mandatory properties of each option of an configurable enum +the actual object can contain additional properties in the specific context of that enum (e.g. a color property)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + HasOrdinal +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + color + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + color: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    an optional color code which should be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    identifier that is unique among all values of the same enum and does not change even when label or other things are edited

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + isInvalidOption + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + isInvalidOption: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    indicates this is a fallback option generated by configurable-enum datatype for +a value that is not included in the selectable enum options of the config.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    human-readable name that is displayed representing the value in the UI

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + style + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + style: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    optional styling class that should be applied when displaying this value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Ordering } from "./configurable-enum-ordering";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import HasOrdinal = Ordering.HasOrdinal;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Interface specifying overall object representing an enum with all its options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * as stored in the config database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export type ConfigurableEnumConfig<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  T extends ConfigurableEnumValue = ConfigurableEnumValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +> = Array<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Mandatory properties of each option of an configurable enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * the actual object can contain additional properties in the specific context of that enum (e.g. a `color` property)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ConfigurableEnumValue extends HasOrdinal {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * identifier that is unique among all values of the same enum and does not change even when label or other things are edited
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * human-readable name that is displayed representing the value in the UI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * an optional color code which should be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  color?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * indicates this is a fallback option generated by configurable-enum datatype for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * a value that is not included in the selectable enum options of the config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  isInvalidOption?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * optional styling class that should be applied when displaying this value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  style?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export const EMPTY: ConfigurableEnumValue = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  id: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label: "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ConfirmationDialogButton.html b/documentation/interfaces/ConfirmationDialogButton.html new file mode 100644 index 0000000000..838c5a446d --- /dev/null +++ b/documentation/interfaces/ConfirmationDialogButton.html @@ -0,0 +1,503 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + click + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +click() +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Returns : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + dialogResult + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + dialogResult: boolean | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean | undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + text + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + text: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DialogCloseComponent } from "../../dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * A configurable confirmation dialog box
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * used by the {@link ConfirmationDialogService}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-confirmation-dialog",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./confirmation-dialog.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class ConfirmationDialogComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This component is used as a template for MatDialog, created with the required dependencies through that service.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param dialogRef The reference to the dialog this component is displayed within
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param data The configuration defining what text and buttons will be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Inject(MAT_DIALOG_DATA) public data: ConfirmationDialogConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Options to configure the {@link ConfirmationDialogComponent}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface ConfirmationDialogConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** title of the dialog box */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** description text in the dialog box */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  text: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** The buttons that should be displayed */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  buttons: ConfirmationDialogButton[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** Whether or not to specify a 'close' icon-button.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This button is on the top-right of the dialog and closes it with no result
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  closeButton?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface ConfirmationDialogButton {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  text: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  dialogResult?: boolean | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  click();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export const OkButton: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    text: $localize`:Confirmation dialog OK:OK`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    click() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // Intentionally blank
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      // To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    dialogResult: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export const YesNoButtons: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    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,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export const YesNoCancelButtons: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    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,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ConfirmationDialogConfig.html b/documentation/interfaces/ConfirmationDialogConfig.html new file mode 100644 index 0000000000..b709d696a5 --- /dev/null +++ b/documentation/interfaces/ConfirmationDialogConfig.html @@ -0,0 +1,554 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/common-components/confirmation-dialog/confirmation-dialog/confirmation-dialog.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Options to configure the ConfirmationDialogComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + buttons + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + buttons: ConfirmationDialogButton[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : ConfirmationDialogButton[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The buttons that should be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + closeButton + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + closeButton: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Whether or not to specify a 'close' icon-button. +This button is on the top-right of the dialog and closes it with no result

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + text + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + text: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        description text in the dialog box

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + title + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + title: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        title of the dialog box

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DialogCloseComponent } from "../../dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * A configurable confirmation dialog box
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * used by the {@link ConfirmationDialogService}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-confirmation-dialog",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./confirmation-dialog.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ConfirmationDialogComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This component is used as a template for MatDialog, created with the required dependencies through that service.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param dialogRef The reference to the dialog this component is displayed within
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data The configuration defining what text and buttons will be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    @Inject(MAT_DIALOG_DATA) public data: ConfirmationDialogConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Options to configure the {@link ConfirmationDialogComponent}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ConfirmationDialogConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** title of the dialog box */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** description text in the dialog box */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  text: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** The buttons that should be displayed */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  buttons: ConfirmationDialogButton[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** Whether or not to specify a 'close' icon-button.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * This button is on the top-right of the dialog and closes it with no result
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  closeButton?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ConfirmationDialogButton {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  text: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  dialogResult?: boolean | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  click();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export const OkButton: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    text: $localize`:Confirmation dialog OK:OK`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    click() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // Intentionally blank
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    dialogResult: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export const YesNoButtons: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    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,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export const YesNoCancelButtons: ConfirmationDialogButton[] = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    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,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ConflictResolutionStrategy.html b/documentation/interfaces/ConflictResolutionStrategy.html new file mode 100644 index 0000000000..a08d7daaa8 --- /dev/null +++ b/documentation/interfaces/ConflictResolutionStrategy.html @@ -0,0 +1,356 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/conflict-resolution/auto-resolution/conflict-resolution-strategy.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Implement this interface to provide custom strategies how certain conflicts of an Entity type can be resolved automatically.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          see ConflictResolutionModule

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Methods +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + autoDeleteConflictingRevision + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +autoDeleteConflictingRevision(currentDoc: any, conflictingDoc: any) +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NameTypeOptional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          currentDoc + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          conflictingDoc + any + + No +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Returns : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { InjectionToken } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Use this token to provide (and thereby register) custom implementations of {@link ConflictResolutionStrategy}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * `{ provide: CONFLICT_RESOLUTION_STRATEGY, useClass: MyConflictResolutionStrategy, multi: true }`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * see {@link ConflictResolutionModule}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export const CONFLICT_RESOLUTION_STRATEGY =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  new InjectionToken<ConflictResolutionStrategy>("ConflictResolutionStrategy");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Implement this interface to provide custom strategies how certain conflicts of an Entity type can be resolved automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * see {@link ConflictResolutionModule}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface ConflictResolutionStrategy {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  autoDeleteConflictingRevision(currentDoc: any, conflictingDoc: any): boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/Coordinates.html b/documentation/interfaces/Coordinates.html new file mode 100644 index 0000000000..13b66236ce --- /dev/null +++ b/documentation/interfaces/Coordinates.html @@ -0,0 +1,323 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/location/coordinates.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + lat + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + lat: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + lon + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + lon: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            export interface Coordinates {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  lat: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  lon: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DashboardConfig.html b/documentation/interfaces/DashboardConfig.html new file mode 100644 index 0000000000..94df1615cf --- /dev/null +++ b/documentation/interfaces/DashboardConfig.html @@ -0,0 +1,368 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/dashboard/dashboard/dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + widgets + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + widgets: DynamicComponentConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : DynamicComponentConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponentConfig } from "../../config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgFor } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityAbility } from "../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ComponentRegistry } from "../../../dynamic-components";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DashboardWidget } from "../dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { SessionSubject } from "../../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@RouteTarget("Dashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  template: ` <ng-template
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    *ngFor="let widgetConfig of _widgets"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    [appDynamicComponent]="widgetConfig"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ></ng-template>`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [NgFor, DynamicComponentDirective],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class DashboardComponent implements DashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() set widgets(widgets: DynamicComponentConfig[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.filterPermittedWidgets(widgets).then((res) => (this._widgets = res));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  get widgets(): DynamicComponentConfig[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this._widgets;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  _widgets: DynamicComponentConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private components: ComponentRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private session: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async filterPermittedWidgets(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    widgets: DynamicComponentConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): Promise<DynamicComponentConfig[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const permittedWidgets: DynamicComponentConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const widget of widgets) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.hasRequiredRole(widget) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        (await this.hasEntityPermission(widget))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        permittedWidgets.push(widget);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return permittedWidgets;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private hasRequiredRole(widget: DynamicComponentConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (widget.permittedUserRoles?.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const userRoles = this.session.value.roles;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const requiredRoles = widget.permittedUserRoles;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return requiredRoles.some((role) => userRoles.includes(role));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async hasEntityPermission(widget: DynamicComponentConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const comp = (await this.components.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      widget.component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    )()) as unknown as typeof DashboardWidget;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let entity: string | string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (typeof comp.getRequiredEntities === "function") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      entity = comp.getRequiredEntities(widget.config);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.userHasAccess(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private userHasAccess(entity: string | string[]): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (Array.isArray(entity)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return entity.some((e) => this.ability.can("read", e));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        return this.ability.can("read", entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // No entity relation -> show widget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface DashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  widgets: DynamicComponentConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DatabaseRules.html b/documentation/interfaces/DatabaseRules.html new file mode 100644 index 0000000000..adf9edf46f --- /dev/null +++ b/documentation/interfaces/DatabaseRules.html @@ -0,0 +1,403 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/permissions/permission-types.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The format of the JSON object which defines the rules for each role. +The format is <user-role>: <array of DatabaseRule>, meaning for each role an array of rules can be defined. +The rules defined in 'default' will be prepended to any other rules defined for a user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Indexable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + [key: string]: DatabaseRule[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + default + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + default: DatabaseRule[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : DatabaseRule[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + public + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + public: DatabaseRule[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : DatabaseRule[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Ability, RawRuleOf } from "@casl/ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The list of action strings that can be used for permissions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +const actions = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  "read",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  "create",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  "update",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  "delete",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  "manage", // Matches any actions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +] as const;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The type which defines which actions can be used for permissions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The type allows all strings defined in the `actions` array.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * E.g. "read" or "manage"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export type EntityActionPermission = (typeof actions)[number];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The type which defines which subjects can be used for permissions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * This matches any entity classes, entity objects and the wildcard string "all"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * E.g. `Child`, `new Note()` or `all`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export type EntitySubject = EntityConstructor | Entity | string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The format that the JSON defined rules need to have.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * In the JSON object the Entities can be specified by using their ENTITY_TYPE string representation.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export type DatabaseRule = RawRuleOf<Ability<[EntityActionPermission, string]>>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The format of the JSON object which defines the rules for each role.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The format is `<user-role>: <array of DatabaseRule>`, meaning for each role an array of rules can be defined.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The rules defined in 'default' will be prepended to any other rules defined for a user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface DatabaseRules {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  public?: DatabaseRule[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  default?: DatabaseRule[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  [key: string]: DatabaseRule[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DateRangeFilterConfig.html b/documentation/interfaces/DateRangeFilterConfig.html new file mode 100644 index 0000000000..40d4271237 --- /dev/null +++ b/documentation/interfaces/DateRangeFilterConfig.html @@ -0,0 +1,395 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + BasicFilterConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + options + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + options: DateRangeFilterConfigOption[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : DateRangeFilterConfigOption[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DateRangeFilterConfigOption.html b/documentation/interfaces/DateRangeFilterConfigOption.html new file mode 100644 index 0000000000..abd4470538 --- /dev/null +++ b/documentation/interfaces/DateRangeFilterConfigOption.html @@ -0,0 +1,479 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + endOffsets + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + endOffsets: literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + startOffsets + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + startOffsets: literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : literal type[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DefaultValueConfig.html b/documentation/interfaces/DefaultValueConfig.html new file mode 100644 index 0000000000..fe9ad8b4ff --- /dev/null +++ b/documentation/interfaces/DefaultValueConfig.html @@ -0,0 +1,479 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/entity/schema/default-value-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Describes the default value behaviour of this field, +i.e. that this field should automatically be filled with a value when creating a new entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + field + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + field: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      field on the referenced Entity (identified by the id value in localAttribute), which is used as default value (for inherited only)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + localAttribute + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + localAttribute: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      local field holding the reference to an Entity (for inherited only)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + mode + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + mode: DefaultValueMode + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : DefaultValueMode + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      What kind of logic is used to generate the default value:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mode: inherited + use the value from linked entity field

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mode: static + use a static default value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mode: dynamic + use a placeholder value, see PLACEHOLDERS enum for available options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + value + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + value: string | number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string | number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      used as default value in "static" and "dynamic" mode

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      export interface DefaultValueConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * What kind of logic is used to generate the default value:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  mode: inherited
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  use the value from linked entity field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  mode: static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  use a static default value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  mode: dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *  use a placeholder value, see PLACEHOLDERS enum for available options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  mode: DefaultValueMode;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** used as default value in "static" and "dynamic" mode */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  value?: string | number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** local field holding the reference to an Entity (for inherited only) */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  localAttribute?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** field on the referenced Entity (identified by the id value in `localAttribute`), which is used as default value (for inherited only) */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  field?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export type DefaultValueMode = "inherited" | "static" | "dynamic";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DetailsComponentData.html b/documentation/interfaces/DetailsComponentData.html new file mode 100644 index 0000000000..272379e6dd --- /dev/null +++ b/documentation/interfaces/DetailsComponentData.html @@ -0,0 +1,492 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/form-dialog/row-details/row-details.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Data interface that must be given when opening the dialog

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + columns + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + columns: FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The columns to edit / view

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + entity: Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The row to edit / view

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + viewOnlyColumns + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + viewOnlyColumns: FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : FormFieldConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Additional columns that only provide context information

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormFieldConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "../../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DialogCloseComponent } from "../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityFormComponent } from "../../common-components/entity-form/entity-form/entity-form.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { PillComponent } from "../../common-components/pill/pill.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DialogButtonsComponent } from "../dialog-buttons/dialog-buttons.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityArchivedInfoComponent } from "../../entity-details/entity-archived-info/entity-archived-info.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FieldGroup } from "../../entity-details/form/field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityFieldEditComponent } from "../../common-components/entity-field-edit/entity-field-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityFieldViewComponent } from "../../common-components/entity-field-view/entity-field-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Data interface that must be given when opening the dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface DetailsComponentData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** The row to edit / view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** The columns to edit / view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  columns: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** Additional columns that only provide context information */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  viewOnlyColumns?: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Displays a single row of a table as a dialog component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-row-details",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./row-details.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityFormComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    PillComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    DialogButtonsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityArchivedInfoComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityFieldEditComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityFieldViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  viewProviders: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    { provide: ViewComponentContext, useValue: new ViewComponentContext(true) },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class RowDetailsComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  form: EntityForm<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  viewOnlyColumns: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  tempEntity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    @Inject(MAT_DIALOG_DATA) public data: DetailsComponentData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private formService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.init(this.data)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .then()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .catch((reason) => console.log(reason));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private async init(data: DetailsComponentData) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form = await this.formService.createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data.columns,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      data.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.enableSaveWithoutChangesIfNew(data.entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.fieldGroups = data.columns.map((col) => ({ fields: [col] }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.tempEntity = this.data.entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.form.formGroup.valueChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .subscribe((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const dynamicConstructor: any = data.entity.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.tempEntity = Object.assign(new dynamicConstructor(), value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.viewOnlyColumns = data.viewOnlyColumns;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private enableSaveWithoutChangesIfNew(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (entity.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      // could check here that at least some fields hold a value but the naive heuristic to allow save of all new seems ok
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.form.formGroup.markAsDirty();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DialogViewData.html b/documentation/interfaces/DialogViewData.html new file mode 100644 index 0000000000..0b21f8eb1d --- /dev/null +++ b/documentation/interfaces/DialogViewData.html @@ -0,0 +1,463 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/ui/dialog-view/dialog-view.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + component + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + component: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + config + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + config: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + entity: Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (Optional) if an EntityDetails view, the full entity record to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Component, Inject, Injector } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponentDirective } from "../../config/dynamic-components/dynamic-component.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogActions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogClose,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogContent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogTitle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityConfigService } from "../../entity/entity-config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ViewTitleComponent } from "../../common-components/view-title/view-title.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DialogCloseComponent } from "../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { CdkPortalOutlet } from "@angular/cdk/portal";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponentPipe } from "../../config/dynamic-components/dynamic-component.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AbstractViewComponent } from "../abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Wrapper component for a modal/dialog view
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * that takes parameters from the dialog data and passes these on to normal @Input properties.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This allows to develop functional feature components in a way to easily reuse them for display
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * as a full page view or in a modal dialog.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * (also see RoutedViewComponent)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DynamicComponentDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ViewTitleComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDialogClose,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    CdkPortalOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DynamicComponentPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDialogTitle,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDialogContent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDialogActions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./dialog-view.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: ["./dialog-view.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class DialogViewComponent<T = any> extends AbstractViewComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  component: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  config: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    dialogData: DialogViewData<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityConfigService: EntityConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    injector: Injector,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super(injector, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.component = dialogData.component;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let viewConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (dialogData.entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      viewConfig =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.entityConfigService.getDetailsViewConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          dialogData.entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        )?.config ?? {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (dialogData.entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      viewConfig["entity"] = dialogData.entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.config = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ...viewConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ...dialogData.config,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  declare componentInjector: Injector | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface DialogViewData<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  component: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  config?: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * (Optional) if an EntityDetails view, the full entity record to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entity?: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/DynamicComponentConfig.html b/documentation/interfaces/DynamicComponentConfig.html new file mode 100644 index 0000000000..d388fb092e --- /dev/null +++ b/documentation/interfaces/DynamicComponentConfig.html @@ -0,0 +1,434 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/config/dynamic-components/dynamic-component-config.interface.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This interface is set on the data property of the route. +It contains static data which are used to build components and manage permissions. +The generic type defines the interface for the component specific configuration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The properties given in the config object here are automatically assigned to the component as @Input() properties. +e.g. for an DynamicComponentConfig { config: { "entityType: "Child", "filtered": true } } +your component MyViewComponent will receive the values mapped to its properties:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +Example :
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            class MyViewComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() filtered: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + component + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + component: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            string id/name of the component to be displaying this view. +The component id has to be registered in the component map.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (optional) if the ladyLoaded is true, this is not required (and will be ignored) + This allows hard-coded lazy-loaded components to be dynamically extended with config or permissions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + config + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + config: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            optional object providing any kind of config to be interpreted by the component for this view

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + permittedUserRoles + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + permittedUserRoles: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Allows to restrict the route to the given list of user roles. +If set, the route can only be visited by users which have a role which is in the list. +If not set, all logged-in users can visit the route.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            export interface DynamicComponentConfig<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * string id/name of the component to be displaying this view.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The component id has to be registered in the component map.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * (optional) if the `ladyLoaded` is true, this is not required (and will be ignored)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *    This allows hard-coded lazy-loaded components to be dynamically extended with config or permissions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  component?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** optional object providing any kind of config to be interpreted by the component for this view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  config?: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Allows to restrict the route to the given list of user roles.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If set, the route can only be visited by users which have a role which is in the list.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If not set, all logged-in users can visit the route.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  permittedUserRoles?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EditProgressDashboardComponentData.html b/documentation/interfaces/EditProgressDashboardComponentData.html new file mode 100644 index 0000000000..5c668979ba --- /dev/null +++ b/documentation/interfaces/EditProgressDashboardComponentData.html @@ -0,0 +1,441 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/dashboard-widgets/progress-dashboard-widget/edit-progress-dashboard/edit-progress-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + parts + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + parts: ProgressDashboardPart[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : ProgressDashboardPart[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + title + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + title: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Inject, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ProgressDashboardConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ProgressDashboardPart,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "../progress-dashboard/progress-dashboard-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormArray,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  FormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ValidationErrors,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  Validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ErrorStateMatcher } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DialogCloseComponent } from "../../../../core/common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { TypedFormGroup } from "../../../../core/common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface EditProgressDashboardComponentData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  parts: ProgressDashboardPart[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-edit-progress-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./edit-progress-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./edit-progress-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class EditProgressDashboardComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * This marks the control as invalid when the whole form has an error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  readonly currentErrorStateMatcher: ErrorStateMatcher = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    isErrorState: (control: FormControl | null) => !control?.parent?.valid,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  title: FormControl;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  parts: FormArray;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  outputData: FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    @Inject(MAT_DIALOG_DATA) private data: ProgressDashboardConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.title = new FormControl(this.data.title, [Validators.required]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.parts = this.fb.array(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.data.parts.map((part) => this.createPartForm(part)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.outputData = new FormGroup({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      title: this.title,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      parts: this.parts,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  createPartForm(part: ProgressDashboardPart) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.fb.group(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        label: this.fb.control(part.label, [Validators.required]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        currentValue: this.fb.control(part.currentValue, [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.required,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.min(0),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        targetValue: this.fb.control(part.targetValue, [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.required,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Validators.min(0),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        validators: [this.currentLessThanTarget],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  currentLessThanTarget(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    control: TypedFormGroup<ProgressDashboardPart>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): ValidationErrors | null {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const current = control.get("currentValue");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const target = control.get("targetValue");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (current.value > target.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        currentGtTarget: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      return null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  addPart() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const newPart: ProgressDashboardPart = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      label: $localize`:Part of a whole:Part`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      currentValue: 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      targetValue: 10,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.parts.push(this.createPartForm(newPart));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  removePart(index: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.parts.removeAt(index);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EmptyDefaultValueHint.html b/documentation/interfaces/EmptyDefaultValueHint.html new file mode 100644 index 0000000000..1ab0d0e4e5 --- /dev/null +++ b/documentation/interfaces/EmptyDefaultValueHint.html @@ -0,0 +1,628 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/default-values/default-value.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Reduced "DefaultValueHint" if no referenced parent entity is selected but a rule to inherit values is configured.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + inheritedFromField + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + inheritedFromField: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + inheritedFromType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + inheritedFromType: undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + isEmpty + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + isEmpty: + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + isInSync + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + isInSync: undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + syncFromParentField + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + syncFromParentField: undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : undefined + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityForm } from "../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchema } from "../entity/schema/entity-schema";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DefaultValueConfig } from "../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AbstractControl } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchemaField } from "../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DynamicPlaceholderValueService } from "./dynamic-placeholder-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { InheritedValueService } from "./inherited-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Handle default values like the current date or user for forms when editing an Entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class DefaultValueService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private dynamicPlaceholderValueService: DynamicPlaceholderValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private inheritedValueService: InheritedValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async handleEntityForm<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!(form.defaultValueConfigs?.size > 0)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const entitySchema: EntitySchema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    await this.inheritedValueService.initEntityForm(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.enableChangeListener(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const [key, entitySchemaField] of entitySchema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      let targetFormControl = form.formGroup.get(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        !this.preConditionsFulfilled(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          entity.isNew,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      switch (entitySchemaField.defaultValue?.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        case "static":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.handleStaticMode(targetFormControl, entitySchemaField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        case "dynamic":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.dynamicPlaceholderValueService.setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        case "inherited":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.inheritedValueService.setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private preConditionsFulfilled(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    isNew: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    formControl: AbstractControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!formControl) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!fieldConfig.isArray && !!formControl.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      fieldConfig.isArray &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      formControl.value &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      formControl.value.length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private enableChangeListener<T extends Entity>(form: EntityForm<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    form.watcher.set(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      "formGroupValueChanges",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      form.formGroup.valueChanges.subscribe(async (change) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.inheritedValueService.onFormValueChanges(form),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private handleStaticMode(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    targetFormControl: AbstractControl<any, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (fieldConfig.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      targetFormControl.setValue([fieldConfig.defaultValue.value]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      targetFormControl.setValue(fieldConfig.defaultValue.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  getDefaultValueUiHint<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    fieldId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): DefaultValueHint | EmptyDefaultValueHint | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!form) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const mode = form?.defaultValueConfigs?.get(fieldId)?.mode;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (mode === "inherited") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return this.inheritedValueService.getDefaultValueUiHint(form, fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  static getDefaultValueConfigs<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ): Map<string, DefaultValueConfig> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let schema: EntitySchema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const defaultValueConfigs: Map<string, DefaultValueConfig> = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    for (const [key, entitySchemaField] of schema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (entitySchemaField.defaultValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        defaultValueConfigs.set(key, entitySchemaField.defaultValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return defaultValueConfigs;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export type DefaultValueHint = FullDefaultValueHint | EmptyDefaultValueHint;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Details of the source for an "inherited" default value in a field,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * used to display context to the user about this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface FullDefaultValueHint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isInSync: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  inheritedFromType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  inheritedFromField: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  syncFromParentField: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isEmpty?: undefined | false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Reduced "DefaultValueHint" if no referenced parent entity is selected but a rule to inherit values is configured.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface EmptyDefaultValueHint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  inheritedFromField: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isEmpty: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isInSync?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  inheritedFromType?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  syncFromParentField?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityAction.html b/documentation/interfaces/EntityAction.html new file mode 100644 index 0000000000..73cf8adcad --- /dev/null +++ b/documentation/interfaces/EntityAction.html @@ -0,0 +1,604 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-details/entity-actions-menu/entity-action.interface.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Details of an action that users can trigger for a specific entity, displayed in the context menu.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + action + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + action: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ID for identifying this action in analytics, etc.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + execute + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + execute: function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The method being executed when the action is triggered.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + icon + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + icon: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  human-readable label displayed in menu

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + permission + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + permission: EntityActionPermission + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : EntityActionPermission + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The "operation" for Entity Permissions checks that the user needs permission for executing this action.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + primaryAction + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + primaryAction: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If marked as primary action, it will be displayed directly rather than hidden in the three-dot menu in some contexts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + tooltip + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + tooltip: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityActionPermission } from "../../permissions/permission-types";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Details of an action that users can trigger for a specific entity, displayed in the context menu.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface EntityAction {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * ID for identifying this action in analytics, etc.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  action: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * human-readable label displayed in menu
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  icon: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  tooltip?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If marked as primary action, it will be displayed directly rather than hidden in the three-dot menu in some contexts.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  primaryAction?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The "operation" for Entity Permissions checks that the user needs permission for executing this action.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  permission?: EntityActionPermission;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The method being executed when the action is triggered.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param e The entity on which the action is executed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  execute: (entity: Entity, navigateOnDelete?: boolean) => Promise<boolean>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityConfig.html b/documentation/interfaces/EntityConfig.html new file mode 100644 index 0000000000..a31e208c63 --- /dev/null +++ b/documentation/interfaces/EntityConfig.html @@ -0,0 +1,765 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity/entity-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Dynamic configuration for a entity. +This allows to change entity metadata based on the configuration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + attributes + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + attributes: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    A list of attributes that will be dynamically added/overwritten to the entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + color + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + color: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    color used for to highlight this entity type across the app

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + extends + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + extends: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    when a new entity is created, all properties from this class will also be available

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + hasPII + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + hasPII: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    whether the type can contain personally identifiable information (PII)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + icon + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + icon: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    icon used to visualize the entity type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    human-readable name/label of the entity in the UI

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + labelPlural + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + labelPlural: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    human-readable name/label of the entity in the UI when referring to multiple

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + route + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + route: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    base route of views for this entity type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + toStringAttributes + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + toStringAttributes: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    A list of attributes which should be shown when calling the .toString() method of this entity. +E.g. showing the first and last name of a child.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (optional) the default is the ID of the entity (.entityId)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { EntitySchemaField } from "./schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Dynamic configuration for a entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This allows to change entity metadata based on the configuration.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface EntityConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * A list of attributes that will be dynamically added/overwritten to the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  attributes?: { [key: string]: EntitySchemaField };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * A list of attributes which should be shown when calling the `.toString()` method of this entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * E.g. showing the first and last name of a child.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * (optional) the default is the ID of the entity (`.entityId`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  toStringAttributes?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * human-readable name/label of the entity in the UI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * human-readable name/label of the entity in the UI when referring to multiple
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  labelPlural?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * icon used to visualize the entity type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  icon?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * color used for to highlight this entity type across the app
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  color?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * base route of views for this entity type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  route?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * when a new entity is created, all properties from this class will also be available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  extends?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * whether the type can contain personally identifiable information (PII)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  hasPII?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityCountDashboardConfig.html b/documentation/interfaces/EntityCountDashboardConfig.html new file mode 100644 index 0000000000..12929b2230 --- /dev/null +++ b/documentation/interfaces/EntityCountDashboardConfig.html @@ -0,0 +1,474 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + entity: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + groupBy + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + groupBy: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ConfigurableEnumValue } from "../../../../core/basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { IconName } from "@fortawesome/fontawesome-svg-core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { groupBy } from "../../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityDatatype } from "../../../../core/basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +interface EntityCountDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entity?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  groupBy?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("ChildrenCountDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("EntityCountDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-entity-count-dashboard-widget",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./entity-count-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./entity-count-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class EntityCountDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  implements EntityCountDashboardConfig, OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  static override getRequiredEntities(config: EntityCountDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return config?.entity || "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Entity name which should be grouped
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() set entityType(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this._entity = this.entities.get(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private _entity: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The property of the Child entities to group counts by.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Default is "center".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() groupBy = "center";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * if the groupBy field is an entity reference this holds the related entity type,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * so that the entity block will be displayed instead of an id string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * otherwise undefined, to display simply the group label.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  groupedByEntity: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  totalEntities: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entityGroupCounts: { label: string; value: number; id: string }[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entityIcon: IconName;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (!this._entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.entityType = "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const groupByType = this._entity.schema.get(this.groupBy);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.groupedByEntity =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      groupByType.dataType === EntityDatatype.dataType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ? groupByType.additional
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        : undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const entities = await this.entityMapper.loadType(this._entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.updateCounts(entities.filter((e) => e.isActive));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.label = this._entity.labelPlural;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entityIcon = this._entity.icon;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  goToChildrenList(filterId: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const params = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    params[this.groupBy] = filterId;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.router.navigate([this._entity.route], { queryParams: params });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private updateCounts(entities: Entity[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.totalEntities = entities.length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const groups = groupBy(entities, this.groupBy as keyof Entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entityGroupCounts = groups.map(([group, entities]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      const label = extractHumanReadableLabel(group);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        label: label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        value: entities.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        id: group?.["id"] || label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Get a human-readable string from the given value as a label.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +function extractHumanReadableLabel(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  value: string | ConfigurableEnumValue | any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  if (value === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  if (typeof value === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  if (value?.label) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return value.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  return String(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityDetailsConfig.html b/documentation/interfaces/EntityDetailsConfig.html new file mode 100644 index 0000000000..bdfb109b6c --- /dev/null +++ b/documentation/interfaces/EntityDetailsConfig.html @@ -0,0 +1,414 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/entity-details/EntityDetailsConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The configuration for an entity details page

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + entityType: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The name of the entity (according to the ENTITY_TYPE).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + panels + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + panels: Panel[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Panel[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The configuration for the panels on this details page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * The configuration for an entity details page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface EntityDetailsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The name of the entity (according to the ENTITY_TYPE).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The configuration for the panels on this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  panels: Panel[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * A panel is a simple accordion that can be expanded and closed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * It can hold multiple components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface Panel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The title of this panel. This should group the contained components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The configurations for the components in this panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  components: PanelComponent[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * The configuration for a component displayed inside a panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface PanelComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * An optional second title for only this component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The name of the component. When registered, this usually is the name of the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * component without the `component` suffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  component: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * An addition config which will be passed to the component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  config?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This interface represents the config which will be created by the entity-details component and passed to each of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * the panel components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This is not config that is defined and stored in the config file for customization.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface PanelConfig<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The full entity which is displayed in this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Whether this entity has been newly created.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  creatingNew?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * An additional config which has been defined in the PanelComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  config?: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityForm.html b/documentation/interfaces/EntityForm.html new file mode 100644 index 0000000000..eea24a372a --- /dev/null +++ b/documentation/interfaces/EntityForm.html @@ -0,0 +1,772 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/common-components/entity-form/entity-form.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + defaultValueConfigs + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + defaultValueConfigs: Map<string | DefaultValueConfig> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Map<string | DefaultValueConfig> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          map of field ids to the default value configuration for that field

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + entity: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + formGroup + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + formGroup: EntityFormGroup<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EntityFormGroup<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + inheritedParentValues + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + inheritedParentValues: Map<string | any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Map<string | any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          map of field ids to the current value to be inherited from the referenced parent entities' field

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + watcher + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + watcher: Map<string | Subscription> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Map<string | Subscription> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormControlOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ɵElement,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ColumnConfig, FormFieldConfig, toFormFieldConfig } from "./FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityMapperService } from "../../entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicValidatorsService } from "./dynamic-form-validators/dynamic-validators.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityAbility } from "../../permissions/ability/entity-ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { InvalidFormFieldError } from "./invalid-form-field.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { UnsavedChangesService } from "../../entity-details/form/unsaved-changes.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ActivationStart, Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Subscription } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DefaultValueService } from "../../default-values/default-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DefaultValueConfig } from "../../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * These are utility types that allow to define the type of `FormGroup` the way it is returned by `EntityFormService.create`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export type TypedFormGroup<T> = FormGroup<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  [K in keyof T]: ɵElement<T[K], null>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export type EntityFormGroup<T extends Entity> = TypedFormGroup<Partial<T>>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface EntityForm<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  formGroup: EntityFormGroup<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entity: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * map of field ids to the default value configuration for that field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  defaultValueConfigs: Map<string, DefaultValueConfig>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * map of field ids to the current value to be inherited from the referenced parent entities' field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  inheritedParentValues: Map<string, any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  watcher: Map<string, Subscription>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This service provides helper functions for creating tables or forms for an entity as well as saving
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * new changes correctly to the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({ providedIn: "root" })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class EntityFormService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private subscriptions: Subscription[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entitySchemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private dynamicValidator: DynamicValidatorsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private ability: EntityAbility,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private unsavedChanges: UnsavedChangesService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private defaultValueService: DefaultValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    router.events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(filter((e) => e instanceof ActivationStart))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // Clean up everything once navigation happens
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.subscriptions.forEach((sub) => sub.unsubscribe());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.subscriptions = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Uses schema information to fill missing fields in the FormFieldConfig.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param formField
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param forTable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  public extendFormFieldConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formField: ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entityType: EntityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    forTable = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): FormFieldConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const fullField = toFormFieldConfig(formField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return this.addSchemaToFormField(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        fullField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        entityType.schema.get(fullField.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        forTable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      throw new Error(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        `Could not create form config for ${fullField.id}: ${err}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private addSchemaToFormField(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formField: FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    propertySchema: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    forTable: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): FormFieldConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // formField config has precedence over schema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const fullField = Object.assign({}, propertySchema, formField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    fullField.editComponent =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fullField.editComponent ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entitySchemaService.getComponent(propertySchema, "edit");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    fullField.viewComponent =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fullField.viewComponent ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entitySchemaService.getComponent(propertySchema, "view");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (forTable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fullField.forTable = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fullField.label =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        fullField.label || fullField.labelShort || fullField.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      delete fullField.description;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fullField.forTable = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fullField.label =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        fullField.label || fullField.label || fullField.labelShort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return fullField;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Creates a form with the formFields and the existing values from the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Missing fields in the formFields are filled with schema information.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param formFields
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param forTable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param withPermissionCheck if true, fields without 'update' permissions will stay disabled when enabling form
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  public async createEntityForm<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formFields: ColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    forTable = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    withPermissionCheck = true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<EntityForm<T>> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const typedFormGroup: TypedFormGroup<Partial<T>> = this.createFormGroup(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      formFields,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      forTable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      withPermissionCheck,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const defaultValueConfigs =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      DefaultValueService.getDefaultValueConfigs(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const entityForm: EntityForm<T> = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      formGroup: typedFormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      defaultValueConfigs: defaultValueConfigs,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      inheritedParentValues: new Map(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      watcher: new Map(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await this.defaultValueService.handleEntityForm(entityForm, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return entityForm;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private createFormGroup<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formFields: ColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    forTable = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    withPermissionCheck = true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): EntityFormGroup<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const formConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const copy = entity.copy();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formFields = formFields.filter((f) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entity.getSchema().has(toFormFieldConfig(f).id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const f of formFields) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.addFormControlConfig(formConfig, f, copy, forTable);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const group = this.fb.group<Partial<T>>(formConfig);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const valueChangesSubscription = group.valueChanges.subscribe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      () => (this.unsavedChanges.pending = group.dirty),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.subscriptions.push(valueChangesSubscription);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (withPermissionCheck) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.disableReadOnlyFormControls(group, entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const statusChangesSubscription = group.statusChanges
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .pipe(filter((status) => status !== "DISABLED"))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .subscribe(() => this.disableReadOnlyFormControls(group, entity));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.subscriptions.push(statusChangesSubscription);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return group;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Add a property with form control initialization config to the given formConfig object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param formConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param fieldConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param forTable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private addFormControlConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formConfig: { [key: string]: FormControl },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    fieldConfig: ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    forTable: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const field = this.extendFormFieldConfig(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      forTable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let value = entity[field.id];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const controlOptions: FormControlOptions = { nonNullable: true };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (field.validators) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const validators = this.dynamicValidator.buildValidators(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        field.validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      Object.assign(controlOptions, validators);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formConfig[field.id] = new FormControl(value, controlOptions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private disableReadOnlyFormControls<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form: EntityFormGroup<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const action = entity.isNew ? "create" : "update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    Object.keys(form.controls).forEach((fieldId) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (this.ability.cannot(action, entity, fieldId)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        form.get(fieldId).disable({ onlySelf: true, emitEvent: false });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * This function applies the changes of the formGroup to the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * If the form is invalid or the entity does not pass validation after applying the changes, an error will be thrown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The input entity will not be modified but a copy of it will be returned in case of success.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param form The formGroup holding the changes (marked pristine and disabled after successful save)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param entity The entity on which the changes should be applied.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @returns a copy of the input entity with the changes from the form group
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  public async saveChanges<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form: EntityFormGroup<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.checkFormValidity(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const updatedEntity = entity.copy() as T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const [key, value] of Object.entries(form.getRawValue())) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (value !== null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        updatedEntity[key] = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    updatedEntity.assertValid();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.assertPermissionsToSave(entity, updatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      await this.entityMapper.save(updatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      throw new Error($localize`Could not save ${entity.getType()}\: ${err}`);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form.markAsPristine();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return Object.assign(entity, updatedEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private checkFormValidity<T extends Entity>(form: EntityFormGroup<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // errors regarding invalid fields won't be displayed unless marked as touched
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form.markAllAsTouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (form.invalid) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      throw new InvalidFormFieldError();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private assertPermissionsToSave(oldEntity: Entity, newEntity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let action: "create" | "update", entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (oldEntity.isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      action = "create";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entity = newEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      action = "update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entity = oldEntity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!this.ability.can(action, entity, undefined, true)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const conditions = this.ability
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .rulesFor(action, entity.getType())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .map((r) => r.conditions);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      throw new Error(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        $localize`Current user is not permitted to save these changes: ${JSON.stringify(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          conditions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        )}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  resetForm<E extends Entity>(form: EntityFormGroup<E>, entity: E) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const key of Object.keys(form.controls)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      form.get(key).setValue(entity[key]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form.markAsPristine();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.unsavedChanges.pending = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityListConfig.html b/documentation/interfaces/EntityListConfig.html new file mode 100644 index 0000000000..3dd6689dc3 --- /dev/null +++ b/documentation/interfaces/EntityListConfig.html @@ -0,0 +1,713 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + columnGroups + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + columnGroups: ColumnGroupsConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ColumnGroupsConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Optional config for which columns are displayed. +By default, all columns are shown

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + columns + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + columns: (FormFieldConfig | string)[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : (FormFieldConfig | string)[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Custom overwrites or additional columns to be displayed in the table.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            If any special columns aside from the entity's fields are needed, add them here. +Fields of the entity type are available automatically.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + defaultSort + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + defaultSort: Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Sort + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Optional initial sort order. +Default is to sort by the first column.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + entityType: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Select which entities should be displayed in the table +(optional) This is only used and necessary if EntityListComponent is used directly in config

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + exportConfig + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + exportConfig: ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Optional config defining what fields are included in exports.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + filters + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + filters: FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Optional config for available filters. +Default is no filters.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + title + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + title: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Title that is shown on top of the component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityPropertyMap.html b/documentation/interfaces/EntityPropertyMap.html new file mode 100644 index 0000000000..963b486fe7 --- /dev/null +++ b/documentation/interfaces/EntityPropertyMap.html @@ -0,0 +1,350 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Indexable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + [key: string]: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +interface BirthdayDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entities: EntityPropertyMap;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  threshold: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@DynamicComponent("BirthdayDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-birthday-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./birthday-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  styleUrls: ["./birthday-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    DatePipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class BirthdayDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  implements BirthdayDashboardConfig, OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static override getRequiredEntities(config: BirthdayDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return config?.entities ? Object.keys(config.entities) : "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private readonly today: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * An object holding the names of entities and properties where they have a `DateOfBirth` attribute.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * E.g. (which is also the default)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * ```json
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * "entities": { "Child": "dateOfBirth" }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() entities: EntityPropertyMap = { ["Child"]: "dateOfBirth" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Birthdays that are less than "threshold" days away are shown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Default 32
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() threshold = 32;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entries: EntityWithBirthday[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(private entityMapper: EntityMapperService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.today = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.today.setHours(0, 0, 0, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const data: EntityWithBirthday[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    for (const [entityType, property] of Object.entries(this.entities)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const entities = await this.entityMapper.loadType(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      data.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ...entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          .filter((entity) => entity.isActive && entity[property])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          .map((entity) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            birthday: this.getNextBirthday(entity[property]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            newAge: entity[property]?.age + 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          }))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          .filter((a) => this.daysUntil(a.birthday) < this.threshold),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    data.sort(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      (a, b) => this.daysUntil(a.birthday) - this.daysUntil(b.birthday),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.entries = data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private getNextBirthday(dateOfBirth: Date): Date {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const birthday = new Date(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.today.getFullYear(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      dateOfBirth.getMonth(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      dateOfBirth.getDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.today.getTime() > birthday.getTime()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      birthday.setFullYear(birthday.getFullYear() + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return birthday;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private daysUntil(date: Date): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const diff = date.getTime() - this.today.getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return Math.floor(diff / (1000 * 60 * 60 * 24));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +interface EntityPropertyMap {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  [key: string]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +interface EntityWithBirthday {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  birthday: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  newAge: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntitySchemaField.html b/documentation/interfaces/EntitySchemaField.html new file mode 100644 index 0000000000..64fbc22e5b --- /dev/null +++ b/documentation/interfaces/EntitySchemaField.html @@ -0,0 +1,1149 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/entity/schema/entity-schema-field.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Interface for additional configuration about a DatabaseField schema.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This is used as parameter for the DatabaseField annotation:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @DatabaseField(fieldConfig: EntitySchemaField)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + additional + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + additional: any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) Assign any custom "extension" configuration you need for a specific datatype extension.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                You can pass any kind of value here to allow complex custom datatype transformations +that are not part of the core datatypes and therefore not included in this core interface.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + anonymize + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + anonymize: "retain" | "retain-anonymized" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : "retain" | "retain-anonymized" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                whether the field will be retained when the entity is "anonymized".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                By default, fields are removed (data minimization by default).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                "retain-anonymized" triggers a special dataType action to retain the data partially in a special, anonymized form.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + dataType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + dataType: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The datatype of this field. This will trigger to matching datatype transformer when saving/loading the entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If you don't set this explicitly, the dataType is inferred from the TypeScript type of the property that is annotated.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + defaultValue + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + defaultValue: DefaultValueConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : DefaultValueConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Configure the default value mode of this field. +Default values are applied to form fields, if field is empty +The form will be disabled, until all default value configs are applied

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + description + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + description: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A further description of the property which can be displayed in tooltips.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + editComponent + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + editComponent: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) Define using which component this property should be editable in lists and forms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator +If nothing is defined, the default component for this datatype will be used.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entityReferenceRole + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + entityReferenceRole: EntityReferenceRole + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EntityReferenceRole + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) If the dataType of this field references another entity, + define the role of this relationship for the entity containing this field.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                i.e. how "important" is the entity this field is referencing? +Does this the entity containing this field (not the referenced entity) still have meaning after the referenced entity has been deleted?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                see options of the EntityReferenceRole type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + generateIndex + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + generateIndex: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Set to true to make the framework automatically create an index to retrieve/filter Entities quickly based on this field

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + isArray + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + isArray: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If the dataType can hold multiple values, as an array of the given dataType.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A label which explains this value in a human-readable way

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + labelShort + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + labelShort: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A short label which can be used in tables. +If nothing is specified, the long name will be used.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + searchable + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + searchable: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If set to true, the entity can be found in the global search by entering this value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + showInDetailsView + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + showInDetailsView: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                whether to show this field in the default details view

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + validators + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + validators: FormValidatorConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : FormValidatorConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + viewComponent + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + viewComponent: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Optional) Define using which component this property should be displayed in lists and forms.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The edit component has to be a registered component. Components that are registered contain the DynamicComponent +decorator +If nothing is defined, the default component for this datatype will be used.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { FormValidatorConfig } from "../../common-components/entity-form/dynamic-form-validators/form-validator-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityReferenceRole } from "../../basic-datatypes/entity/entity-reference-role";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DefaultValueConfig } from "./default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Interface for additional configuration about a DatabaseField schema.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * This is used as parameter for the DatabaseField annotation:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * `@DatabaseField(fieldConfig: EntitySchemaField)`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface EntitySchemaField {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The datatype of this field. This will trigger to matching datatype transformer when saving/loading the entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If you don't set this explicitly, the dataType is inferred from the TypeScript type of the property that is annotated.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  dataType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If the dataType can hold multiple values, as an array of the given dataType.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isArray?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Set to true to make the framework automatically create an index to retrieve/filter Entities quickly based on this field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @todo not implemented yet
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  generateIndex?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If set to `true`, the entity can be found in the global search by entering this value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  searchable?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Configure the default value mode of this field.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Default values are applied to form fields, if field is empty
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The form will be disabled, until all default value configs are applied
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  defaultValue?: DefaultValueConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * (Optional) Assign any custom "extension" configuration you need for a specific datatype extension.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * You can pass any kind of value here to allow complex custom datatype transformations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * that are not part of the core datatypes and therefore not included in this core interface.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  additional?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * (Optional) If the dataType of this field references another entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *    define the role of this relationship for the entity containing this field.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * i.e. how "important" is the entity this field is referencing?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Does this the entity containing this field (not the referenced entity) still have meaning after the referenced entity has been deleted?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * see options of the `EntityReferenceRole` type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityReferenceRole?: EntityReferenceRole;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // TODO: possibly remove viewComponent + editComponent from schema and only infer via dataType (or overwrite in FormFieldConfig)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * (Optional) Define using which component this property should be displayed in lists and forms.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The edit component has to be a registered component. Components that are registered contain the `DynamicComponent`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * decorator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If nothing is defined, the default component for this datatype will be used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  viewComponent?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * (Optional) Define using which component this property should be editable in lists and forms.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The edit component has to be a registered component. Components that are registered contain the `DynamicComponent`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * decorator
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If nothing is defined, the default component for this datatype will be used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  editComponent?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * A label which explains this value in a human-readable way
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * A short label which can be used in tables.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If nothing is specified, the long name will be used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  labelShort?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * A further description of the property which can be displayed in tooltips.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  validators?: FormValidatorConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** whether to show this field in the default details view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  showInDetailsView?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * whether the field will be retained when the entity is "anonymized".
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * By default, fields are removed (data minimization by default).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * "retain-anonymized" triggers a special dataType action to retain the data partially in a special, anonymized form.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  anonymize?: "retain" | "retain-anonymized";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Available placeholder variables that can be used to configure a dynamic default value.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * (e.g. "$now" to set to current date)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export enum PLACEHOLDERS {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  NOW = "$now",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  CURRENT_USER = "$current_user",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityWithBirthday.html b/documentation/interfaces/EntityWithBirthday.html new file mode 100644 index 0000000000..7b8a96e836 --- /dev/null +++ b/documentation/interfaces/EntityWithBirthday.html @@ -0,0 +1,470 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/dashboard-widgets/birthday-dashboard-widget/birthday-dashboard/birthday-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + birthday + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + birthday: Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + entity: Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + newAge + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + newAge: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DatePipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +interface BirthdayDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entities: EntityPropertyMap;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  threshold: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("BirthdayDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-birthday-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./birthday-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./birthday-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    DatePipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class BirthdayDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  implements BirthdayDashboardConfig, OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static override getRequiredEntities(config: BirthdayDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return config?.entities ? Object.keys(config.entities) : "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private readonly today: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * An object holding the names of entities and properties where they have a `DateOfBirth` attribute.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * E.g. (which is also the default)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * ```json
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * "entities": { "Child": "dateOfBirth" }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * ```
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() entities: EntityPropertyMap = { ["Child"]: "dateOfBirth" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Birthdays that are less than "threshold" days away are shown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default 32
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() threshold = 32;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entries: EntityWithBirthday[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(private entityMapper: EntityMapperService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.today = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.today.setHours(0, 0, 0, 0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const data: EntityWithBirthday[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    for (const [entityType, property] of Object.entries(this.entities)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      const entities = await this.entityMapper.loadType(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      data.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        ...entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          .filter((entity) => entity.isActive && entity[property])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          .map((entity) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            entity: entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            birthday: this.getNextBirthday(entity[property]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +            newAge: entity[property]?.age + 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          }))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          .filter((a) => this.daysUntil(a.birthday) < this.threshold),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    data.sort(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      (a, b) => this.daysUntil(a.birthday) - this.daysUntil(b.birthday),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.entries = data;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private getNextBirthday(dateOfBirth: Date): Date {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const birthday = new Date(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.today.getFullYear(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      dateOfBirth.getMonth(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      dateOfBirth.getDate(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.today.getTime() > birthday.getTime()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      birthday.setFullYear(birthday.getFullYear() + 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return birthday;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private daysUntil(date: Date): number {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const diff = date.getTime() - this.today.getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return Math.floor(diff / (1000 * 60 * 60 * 24));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +interface EntityPropertyMap {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  [key: string]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +interface EntityWithBirthday {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  birthday: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  newAge: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/EntityWithRecentNoteInfo.html b/documentation/interfaces/EntityWithRecentNoteInfo.html new file mode 100644 index 0000000000..7e81f0662d --- /dev/null +++ b/documentation/interfaces/EntityWithRecentNoteInfo.html @@ -0,0 +1,558 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/child-dev-project/notes/dashboard-widgets/notes-dashboard/notes-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    details on entity stats to be displayed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + daysSinceLastNote + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + daysSinceLastNote: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entityId + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + entityId: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + moreThanDaysSince + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + moreThanDaysSince: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    true when the daysSinceLastNote is not accurate but was cut off for performance optimization

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ChildrenService } from "../../../children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityConstructor } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DecimalPipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Note } from "../../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +interface NotesDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entity?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  sinceDays?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  fromBeginningOfWeek?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mode?: "with-recent-notes" | "without-recent-notes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Dashboard Widget displaying entities that do not have a recently added Note.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * If you do not set "sinceDays" of "fromBeginningOfWeek" inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * by default notes since beginning of the current week are considered.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@DynamicComponent("NotesDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-no-recent-notes-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./notes-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./notes-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DecimalPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class NotesDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  implements OnInit, NotesDashboardConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  static override getRequiredEntities(config: NotesDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return config?.entity || Note.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Entity for which the recent notes should be counted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() set entity(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this._entity = this.entities.get(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  _entity: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * number of days since last note that entities should be considered having a "recent" note.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() sinceDays = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** Whether an additional offset should be automatically added to include notes from the beginning of the week */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() fromBeginningOfWeek = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() mode: "with-recent-notes" | "without-recent-notes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Entities displayed in the template with additional "daysSinceLastNote" field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entries: EntityWithRecentNoteInfo[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  subtitle: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (!this._entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.entity = "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let dayRangeBoundary = this.sinceDays;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.fromBeginningOfWeek) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      dayRangeBoundary += moment().diff(moment().startOf("week"), "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    switch (this.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      case "with-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          (stat) => stat[1] <= dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.subtitle = $localize`:Subtitle|Subtitle informing the user that these are the entities with recent reports:${this._entity.labelPlural} with recent report`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      case "without-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          (stat) => stat[1] >= dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.subtitle = $localize`:Subtitle|Subtitle informing the user that these are the entities without recent reports:${this._entity.labelPlural} having no recent reports`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    filter: (stat: [string, number]) => boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    dayRangeBoundary: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const queryRange = Math.round((dayRangeBoundary * 3) / 10) * 10; // query longer range to be able to display exact date of last note for recent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    // recent notes are sorted ascending, without recent notes descending
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const order = this.mode === "with-recent-notes" ? -1 : 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const recentNotesMap =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      await this.childrenService.getDaysSinceLastNoteOfEachEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this._entity.ENTITY_TYPE,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        queryRange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.entries = Array.from(recentNotesMap)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .filter(filter)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .map((stat) => statsToEntityWithRecentNoteInfo(stat, queryRange))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .sort((a, b) => order * (b.daysSinceLastNote - a.daysSinceLastNote));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  get tooltip(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    switch (this.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      case "with-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return $localize`:Tooltip|Spaces in front of the variables are added automatically:includes cases with a note${this.sinceBeginningOfTheWeek}:sinceBeginningOfWeek:${this.withinTheLastNDays}:withinTheLastDays:`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      case "without-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        return $localize`:Tooltip|Spaces in front of the variables are added automatically:includes cases without a note${this.sinceBeginningOfTheWeek}:sinceBeginningOfWeek:${this.withinTheLastNDays}:withinTheLastDays:`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  get sinceBeginningOfTheWeek(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.fromBeginningOfWeek) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Tooltip-part|'includes cases without a note since the beginning of the week':since the beginning of the week`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  get withinTheLastNDays(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.sinceDays > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        $localize`:Tooltip-part|'includes cases without a note within the last x days':without a note within the last ${this.sinceDays} days`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * details on entity stats to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +interface EntityWithRecentNoteInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entityId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  daysSinceLastNote: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** true when the daysSinceLastNote is not accurate but was cut off for performance optimization */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  moreThanDaysSince: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Map a result entry from getDaysSinceLastNoteOfEachEntity to the EntityWithRecentNoteInfo interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * @param stat Array of [entityId, daysSinceLastNote]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * @param queryRange The query range (the maximum of days that exactly calculated)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +function statsToEntityWithRecentNoteInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  stat: [string, number],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  queryRange: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +): EntityWithRecentNoteInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  if (stat[1] < Number.POSITIVE_INFINITY) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      entityId: stat[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      daysSinceLastNote: stat[1],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      moreThanDaysSince: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      entityId: stat[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      daysSinceLastNote: queryRange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      moreThanDaysSince: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ExportColumnConfig.html b/documentation/interfaces/ExportColumnConfig.html new file mode 100644 index 0000000000..319e240929 --- /dev/null +++ b/documentation/interfaces/ExportColumnConfig.html @@ -0,0 +1,484 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/export/data-transformation-service/export-column-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Basic definition of a field / column to be included in an export through the ExportService.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + groupBy + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + groupBy: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Group the results of the query based on unique values at property. +This will also add another column to the list with the title label and the distinct values in the rows.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      label shown in the header row.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      If not specified, query is used.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + query + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + query: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The query to access the value for this column from the object to be exported

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + subQueries + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + subQueries: ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      One or more sub queries to expand one column into multiple columns and/or rows.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The queries in the subQueries are executed based on the result(s) from the parent query where: +each object in the parent query result will lead to its own row in the final export (extending one object into multiple export rows); +each query in the subQueries will lead to one (or recursively more) columns in the export rows.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      e.g. { query: ".participants:toEntities(Child), subQueries: [ {query: "name"}, {query: "phone"} ] } +=> parent query (not output in export): [{..child1}, {..child2}] +=> overall result: two export rows: [{ name: "child1", phone: "123"}, {name: "child2", phone: "567"}]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      export interface ExportColumnConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * label shown in the header row.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * If not specified, query is used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** The query to access the value for this column from the object to be exported */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  query: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * One or more sub queries to expand one column into multiple columns and/or rows.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The queries in the subQueries are executed based on the result(s) from the parent query where:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * each object in the parent query result will lead to its own row in the final export (extending one object into multiple export rows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * each query in the subQueries will lead to one (or recursively more) columns in the export rows.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * e.g. `{ query: ".participants:toEntities(Child), subQueries: [ {query: "name"}, {query: "phone"} ] }`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * => parent query (not output in export): [{..child1}, {..child2}]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * => overall result: two export rows: [{ name: "child1", phone: "123"}, {name: "child2", phone: "567"}]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  subQueries?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Group the results of the query based on unique values at `property`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * This will also add another column to the list with the title `label` and the distinct values in the rows.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  groupBy?: { label: string; property: string };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ExportRow.html b/documentation/interfaces/ExportRow.html new file mode 100644 index 0000000000..70b7237ac1 --- /dev/null +++ b/documentation/interfaces/ExportRow.html @@ -0,0 +1,466 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/export/data-transformation-service/data-transformation.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Indexable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + [key: string]: any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  getReadableValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  transformToReadableFormat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "../../common-components/entities-table/value-accessor/value-accessor";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ExportColumnConfig } from "./export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { QueryService } from "../query.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { groupBy } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Prepare data for export or analysis
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class DataTransformationService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(private queryService: QueryService) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async queryAndTransformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Promise<ExportRow[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const combinedResults: ExportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const totalRow: ExportRow = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const c of config) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      await this.queryService.cacheRequiredData(c.query, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const baseData = this.queryService.queryData(c.query, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const result: ExportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (c.subQueries) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        result.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          ...(await this.transformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            baseData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            c.subQueries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            c.groupBy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          )),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        totalRow[c.label] = baseData;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      combinedResults.push(...result);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return Object.keys(totalRow).length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ? [totalRow, ...combinedResults]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      : combinedResults;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private concatQueries(config: ExportColumnConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return (config.subQueries ?? []).reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (query, c) => query + this.concatQueries(c),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      config.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Creates a dataset with the provided values that can be used for a simple table or export.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data an array of elements. If not provided, the first query in `config` will be used to get the data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param config (Optional) config specifying how export should look
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param from (Optional) limits the data which is fetched from the database and is also available inside the query. If not provided, all data is fetched.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param to (Optional) same as from.If not provided, today is used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param groupByProperty (optional) groups the data using the value at the given property and adds a column to the final table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns array with the result of the queries and sub queries
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async transformData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to?: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    groupByProperty?: { label: string; property: string },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Promise<ExportRow[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const fullQuery = config.map((c) => this.concatQueries(c)).join("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    await this.queryService.cacheRequiredData(fullQuery, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.generateRows(data, config, from, to, groupByProperty).map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      transformToReadableFormat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private generateRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data: any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    groupByProperty?: { label: string; property: string },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const result: ExportRow[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (groupByProperty) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const groups = groupBy(data, groupByProperty.property);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      for (const [group, values] of groups) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const groupColumn: ExportColumnConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          label: groupByProperty.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          query: `:setString(${getReadableValue(group)})`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const rows = this.generateColumnsForRow(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          values,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          [groupColumn].concat(...config),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        result.push(...rows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      for (const dataRow of data) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const rows = this.generateColumnsForRow(dataRow, config, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        result.push(...rows);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Generate one or more export row objects from the given data data and config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data A data to be exported as one or more export row objects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @returns array of one or more export row objects (as simple {key: value})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private generateColumnsForRow(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data: any | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    config: ExportColumnConfig[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): ExportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let exportRows: ExportRow[] = [{}];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    for (const exportColumnConfig of config) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const partialExportObjects = this.buildValueRecursively(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        exportColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      exportRows = this.mergePartialExportRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        exportRows,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        partialExportObjects,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return exportRows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Generate one or more (partial) export row objects from a single property of the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param data one single data item
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param exportColumnConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private buildValueRecursively(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data: any | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    exportColumnConfig: ExportColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): ExportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const label =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      exportColumnConfig.label ?? exportColumnConfig.query.replace(".", "");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const value = this.getValueForQuery(exportColumnConfig, data, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!exportColumnConfig.subQueries) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return [{ [label]: value }];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (value.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this.generateColumnsForRow(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        exportColumnConfig.subQueries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return this.generateRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        exportColumnConfig.subQueries,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        exportColumnConfig.groupBy,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getValueForQuery(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    exportColumnConfig: ExportColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    data: any | any[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): any {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const value = this.queryService.queryData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      exportColumnConfig.query,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      from,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      to,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      Array.isArray(data) ? data : [data],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!Array.isArray(value)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else if (!exportColumnConfig.subQueries && value.length === 1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return value[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return value.filter((val) => val !== undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Combine two arrays of export row objects.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Every additional row is merged with every row of the first array (combining properties),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * resulting in n*m export rows.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param exportRows
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param additionalExportRows
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private mergePartialExportRows(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    exportRows: ExportRow[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    additionalExportRows: ExportRow[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): ExportRow[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const rowsOfRows: ExportRow[][] = additionalExportRows.map((addRow) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      exportRows.map((row) => Object.assign({}, row, addRow)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // return flattened array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return rowsOfRows.reduce((acc, rowOfRows) => acc.concat(rowOfRows), []);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +interface ExportRow {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  [key: string]: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ExportingReport.html b/documentation/interfaces/ExportingReport.html new file mode 100644 index 0000000000..8bc104ef49 --- /dev/null +++ b/documentation/interfaces/ExportingReport.html @@ -0,0 +1,419 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/reporting/report-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Reports handles by the {@class DataTransformationService}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ReportConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + aggregationDefinitions + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + aggregationDefinitions: ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ExportColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + mode + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + mode: + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          If no mode is set, it will default to 'exporting'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Entity, EntityConstructor } from "../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DatabaseEntity } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Aggregation } from "./data-aggregation.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ExportColumnConfig } from "../../core/export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DatabaseField } from "../../core/entity/database-field.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A report can be accessed by users to generate aggregated statistics or customized exports calculated from available data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * "read" permission for a ReportConfig entity is also used to control which users can generate the report's results.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This is the class which is saved to the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * However, when using this in code, use the {@link ReportEntity} instead which provides better type safety.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@DatabaseEntity("ReportConfig")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +class ReportConfig extends Entity {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** human-readable title of the report */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @DatabaseField() title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * (optional) mode of export.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The {@link ReportEntity} holds the restriction on valid report modes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Default is "reporting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @DatabaseField() mode?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * (sql only) list of arguments needed for the sql query. Placeholder "?" will be replaced.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @DatabaseField() neededArgs?: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** the definitions to calculate the report's aggregations */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @DatabaseField() aggregationDefinitions: any[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** (sql only) the definition to calculate the report */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @DatabaseField() aggregationDefinition: string | undefined = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Union type to enable type safety for report configs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Use this instead of the {@class ReportConfig}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export type ReportEntity = AggregationReport | ExportingReport | SqlReport;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This allows the `ReportEntity` to also be used as a constructor or in the `EntityMapper`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export const ReportEntity = ReportConfig as EntityConstructor<ReportEntity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Reports handles by the {@class DataAggregationService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface AggregationReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mode: "reporting";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  aggregationDefinitions: Aggregation[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Reports handles by the {@class DataTransformationService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface ExportingReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * If no mode is set, it will default to 'exporting'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mode?: "exporting";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  aggregationDefinitions: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Reports handles by the {@class SqlReportService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface SqlReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  mode: "sql";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * a valid SQL SELECT statements, can contain "?" placeholder for arguments
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  aggregationDefinition: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * a list of arguments, passed into the sql statement
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  neededArgs: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ExtendedAlertConfig.html b/documentation/interfaces/ExtendedAlertConfig.html new file mode 100644 index 0000000000..e75d2182b7 --- /dev/null +++ b/documentation/interfaces/ExtendedAlertConfig.html @@ -0,0 +1,307 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/alerts/alert-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + AlertConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + timestamp + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + timestamp: Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { AlertDisplay } from "./alert-display";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface AlertConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** The text of the message */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  message: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** The type of the message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *  - Info messages provide feedback or information to the user without any required action
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *  - Warning messages provide feedback about unexpected or potentially unintended events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   *  - Danger messages inform about errors or critical conditions that the user should not overlook
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  type: "info" | "warning" | "danger";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /** The display style (e.g. whether the alert has to be actively dismissed by the user) */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  display: AlertDisplay;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface ExtendedAlertConfig extends AlertConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  timestamp: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/FieldGroup.html b/documentation/interfaces/FieldGroup.html new file mode 100644 index 0000000000..ae8658402f --- /dev/null +++ b/documentation/interfaces/FieldGroup.html @@ -0,0 +1,341 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/entity-details/form/field-group.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A group of related form fields displayed within a Form component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + fields + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + fields: ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + header + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + header: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { ColumnConfig } from "../../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * A group of related form fields displayed within a Form component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface FieldGroup {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  header?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  fields: ColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/FilterOverlayData.html b/documentation/interfaces/FilterOverlayData.html new file mode 100644 index 0000000000..4334758948 --- /dev/null +++ b/documentation/interfaces/FilterOverlayData.html @@ -0,0 +1,460 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/filter/filter-overlay/filter-overlay.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entities + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + entities: T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + entityType: EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EntityConstructor<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + filterConfig + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + filterConfig: FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + filterObjChange + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + filterObjChange: function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + useUrlQueryParams + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + useUrlQueryParams: + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterConfig } from "../../entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterComponent } from "../filter/filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DataFilter } from "../filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface FilterOverlayData<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filterConfig: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityType: EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entities: T[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  useUrlQueryParams: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  filterObjChange: (filter: DataFilter<T>) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * The component that shows filter options on small screens
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * via a popover instead of the menu
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-filter-overlay",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./filter-overlay.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styles: [":host { display: block }"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [MatDialogModule, FilterComponent, MatButtonModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class FilterOverlayComponent<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(@Inject(MAT_DIALOG_DATA) public data: FilterOverlayData<T>) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/FilterSelectionOption.html b/documentation/interfaces/FilterSelectionOption.html new file mode 100644 index 0000000000..108fcc85f2 --- /dev/null +++ b/documentation/interfaces/FilterSelectionOption.html @@ -0,0 +1,573 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/filter/filters/filters.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Represents one specific option to filter data in a certain way. +used by SelectableFilter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + color + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + color: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Optional color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + filter + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + filter: DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : DataFilter<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The filter query which should be used if this filter is selected

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + key + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + key: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  identifier for this option in the parent FilterSelection instance

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  label displayed for this option to the user in the UI

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MongoQuery } from "@casl/ability";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ListFilterComponent } from "../list-filter/list-filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EventEmitter, Type } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This filter can be used to filter an array of entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * It has to follow the MongoDB Query Syntax {@link https://www.mongodb.com/docs/manual/reference/operator/query/}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * The filter is parsed using ucast {@link https://github.com/stalniy/ucast/tree/master/packages/mongo2js}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export type DataFilter<T> = MongoQuery<T> | {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export abstract class Filter<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The component used to display filter option to the user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  component: Type<any> = ListFilterComponent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public selectedOptionValues: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Triggered when this filter changes value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * (e.g. when the user selects a new value in a FilterComponent).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This is part of the filter object because dynamic filter components can't expose @Outputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selectedOptionChange = new EventEmitter<string[]>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  protected constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    public name: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    public label: string = name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  abstract getFilter(): DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Generic configuration for a filter with different selectable {@link FilterSelectionOption} options.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * This is a reusable format for any kind of dropdown or selection component that offers the user a choice
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * to narrow down a list of data items.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * As the filter function is provided as part of each {@link FilterSelectionOption}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * an instance of this FilterSelection class can manage all filter selection logic.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class SelectableFilter<T extends Entity> extends Filter<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Generate filter options dynamically from the given value to be matched.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This is a utility function to make it easier to generate {@link FilterSelectionOption}s for standard cases
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * if you simply want each option to filter items having the given attribute matching different values.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If you have more sophisticated filtering needs, use the constructor to set {@link FilterSelectionOption}s that
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * you created yourself.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param valuesToMatchAsOptions An array of values to be matched.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *        A separate FilterSelectionOption is created for each value with a filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *        that is true of a data item's property exactly matches that value.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param attributeName The name of the property of a data item that is compared to the value in the filter function.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public static generateOptions<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    valuesToMatchAsOptions: (string | number)[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    attributeName: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ): FilterSelectionOption<T>[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return valuesToMatchAsOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .filter((k) => !!k)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map((k) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        key: k.toString().toLowerCase(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        label: k.toString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        filter: { [attributeName]: k } as DataFilter<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Create a FilterSelection with different options to be selected.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param name The name or id describing this filter
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param options An array of different filtering variants to chose between
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param label The user-friendly label describing this filter-selection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * (optional, defaults to the name of the selection)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    public override name: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    public options: FilterSelectionOption<T>[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    public override label: string = name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super(name, label);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.selectedOptionValues = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Get the full filter option by its key.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param key The identifier of the requested option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  getOption(key: string): FilterSelectionOption<T> | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return this.options.find((option: FilterSelectionOption<T>): boolean => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return option.key === key;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Get the filter query for the given option.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If the given key is undefined or invalid, the returned filter matches any elements.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public getFilter(): DataFilter<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const filters: DataFilter<T>[] = this.selectedOptionValues
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map((value: string) => this.getOption(value))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .filter((value: FilterSelectionOption<T>) => value !== undefined)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map((previousValue: FilterSelectionOption<T>) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return previousValue.filter as DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (filters.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return {} as DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      $or: [...filters],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } as unknown as DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Represents one specific option to filter data in a certain way.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * used by {@link SelectableFilter}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface FilterSelectionOption<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** identifier for this option in the parent FilterSelection instance */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** label displayed for this option to the user in the UI */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** Optional color */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  color?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The filter query which should be used if this filter is selected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filter: DataFilter<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/FlattenedReportRow.html b/documentation/interfaces/FlattenedReportRow.html new file mode 100644 index 0000000000..9adb1df2d8 --- /dev/null +++ b/documentation/interfaces/FlattenedReportRow.html @@ -0,0 +1,372 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/features/reporting/reporting/report-row/report-row.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + ReportRow +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + isExpandable + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + isExpandable: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + level + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + level: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { getGroupingInformationString, ReportRow } from "../../report-row";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FlatTreeControl } from "@angular/cdk/tree";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  MatTreeFlatDataSource,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  MatTreeFlattener,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "@angular/material/tree";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +interface FlattenedReportRow extends ReportRow {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  level: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  isExpandable: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-report-row",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./report-row.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  styleUrls: ["./report-row.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [MatTableModule, MatButtonModule, FontAwesomeModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class ReportRowComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() set rows(rows: ReportRow[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.dataSource.data = rows;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  displayedColumns: string[] = ["name", "count"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  getGroupedByString = getGroupingInformationString;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  treeFlattener = new MatTreeFlattener<ReportRow, FlattenedReportRow>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (row, level) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      level: level,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      isExpandable: !!row.subRows && row.subRows.length > 0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      ...row,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (row) => row.level,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (row) => row.isExpandable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (row) => row.subRows,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  treeControl = new FlatTreeControl<FlattenedReportRow>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (row) => row.level,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (row) => row.isExpandable,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/FormConfig.html b/documentation/interfaces/FormConfig.html new file mode 100644 index 0000000000..8633d9726a --- /dev/null +++ b/documentation/interfaces/FormConfig.html @@ -0,0 +1,387 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/entity-details/form/form.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Config format that the FormComponent handles.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + fieldGroups + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + fieldGroups: FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : FieldGroup[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Input, OnInit, Optional } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { getParentUrl } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Location, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DynamicComponent } from "../../config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { InvalidFormFieldError } from "../../common-components/entity-form/invalid-form-field.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  EntityForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "../../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { AlertService } from "../../alerts/alert.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { EntityFormComponent } from "../../common-components/entity-form/entity-form/entity-form.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DisableEntityOperationDirective } from "../../permissions/permission-directive/disable-entity-operation.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { FieldGroup } from "./field-group";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ViewComponentContext } from "../../ui/abstract-view/abstract-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * A simple wrapper function of the EntityFormComponent which can be used as a dynamic component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * e.g. as a panel for the EntityDetailsComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@DynamicComponent("Form")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-form",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./form.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./form.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    EntityFormComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    DisableEntityOperationDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class FormComponent<E extends Entity> implements FormConfig, OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() entity: E;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() creatingNew = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @Input() fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  form: EntityForm<E> | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private location: Location,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private alertService: AlertService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Optional() private viewContext: ViewComponentContext,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entityFormService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .createEntityForm(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        [].concat(...this.fieldGroups.map((group) => group.fields)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      .then((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.form = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        if (!this.creatingNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          this.form.formGroup.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async saveClicked() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      await this.entityFormService.saveChanges(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.form.formGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (this.creatingNew && !this.viewContext?.isDialog) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        await this.router.navigate([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          getParentUrl(this.router),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          this.entity.getId(true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      if (!(err instanceof InvalidFormFieldError)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        this.alertService.addDanger(err.message);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  cancelClicked() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    if (this.creatingNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.location.back();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.entityFormService.resetForm(this.form.formGroup, this.entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.form.formGroup.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Config format that the FormComponent handles.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface FormConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  fieldGroups: FieldGroup[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/FormFieldConfig.html b/documentation/interfaces/FormFieldConfig.html new file mode 100644 index 0000000000..592144194e --- /dev/null +++ b/documentation/interfaces/FormFieldConfig.html @@ -0,0 +1,622 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/common-components/entity-form/FormConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The general configuration for fields in tables and forms. +This defines which property is displayed and how it should be displayed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        You can just provide the id as string or overwrite any EntitySchemaField property here as necessary.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + EntitySchemaField +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + forTable + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + forTable: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        An internal flag that will be automatically set in the entity subrecord in order to adapt the view/edit components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + hideFromForm + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + hideFromForm: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        If true, the field will only be shown in tables and excluded from forms and popups.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + hideFromTable + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + hideFromTable: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        If true, the field will only be shown in forms and popups, but not in tables.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The id of the entity which should be accessed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + noSorting + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + noSorting: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        When set to true, the sorting of this column will be disabled. +Should be used when the sorting will not work correctly/does not make sense. +E.g. when displaying a list of entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + visibleFrom + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + visibleFrom: "xs" | "sm" | "md" | "lg" | "xl" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : "xs" | "sm" | "md" | "lg" | "xl" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        visibleFrom The minimal screen size where the column is shown. + screen size classes: xs 'screen and (max-width: 599px)' + sm 'screen and (min-width: 600px) and (max-width: 959px)' + md 'screen and (min-width: 960px) and (max-width: 1279px)' + lg 'screen and (min-width: 1280px) and (max-width: 1919px)' + xl 'screen and (min-width: 1920px) and (max-width: 5000px)'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { EntitySchemaField } from "../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * The general configuration for fields in tables and forms.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This defines which property is displayed and how it should be displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * You can just provide the id as string or overwrite any EntitySchemaField property here as necessary.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface FormFieldConfig extends EntitySchemaField {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The id of the entity which should be accessed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * When set to true, the sorting of this column will be disabled.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Should be used when the sorting will not work correctly/does not make sense.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * E.g. when displaying a list of entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  noSorting?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * visibleFrom The minimal screen size where the column is shown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *           screen size classes: xs  'screen and (max-width: 599px)'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *           sm  'screen and (min-width: 600px) and (max-width: 959px)'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *           md  'screen and (min-width: 960px) and (max-width: 1279px)'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *           lg  'screen and (min-width: 1280px) and (max-width: 1919px)'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *           xl  'screen and (min-width: 1920px) and (max-width: 5000px)'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  visibleFrom?: "xs" | "sm" | "md" | "lg" | "xl";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * If true, the field will only be shown in forms and popups, but not in tables.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  hideFromTable?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * If true, the field will only be shown in tables and excluded from forms and popups.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  hideFromForm?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * An internal flag that will be automatically set in the entity subrecord in order to adapt the view/edit components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  forTable?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Type for the definition of a single column in the EntitySubrecord
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export type ColumnConfig = string | FormFieldConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export function toFormFieldConfig(column: ColumnConfig): FormFieldConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  if (typeof column === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return { id: column };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return column;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/FullDefaultValueHint.html b/documentation/interfaces/FullDefaultValueHint.html new file mode 100644 index 0000000000..e87e0150cc --- /dev/null +++ b/documentation/interfaces/FullDefaultValueHint.html @@ -0,0 +1,623 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/default-values/default-value.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Details of the source for an "inherited" default value in a field, +used to display context to the user about this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + inheritedFromField + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + inheritedFromField: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + inheritedFromType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + inheritedFromType: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + isEmpty + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + isEmpty: undefined | + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : undefined | + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + isInSync + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + isInSync: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + syncFromParentField + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + syncFromParentField: function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityForm } from "../common-components/entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchema } from "../entity/schema/entity-schema";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DefaultValueConfig } from "../entity/schema/default-value-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AbstractControl } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaField } from "../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicPlaceholderValueService } from "./dynamic-placeholder-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { InheritedValueService } from "./inherited-value.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Handle default values like the current date or user for forms when editing an Entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class DefaultValueService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private dynamicPlaceholderValueService: DynamicPlaceholderValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private inheritedValueService: InheritedValueService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async handleEntityForm<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: Entity,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!(form.defaultValueConfigs?.size > 0)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const entitySchema: EntitySchema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    await this.inheritedValueService.initEntityForm(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.enableChangeListener(form);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const [key, entitySchemaField] of entitySchema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      let targetFormControl = form.formGroup.get(key);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        !this.preConditionsFulfilled(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          entity.isNew,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        continue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      switch (entitySchemaField.defaultValue?.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        case "static":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.handleStaticMode(targetFormControl, entitySchemaField);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        case "dynamic":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.dynamicPlaceholderValueService.setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        case "inherited":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          this.inheritedValueService.setDefaultValue(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            targetFormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            entitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            form,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private preConditionsFulfilled(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    isNew: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    formControl: AbstractControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!isNew) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!formControl) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!fieldConfig.isArray && !!formControl.value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fieldConfig.isArray &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      formControl.value &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      formControl.value.length > 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private enableChangeListener<T extends Entity>(form: EntityForm<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form.watcher.set(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      "formGroupValueChanges",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      form.formGroup.valueChanges.subscribe(async (change) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.inheritedValueService.onFormValueChanges(form),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private handleStaticMode(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    targetFormControl: AbstractControl<any, any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    fieldConfig: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (fieldConfig.isArray) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      targetFormControl.setValue([fieldConfig.defaultValue.value]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      targetFormControl.setValue(fieldConfig.defaultValue.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  getDefaultValueUiHint<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    form: EntityForm<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    fieldId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): DefaultValueHint | EmptyDefaultValueHint | undefined {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!form) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const mode = form?.defaultValueConfigs?.get(fieldId)?.mode;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (mode === "inherited") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return this.inheritedValueService.getDefaultValueUiHint(form, fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static getDefaultValueConfigs<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    entity: T,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Map<string, DefaultValueConfig> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let schema: EntitySchema = entity.getSchema();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const defaultValueConfigs: Map<string, DefaultValueConfig> = new Map();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const [key, entitySchemaField] of schema) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (entitySchemaField.defaultValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        defaultValueConfigs.set(key, entitySchemaField.defaultValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return defaultValueConfigs;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export type DefaultValueHint = FullDefaultValueHint | EmptyDefaultValueHint;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Details of the source for an "inherited" default value in a field,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * used to display context to the user about this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface FullDefaultValueHint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isInSync: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  inheritedFromType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  inheritedFromField: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  syncFromParentField: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isEmpty?: undefined | false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Reduced "DefaultValueHint" if no referenced parent entity is selected but a rule to inherit values is configured.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface EmptyDefaultValueHint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  inheritedFromField: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isEmpty: true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isInSync?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  inheritedFromType?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  syncFromParentField?: undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GeoLocation.html b/documentation/interfaces/GeoLocation.html new file mode 100644 index 0000000000..539f164173 --- /dev/null +++ b/documentation/interfaces/GeoLocation.html @@ -0,0 +1,392 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/location/location.datatype.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A location both as custom string and an optional geo location lookup.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + geoLookup + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + geoLookup: GeoResult + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : GeoResult + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + locationString + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + locationString: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { DefaultDatatype } from "../../core/entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { GeoResult, GeoService } from "./geo.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { lastValueFrom } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * A location both as custom string and an optional geo location lookup.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface GeoLocation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  locationString?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  geoLookup?: GeoResult;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class LocationDatatype extends DefaultDatatype<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  GeoLocation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  GeoLocation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static override dataType = "location";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static override label: string = $localize`:datatype-label:location (address + map)`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override editComponent = "EditLocation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override viewComponent = "ViewLocation";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(private geoService: GeoService) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override transformToObjectFormat(value: GeoLocation): GeoLocation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (typeof value !== "object") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // until we have an extended location datatype that includes a custom address addition field, discard invalid values (e.g. in case datatype was changed)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!value.hasOwnProperty("locationString")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // migrate from legacy format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        locationString: value["display_name"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        geoLookup: value as unknown as GeoResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  override async importMapFunction(val: any): Promise<GeoLocation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!val) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const geoResults = await lastValueFrom(this.geoService.lookup(val));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return { locationString: val, geoLookup: geoResults[0] };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GeoResult.html b/documentation/interfaces/GeoResult.html new file mode 100644 index 0000000000..0e9d72c914 --- /dev/null +++ b/documentation/interfaces/GeoResult.html @@ -0,0 +1,406 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/location/geo.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Coordinates +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + display_name + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + display_name: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Coordinates } from "./coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ConfigService } from "../../core/config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { AnalyticsService } from "../../core/analytics/analytics.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MAP_CONFIG_KEY, MapConfig } from "./map-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface GeoResult extends Coordinates {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  display_name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * A service that uses nominatim to lookup locations {@link https://nominatim.org/}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class GeoService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private readonly remoteUrl = "/nominatim";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private countrycodes = "de";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private defaultOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    format: "json",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    addressdetails: 1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    email: environment.email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private http: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private analytics: AnalyticsService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    configService.configUpdates.subscribe(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const config = configService.getConfig<MapConfig>(MAP_CONFIG_KEY);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (config?.countrycodes) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.countrycodes = config.countrycodes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Returns locations that match the search term
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param searchTerm e.g. `Rollbergstraße Berlin`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  lookup(searchTerm: string): Observable<GeoResult[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.analytics.eventTrack("lookup_executed", {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      category: "Map",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      value: searchTerm.length,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .get<OpenStreetMapsSearchResult[]>(`${this.remoteUrl}/search`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        params: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ...this.defaultOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          q: searchTerm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          countrycodes: this.countrycodes,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        map((results) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Array.isArray(results)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            ? results.map((x) => this.reformatDisplayName(x))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            : [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private reformatDisplayName(result: OpenStreetMapsSearchResult): GeoResult {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const addr = result?.address;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (addr) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const city = addr.city ?? addr.town;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      result.display_name = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        addr.amenity ?? addr.office,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        addr.road ? addr.road + " " + addr.house_number : undefined,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        addr.postcode ? addr.postcode + " " + city : city,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .filter((x) => !!x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        .join(", ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Returns the location at the provided coordinates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param coordinates of a place (`lat` and `lon`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  reverseLookup(coordinates: Coordinates): Observable<GeoResult> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.analytics.eventTrack("reverse_lookup_executed", {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      category: "Map",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .get<OpenStreetMapsSearchResult>(`${this.remoteUrl}/reverse`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        params: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          ...this.defaultOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          lat: coordinates.lat,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          lon: coordinates.lon,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      .pipe(map((result) => this.reformatDisplayName(result)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +type OpenStreetMapsSearchResult = GeoResult & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  address: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    amenity?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    office?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    house_number?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    road?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    neighbourhood?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    suburb?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    borough?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    city?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    town?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    postcode?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    country?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    country_code?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GroupByDescription.html b/documentation/interfaces/GroupByDescription.html new file mode 100644 index 0000000000..0459aadd87 --- /dev/null +++ b/documentation/interfaces/GroupByDescription.html @@ -0,0 +1,358 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/reporting/report-row.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + property + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + property: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + value + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + value: any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                export interface ReportRow {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  header: { label: string; groupedBy: GroupByDescription[]; result: number };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  subRows: ReportRow[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface GroupByDescription {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  property: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  value: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export function getGroupingInformationString(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  groupedBy: GroupByDescription[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  if (groupedBy.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      "(" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      groupedBy
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .map((group) => getValueDescription(group.value, group.property))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .join(", ") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ")"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +function getValueDescription(value: any, property: string): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  if (typeof value === "boolean") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ? property
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      : $localize`:Not a certain property|e.g. 'not male':not ${property}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  } else if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return $localize`:Excluding a certain property|e.g. 'without religion':without ${property}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  } else if (value.hasOwnProperty("label")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return value.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GroupConfig.html b/documentation/interfaces/GroupConfig.html new file mode 100644 index 0000000000..f75150cacd --- /dev/null +++ b/documentation/interfaces/GroupConfig.html @@ -0,0 +1,428 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + columns + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + columns: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + name + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + name: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/HasOrdinal.html b/documentation/interfaces/HasOrdinal.html new file mode 100644 index 0000000000..1868ab4cc3 --- /dev/null +++ b/documentation/interfaces/HasOrdinal.html @@ -0,0 +1,354 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/basic-datatypes/configurable-enum/configurable-enum-ordering.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Support for types of configurable enums that impose a total ordering of their elements. +Not all configurable enums (should sensibly) be able to be ordered. For example, it does +not make sense to see which school / center is "greater than" another center, or which gender is above +which other gender.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    For other enum types it is, however, sensible to impose a total ordering such as warning levels ('OK' is +somewhat 'better' than 'WARNING').

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Configurable enum values that impose a total ordering can be compared, which also means that they can be sorted, +and thus have a notion of one element being 'greater than' or 'less than' to another element. The interpretation +of 'greater' or 'less' than is dependent on the concrete enum.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + _ordinal + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + _ordinal: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ConfigurableEnumConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ConfigurableEnumValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "./configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { isObject } from "lodash-es";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export namespace Ordering {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Support for types of configurable enums that impose a total ordering of their elements.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Not all configurable enums (should sensibly) be able to be ordered. For example, it does
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * not make sense to see which school / center is "greater than" another center, or which gender is above
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * which other gender.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * For other enum types it is, however, sensible to impose a total ordering such as warning levels ('OK' is
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * somewhat 'better' than 'WARNING').
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Configurable enum values that impose a total ordering can be compared, which also means that they can be sorted,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * and thus have a notion of one element being 'greater than' or 'less than' to another element. The interpretation
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * of 'greater' or 'less' than is dependent on the concrete enum.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  export interface HasOrdinal {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    _ordinal?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  export function hasOrdinalValue(value: any): value is HasOrdinal {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return isObject(value) && "_ordinal" in value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  export type EnumValue<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    T extends ConfigurableEnumValue = ConfigurableEnumValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  > = T & HasOrdinal;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  export type Config<T extends ConfigurableEnumValue> = ConfigurableEnumConfig<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    T & HasOrdinal
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  >;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Extends an array of configurable enum values with an ordinal value so that the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * ordinal value of each enum value matches the position of the element in the array.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Note that this should be used 'early' in the pipeline, i.e. when the `ConfigurableEnumConfig` is just
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * created. It is technically not incorrect to use this function on any array that contains configurable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * enum values, but it doesn't make sense to apply this function to 'scrambled' arrays, i.e. arrays where the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * ordering of values is _not_ the natural order of these values.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @param values The values to impose a total ordering on
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  export function imposeTotalOrdering<T extends ConfigurableEnumValue>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    values: ConfigurableEnumConfig<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ): ConfigurableEnumConfig<EnumValue<T>> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return values.map((val, i) => Object.assign({ _ordinal: i }, val));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ImportDialogData.html b/documentation/interfaces/ImportDialogData.html new file mode 100644 index 0000000000..6a8a7881b8 --- /dev/null +++ b/documentation/interfaces/ImportDialogData.html @@ -0,0 +1,396 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/import/import-confirm-summary/import-confirm-summary.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Data passed into Import Confirmation Dialog.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + entitiesToImport + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + entitiesToImport: Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + importSettings + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + importSettings: ImportSettings + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : ImportSettings + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ImportService } from "../import.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ImportMetadata, ImportSettings } from "../import-metadata";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatSnackBar } from "@angular/material/snack-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Data passed into Import Confirmation Dialog.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface ImportDialogData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entitiesToImport: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  importSettings: ImportSettings;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Summary screen and confirmation / execution dialog for running an import.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  selector: "app-import-confirm-summary",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  templateUrl: "./import-confirm-summary.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  styleUrls: ["./import-confirm-summary.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  imports: [MatDialogModule, NgIf, MatProgressBarModule, MatButtonModule],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class ImportConfirmSummaryComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  importInProgress: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private dialogRef: MatDialogRef<ImportConfirmSummaryComponent>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    @Inject(MAT_DIALOG_DATA) public data: ImportDialogData,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private snackBar: MatSnackBar,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    private importService: ImportService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  // TODO: detailed summary including warnings of unmapped columns, ignored values, etc. (#1943)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  async executeImport() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.importInProgress = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.dialogRef.disableClose = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const completedImport = await this.importService.executeImport(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.data.entitiesToImport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      this.data.importSettings,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.showImportSuccessToast(completedImport);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    this.dialogRef.close(completedImport);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  private showImportSuccessToast(completedImport: ImportMetadata) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const snackBarRef = this.snackBar.open(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      $localize`Import completed`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      $localize`Undo`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        duration: 8000,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    snackBarRef.onAction().subscribe(async () => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      await this.importService.undoImport(completedImport);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ImportSettings.html b/documentation/interfaces/ImportSettings.html new file mode 100644 index 0000000000..d4eab8e185 --- /dev/null +++ b/documentation/interfaces/ImportSettings.html @@ -0,0 +1,407 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/import/import-metadata.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Settings required to execute an import including type and mappings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + additionalActions + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + additionalActions: AdditionalImportAction[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : AdditionalImportAction[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + columnMapping + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + columnMapping: ColumnMapping[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : ColumnMapping[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + entityType: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { DatabaseEntity } from "../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DatabaseField } from "../entity/database-field.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ColumnMapping } from "./column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { AdditionalImportAction } from "./import-additional-actions/additional-import-action";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Details of a previously executed import of data saved to the database to keep a history.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DatabaseEntity("ImportMetadata")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class ImportMetadata extends Entity {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static create(contents: Partial<ImportMetadata>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return Object.assign(new ImportMetadata(), contents);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  get date(): Date {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.created?.at;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  get user(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.created?.by;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @DatabaseField() config: ImportSettings;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @DatabaseField() ids: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Settings required to execute an import including type and mappings.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ImportSettings {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  columnMapping: ColumnMapping[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  additionalActions?: AdditionalImportAction[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/InteractionType.html b/documentation/interfaces/InteractionType.html new file mode 100644 index 0000000000..9a6f7319a4 --- /dev/null +++ b/documentation/interfaces/InteractionType.html @@ -0,0 +1,321 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/child-dev-project/notes/model/interaction-type.interface.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Additional properties defined in the "interaction-type" ConfigurableEnumValue values +providing special context for Note categories.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + ConfigurableEnumValue +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + isMeeting + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + isMeeting: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          whether the Note is a group type category that stores attendance details for each related person

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { ConfigurableEnumValue } from "../../../core/basic-datatypes/configurable-enum/configurable-enum.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Additional properties defined in the "interaction-type" {@link ConfigurableEnumValue} values
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * providing special context for {@link Note} categories.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface InteractionType extends ConfigurableEnumValue {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** whether the Note is a group type category that stores attendance details for each related person */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  isMeeting?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * ID of the Note category {@link ConfigurableEnumValue} in the config database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export const INTERACTION_TYPE_CONFIG_ID = "interaction-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/KeycloakUserDto.html b/documentation/interfaces/KeycloakUserDto.html new file mode 100644 index 0000000000..d40666c92a --- /dev/null +++ b/documentation/interfaces/KeycloakUserDto.html @@ -0,0 +1,682 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/session/auth/keycloak/keycloak-auth.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Extract of Keycloak user object as provided by the external Keycloak Service. +See https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_userrepresentation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            These fields overlap with our internal SessionInfo interface that is seen as abstracted from Keycloak.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + email + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + email: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + enabled + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + enabled: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + roles + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + roles: Role[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Role[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + username + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + username: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { environment } from "../../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { SessionInfo } from "../session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { KeycloakEventType, KeycloakService } from "keycloak-angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Logging } from "../../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { ParsedJWT, parseJwt } from "../../session-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { RemoteLoginNotAvailableError } from "./remote-login-not-available.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { switchMap } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Handles the remote session with keycloak
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class KeycloakAuthService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Users with this role can create and update other accounts.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static readonly ACCOUNT_MANAGER_ROLE = "account_manager";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  static readonly LAST_AUTH_KEY = "LAST_REMOTE_LOGIN";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private keycloakInitialised = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  accessToken: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private httpClient: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private keycloak: KeycloakService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Check for an existing session or forward to the login page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async login(): Promise<SessionInfo> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!this.keycloakInitialised) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      await this.initKeycloak();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    await this.keycloak.updateToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    let token = await this.keycloak.getToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!token) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      // Forward to the keycloak login page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      await this.keycloak.login({ redirectUri: location.href });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      token = await this.keycloak.getToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.processToken(token);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private async initKeycloak() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      await this.keycloak.init({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        config: window.location.origin + "/assets/keycloak.json",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        initOptions: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          onLoad: "check-sso",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          silentCheckSsoRedirectUri:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +            window.location.origin + "/assets/silent-check-sso.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // GitHub API rejects if non GitHub bearer token is present
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        shouldAddToken: ({ url }) => !url.includes("api.github.com"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        err?.error ===
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        "Timeout when waiting for 3rd party check iframe message."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // this is actually an expected scenario, user's internet is slow or not available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        err = new RemoteLoginNotAvailableError();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        Logging.error("Keycloak init failed", err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.keycloakInitialised = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    // auto-refresh expiring tokens, as suggested by https://github.com/mauriciovigolo/keycloak-angular?tab=readme-ov-file#keycloak-js-events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.keycloak.keycloakEvents$.subscribe((event) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (event.type == KeycloakEventType.OnTokenExpired) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.login().catch((err) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Logging.debug("automatic token refresh failed", err),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.keycloakInitialised = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private processToken(token: string): SessionInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!token) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      throw new Error("No token received from Keycloak");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.accessToken = token;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.logSuccessfulAuth();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const parsedToken: ParsedJWT = parseJwt(this.accessToken);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const sessionInfo: SessionInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      name: parsedToken.username ?? parsedToken.sub,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      id: parsedToken.sub,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      roles: parsedToken["_couchdb.roles"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      email: parsedToken.email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (parsedToken.username) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      sessionInfo.entityId = parsedToken.username.includes(":")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ? parsedToken.username
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        : // fallback for legacy config: manually add "User" entity prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          Entity.createPrefixedId("User", parsedToken.username);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        `User not linked with an entity (userId: ${sessionInfo.id} | ${sessionInfo.name})`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (parsedToken.email) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      sessionInfo.email = parsedToken.email;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return sessionInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Add the Bearer auth header to a existing header object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * @param headers
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  addAuthHeader(headers: any) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.accessToken) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      if (headers.set && typeof headers.set === "function") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // PouchDB headers are set as a map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        headers.set("Authorization", "Bearer " + this.accessToken);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        // Interceptor headers are set as a simple object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        headers["Authorization"] = "Bearer " + this.accessToken;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Forward to the keycloak logout endpoint to clear the session.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async logout() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return await this.keycloak.logout(location.href);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Open password reset page in browser.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Only works with internet connection.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  changePassword(): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.keycloak.login({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      action: "UPDATE_PASSWORD",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      redirectUri: location.href,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  async getUserinfo(): Promise<KeycloakUserDto> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const user = await this.keycloak.getKeycloakInstance().loadUserInfo();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return user as KeycloakUserDto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  setEmail(email: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.httpClient.put(`${environment.account_url}/account/set-email`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  createUser(user: Partial<KeycloakUserDto>): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.httpClient.post(`${environment.account_url}/account`, user);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  deleteUser(username: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.getUser(username).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      switchMap((value) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        this.httpClient.delete(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          `${environment.account_url}/account/${value.id}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  updateUser(userId: string, user: Partial<KeycloakUserDto>): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.httpClient.put(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      `${environment.account_url}/account/${userId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      user,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  getUser(username: string): Observable<KeycloakUserDto> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.httpClient.get<KeycloakUserDto>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      `${environment.account_url}/account/${username}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Get a list of all roles generally available in the user management system.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  getRoles(): Observable<Role[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return this.httpClient.get<Role[]>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      `${environment.account_url}/account/roles`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Log timestamp of last successful authentication
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  logSuccessfulAuth() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      KeycloakAuthService.LAST_AUTH_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      new Date().toISOString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Extract of Keycloak role object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * See {@link https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_rolerepresentation}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface Role {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  description: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Extract of Keycloak user object as provided by the external Keycloak Service.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * See {@link https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_userrepresentation}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * These fields overlap with our internal `SessionInfo` interface that is seen as abstracted from Keycloak.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface KeycloakUserDto {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  username: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  email: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  roles: Role[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  enabled: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MapConfig.html b/documentation/interfaces/MapConfig.html new file mode 100644 index 0000000000..37ee1cac35 --- /dev/null +++ b/documentation/interfaces/MapConfig.html @@ -0,0 +1,367 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/location/map-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              General configuration for the map integration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + countrycodes + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + countrycodes: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Countries, from which search results will be included +see https://nominatim.org/release-docs/develop/api/Search/#result-limitation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + start + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + start: [number, number] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : [number, number] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Start location of map if nothing was selected yet

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              export const MAP_CONFIG_KEY = "appConfig:map";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * General configuration for the map integration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface MapConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Countries, from which search results will be included
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * see {@link https://nominatim.org/release-docs/develop/api/Search/#result-limitation}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  countrycodes?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Start location of map if nothing was selected yet
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  start?: [number, number];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MapPopupConfig.html b/documentation/interfaces/MapPopupConfig.html new file mode 100644 index 0000000000..9993d025b6 --- /dev/null +++ b/documentation/interfaces/MapPopupConfig.html @@ -0,0 +1,739 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/location/map-popup/map-popup.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + disabled + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + disabled: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + displayedProperties + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + displayedProperties: LocationProperties + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : LocationProperties + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entities + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + entities: Observable<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Observable<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + entityClick + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + entityClick: Subject<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Subject<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + helpText + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + helpText: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Display a custom help text in the dialog to explain possible actions. +(Otherwise the default help is shown)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + highlightedEntities + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + highlightedEntities: Observable<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Observable<Entity[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + marked + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + marked: Coordinates[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : Coordinates[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + selectedLocation + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + selectedLocation: GeoLocation + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : GeoLocation + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                A single location that is selected and editable.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { Component, Inject } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Coordinates } from "../coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { BehaviorSubject, firstValueFrom, Observable, of, Subject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MapComponent } from "../map/map.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AsyncPipe } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { LocationProperties } from "../map/map-properties-popup/map-properties-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AddressSearchComponent } from "../address-search/address-search.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { GeoResult, GeoService } from "../geo.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { catchError, map } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AddressEditComponent } from "../address-edit/address-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface MapPopupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  marked?: Coordinates[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entities?: Observable<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  highlightedEntities?: Observable<Entity[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityClick?: Subject<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  disabled?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  displayedProperties?: LocationProperties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Display a custom help text in the dialog to explain possible actions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * (Otherwise the default help is shown)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  helpText?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * A single location that is selected and editable.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selectedLocation?: GeoLocation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A dialog to display an OpenStreetMap map with markers and optionally allow the user to select a location.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-map-popup",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./map-popup.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./map-popup.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MapComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    AddressSearchComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    AddressEditComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class MapPopupComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  markedLocations: BehaviorSubject<GeoResult[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  helpText: string = $localize`Search an address or click on the map directly to select a different location`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selectedLocation: GeoLocation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @Inject(MAT_DIALOG_DATA) public data: MapPopupConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private dialogRef: MatDialogRef<MapPopupComponent>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private geoService: GeoService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.markedLocations = new BehaviorSubject<GeoResult[]>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (data.marked as GeoResult[]) ?? [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.selectedLocation = data.selectedLocation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectedLocation &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !this.markedLocations.value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .filter((x) => !!x)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .includes(this.selectedLocation.geoLookup)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.markedLocations.next([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ...this.markedLocations.value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.selectedLocation.geoLookup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!data.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.dialogRef.disableClose = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (data.hasOwnProperty("helpText")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.helpText = data.helpText;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async mapClicked(newCoordinates: Coordinates) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.data.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const geoResult: GeoResult = await firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.lookupCoordinates(newCoordinates),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.updateLocation({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      geoLookup: geoResult,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      locationString: geoResult?.display_name,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private lookupCoordinates(coords: Coordinates) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!coords) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const fallback: GeoResult = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      display_name: $localize`[selected on map: ${coords.lat} - ${coords.lon}]`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ...coords,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.geoService.reverseLookup(coords).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      map((res) => (res["error"] ? fallback : res)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      catchError(() => of(fallback)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  updateLocation(event: GeoLocation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.selectedLocation = event;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.markedLocations.next(event?.geoLookup ? [event?.geoLookup] : []);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MappingDialogData.html b/documentation/interfaces/MappingDialogData.html new file mode 100644 index 0000000000..c0878a9453 --- /dev/null +++ b/documentation/interfaces/MappingDialogData.html @@ -0,0 +1,518 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/import/import-column-mapping/import-column-mapping.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + col + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + col: ColumnMapping + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : ColumnMapping + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + entityType: EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + values + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + values: any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ColumnMapping } from "../column-mapping";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityRegistry } from "../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatDialog } from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { HelpButtonComponent } from "../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { BasicAutocompleteComponent } from "../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatBadgeModule } from "@angular/material/badge";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ComponentRegistry } from "../../../dynamic-components";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DefaultDatatype } from "../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ImportColumnMappingService } from "./import-column-mapping.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Import sub-step: Let user map columns from import data to entity properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * and define value matching and transformations.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-import-column-mapping",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./import-column-mapping.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./import-column-mapping.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatBadgeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class ImportColumnMappingComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() rawData: any[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() columnMapping: ColumnMapping[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Output() columnMappingChange = new EventEmitter<ColumnMapping[]>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() set entityType(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.entityCtor = this.entities.get(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.dataTypeMap = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.allProps = [...this.entityCtor.schema.entries()]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .filter(([_, schema]) => schema.label)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map(([name, schema]) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.dataTypeMap[name] = this.schemaService.getDatatypeOrDefault(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          schema.dataType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return name;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private entityCtor: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** entity properties that have a label */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  allProps: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** properties that need further adjustments through a component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  dataTypeMap: { [name: string]: DefaultDatatype };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** warning label badges for a mapped column that requires user configuration for the "additional" details */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  mappingAdditionalWarning: { [key: string]: string } = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  labelMapper = (name: string) => this.entityCtor.schema.get(name).label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  isUsed = (option: string) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.columnMapping.some(({ propertyName }) => propertyName === option);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private componentRegistry: ComponentRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private importColumnMappingService: ImportColumnMappingService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (changes.columnMapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.importColumnMappingService.automaticallySelectMappings(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.columnMapping,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.entityCtor.schema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  async openMappingComponent(col: ColumnMapping) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const uniqueValues = new Set<any>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.rawData.forEach((obj) => uniqueValues.add(obj[col.column]));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const configComponent = await this.componentRegistry.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.dataTypeMap[col.propertyName].importConfigComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    )();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.dialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .open<any, MappingDialogData>(configComponent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          col: col,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          values: [...uniqueValues],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          entityType: this.entityCtor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        width: "80vw",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        disableClose: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .subscribe(() => this.updateMapping(col, true));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  updateMapping(col: ColumnMapping, settingAdditional: boolean = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!settingAdditional) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // reset additional, because mapping changed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      delete col.additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.mappingAdditionalWarning[col.column] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.dataTypeMap[
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        col.propertyName
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      ]?.importIncompleteAdditionalConfigBadge?.(col);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // Emitting copy of array to trigger change detection; values have been updated in place through data binding
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.columnMappingChange.emit([...this.columnMapping]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  // TODO: infer column mapping from data. The following is from old DataImportModule (#1942)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Try to guess mappings of import file columns to entity properties.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * (e.g. based on column headers)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private inferColumnPropertyMapping() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //const columnMap: ImportColumnMap = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //    for (const p of this.properties) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //      const match = this.importData?.fields.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //        (f) => f === p.label || f === p.key
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //      if (match) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //        columnMap[match] = p;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    //    this.loadColumnMapping(columnMap);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface MappingDialogData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  col: ColumnMapping;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  values: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MarkdownPageConfig.html b/documentation/interfaces/MarkdownPageConfig.html new file mode 100644 index 0000000000..e5758c2ae3 --- /dev/null +++ b/documentation/interfaces/MarkdownPageConfig.html @@ -0,0 +1,297 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/features/markdown-page/MarkdownPageConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Define through config what page should be displayed in an instance of the MarkdownPage component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + markdownFile + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + markdownFile: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    filepath to be loaded as markdown

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    export interface MarkdownPageConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** filepath to be loaded as markdown */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  markdownFile: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MatchingEntitiesConfig.html b/documentation/interfaces/MatchingEntitiesConfig.html new file mode 100644 index 0000000000..b5a3b71f7e --- /dev/null +++ b/documentation/interfaces/MatchingEntitiesConfig.html @@ -0,0 +1,626 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/features/matching-entities/matching-entities/matching-entities-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Config to be defined to set up a MatchingEntitiesComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + columns + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + columns: [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : [] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      mapped columns to be compared side-by-side between the two entities to match.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      e.g. [["name", "name"], ["motherTongue", "language"]]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + leftSide + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + leftSide: MatchingSideConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : MatchingSideConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      details of entities on this side of the matching view

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + matchActionLabel + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + matchActionLabel: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      overwrite the button label to describe the matching action

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + onMatch + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + onMatch: NewMatchAction + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : NewMatchAction + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      details of what is created when matching two entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + rightSide + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + rightSide: MatchingSideConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : MatchingSideConfig + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      details of entities on this side of the matching view

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + showMap + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + showMap: [string, string] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : [string, string] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Mapped properties which should be displayed in a map (of left and right entity). +The properties need to have the format { lat: number, lon: number}.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      e.g. `["address", "location"]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { FilterConfig } from "../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { Entity, EntityConstructor } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { ColumnConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DataFilter } from "../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + * Config to be defined to set up a MatchingEntitiesComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface MatchingEntitiesConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * mapped columns to be compared side-by-side between the two entities to match.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * e.g. [["name", "name"], ["motherTongue", "language"]]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  columns?: [string, string][];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * Mapped properties which should be displayed in a map (of left and right entity).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * The properties need to have the format `{ lat: number, lon: number}`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * e.g. `["address", "location"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  showMap?: [string, string];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** overwrite the button label to describe the matching action */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  matchActionLabel?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** details of what is created when matching two entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  onMatch?: NewMatchAction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** details of entities on this side of the matching view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  leftSide?: MatchingSideConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** details of entities on this side of the matching view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  rightSide?: MatchingSideConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface MatchingSideConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * entity type of matching, used to load a list of available entities for manual selection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  entityType?: EntityConstructor | string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** fixed pre-filters applied to remove some entities from the list of available entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  prefilter?: DataFilter<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** UI filter elements displayed for users to filter available entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  availableFilters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** columns of the available entities table. Usually inferred from matching columns of the component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  columns?: ColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface NewMatchAction {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** the entity type to be created on matching to represent the new match */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  newEntityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** name of the property on newEntityType that should take the id of the left matching entity */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  newEntityMatchPropertyLeft: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** name of the property on newEntityType that should take the id of the right matching entity */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  newEntityMatchPropertyRight: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * columns to display in a popup to review, edit and confirm during creation of a match.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * If undefined, match is created immediately without a popup form.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  columnsToReview?: ColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MatchingSide.html b/documentation/interfaces/MatchingSide.html new file mode 100644 index 0000000000..318c228df3 --- /dev/null +++ b/documentation/interfaces/MatchingSide.html @@ -0,0 +1,1005 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/features/matching-entities/matching-entities/matching-entities.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + MatchingSideConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + availableEntities + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + availableEntities: Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + distanceColumn + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + distanceColumn: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + entityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + entityType: EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : EntityConstructor + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + filterObj + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + filterObj: DataFilter<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : DataFilter<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        pass along filters from app-filter to subrecord component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + highlightedSelected + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + highlightedSelected: Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        item of selected that is currently highlighted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + multiSelect + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + multiSelect: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        whether this allows to select more than one selected match

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + selected + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + selected: Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : Entity[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + selectMatch + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + selectMatch: function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : function + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Entity, EntityConstructor } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityRegistry } from "../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MatchingEntitiesConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  MatchingSideConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  NewMatchAction,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "./matching-entities-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DynamicComponentConfig } from "../../../core/config/dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ActivatedRoute } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { addAlphaToHexColor } from "../../../utils/style-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { ConfigService } from "../../../core/config/config.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { NgForOf, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntityFieldViewComponent } from "../../../core/common-components/entity-field-view/entity-field-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { MapComponent } from "../../location/map/map.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FilterComponent } from "../../../core/filter/filter/filter.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { Coordinates } from "../../location/coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FilterService } from "../../../core/filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { LocationProperties } from "../../location/map/map-properties-popup/map-properties-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { getLocationProperties } from "../../location/map-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { FlattenArrayPipe } from "../../../utils/flatten-array/flatten-array.pipe";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +} from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { EntitiesTableComponent } from "../../../core/common-components/entities-table/entities-table.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { DataFilter } from "../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { GeoLocation } from "../../location/location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface MatchingSide extends MatchingSideConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** pass along filters from app-filter to subrecord component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  filterObj?: DataFilter<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  availableEntities?: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selectMatch?: (e) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** whether this allows to select more than one selected match */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  multiSelect: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selected?: Entity[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** item of `selected` that is currently highlighted */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  highlightedSelected: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  distanceColumn: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    coordinatesProperties: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    compareCoordinates: BehaviorSubject<Coordinates[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@RouteTarget("MatchingEntities")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@DynamicComponent("MatchingEntities")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  selector: "app-matching-entities",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  templateUrl: "./matching-entities.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  styleUrls: ["./matching-entities.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntitiesTableComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    EntityFieldViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    MapComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FilterComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    FlattenArrayPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class MatchingEntitiesComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static DEFAULT_CONFIG_KEY = "appConfig:matching-entities";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() leftSide: MatchingSideConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() rightSide: MatchingSideConfig = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Column mapping of property pairs of left and right entity that should be compared side by side.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() columns: [ColumnConfig, ColumnConfig][] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  matchActionLabel: string = $localize`:Matching button label:create matching`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @Input() onMatch: NewMatchAction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  @ViewChild("matchComparison", { static: true })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  matchComparisonElement: ElementRef;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  columnsToDisplay = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  lockedMatching = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  sideDetails: [MatchingSide, MatchingSide];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  mapVisible = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  filteredMapEntities: Entity[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  displayedLocationProperties: LocationProperties = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private route: ActivatedRoute,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityMapper: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private configService: ConfigService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    private changeDetector: ChangeDetectorRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const config: MatchingEntitiesConfig =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.configService.getConfig<MatchingEntitiesConfig>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        MatchingEntitiesComponent.DEFAULT_CONFIG_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ) ?? {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    Object.assign(this, JSON.parse(JSON.stringify(config)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.route.data.subscribe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (data: DynamicComponentConfig<MatchingEntitiesConfig>) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          !data?.config?.leftSide &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          !data?.config?.rightSide &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          !data?.config?.columns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        Object.assign(this, JSON.parse(JSON.stringify(data.config)));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  // TODO: fill selection on hover already?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.sideDetails = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      await this.initSideDetails(this.leftSide, 0),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      await this.initSideDetails(this.rightSide, 1),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.sideDetails.forEach((side, index) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.initDistanceColumn(side, index),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.filterMapEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.columnsToDisplay = ["side-0", "side-1"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // needed due to async
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.changeDetector.detectChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Generate setup for a side of the matching view template based on the component input properties.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param side
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param sideIndex
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private async initSideDetails(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    side: MatchingSideConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    sideIndex: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Promise<MatchingSide> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const newSide = Object.assign({}, side) as MatchingSide; // we are transforming it into this type here
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!newSide.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.selected = newSide.selected ?? [this.entity];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.highlightedSelected = newSide.selected[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.entityType = newSide.highlightedSelected?.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let entityType = newSide.entityType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (typeof entityType === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      entityType = this.entityRegistry.get(entityType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newSide.entityType =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      entityType ?? newSide.highlightedSelected?.getConstructor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newSide.columns =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.columns ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.columns.map((p) => p[sideIndex]).filter((c) => !!c);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newSide.multiSelect = this.checkIfMultiSelect(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.onMatch.newEntityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      sideIndex === 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ? this.onMatch.newEntityMatchPropertyLeft
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        : this.onMatch.newEntityMatchPropertyRight,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (newSide.multiSelect) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.selectMatch = this.getMultiSelectFunction(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.selectMatch = this.getSingleSelectFunction(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!newSide.selected && newSide.entityType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.availableEntities = await this.entityMapper.loadType(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newSide.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.availableFilters = newSide.availableFilters ?? [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.filterObj = { ...(side.prefilter ?? {}) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.mapVisible =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.mapVisible || getLocationProperties(newSide.entityType).length > 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return newSide;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private checkIfMultiSelect(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    onMatchEntityType: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    onMatchProperty: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const schemaField = this.entityRegistry
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .get(onMatchEntityType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .schema.get(onMatchProperty);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return schemaField.isArray;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getMultiSelectFunction(newSide: MatchingSide) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return (e: Entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (!newSide.selected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newSide.selected = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (newSide.selected.includes(e)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        // unselect
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.highlightSelectedRow(e, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newSide.selected = newSide.selected.filter((s) => s !== e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        if (newSide.highlightedSelected === e) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          newSide.highlightedSelected = newSide.selected[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.highlightSelectedRow(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newSide.selected = [...newSide.selected, e];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newSide.highlightedSelected = e;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.matchComparisonElement.nativeElement.scrollIntoView();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.updateDistanceColumn(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getSingleSelectFunction(newSide: MatchingSide) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return (e: Entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.highlightSelectedRow(e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (newSide.highlightedSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.highlightSelectedRow(newSide.highlightedSelected, true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.selected = [e];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSide.highlightedSelected = e;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.matchComparisonElement.nativeElement.scrollIntoView();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.updateDistanceColumn(newSide);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private highlightSelectedRow(newSelectedEntity: Entity, unHighlight = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (unHighlight) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSelectedEntity.getColor =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        newSelectedEntity.getConstructor().prototype.getColor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newSelectedEntity.getColor = () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        addAlphaToHexColor(newSelectedEntity.getConstructor().color, 0.2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async createMatch() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const newMatchEntity = new (this.entityRegistry.get(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.onMatch.newEntityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    ))();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const leftMatch = this.sideDetails[0].selected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const rightMatch = this.sideDetails[1].selected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newMatchEntity[this.onMatch.newEntityMatchPropertyLeft] = this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .sideDetails[0].multiSelect
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ? leftMatch.map((e) => e.getId())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      : leftMatch[0].getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newMatchEntity[this.onMatch.newEntityMatchPropertyRight] = this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .sideDetails[1].multiSelect
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ? rightMatch.map((e) => e.getId())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      : rightMatch[0].getId();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    // best guess properties (if they do not exist on the specific entity, the values will be discarded during save
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newMatchEntity["date"] = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newMatchEntity["start"] = new Date();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    newMatchEntity["name"] =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      newMatchEntity.getConstructor().label +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      leftMatch.map((e) => e.toString()).join(", ") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      " - " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      rightMatch.map((e) => e.toString()).join(", ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (this.onMatch.columnsToReview) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.formDialog
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .openFormPopup(newMatchEntity, this.onMatch.columnsToReview)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .afterClosed()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .subscribe((result) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          if (result instanceof newMatchEntity.getConstructor()) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            this.lockedMatching = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      await this.entityMapper.save(newMatchEntity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.lockedMatching = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  applySelectedFilters(side: MatchingSide, filter: DataFilter<Entity>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    side.filterObj = { ...side.prefilter, ...filter };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.filterMapEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private filterMapEntities() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.filteredMapEntities = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.sideDetails.forEach((side) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (side.filterObj) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const predicate = this.filterService.getFilterPredicate(side.filterObj);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const filtered = side.availableEntities.filter(predicate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.filteredMapEntities.push(...filtered);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.filteredMapEntities.push(...(side.availableEntities ?? []));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityInMapClicked(entity: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const side = this.sideDetails.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      (s) => s.entityType === entity.getConstructor(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (side) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      side.selectMatch(entity);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Initialize distance column for columns of side and columns of EntitySubrecord
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param side
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param index of the side
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private initDistanceColumn(side: MatchingSide, index: number) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const sideIndex = side.columns.findIndex((col) => col === "distance");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (sideIndex !== -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const columnConfig = this.getDistanceColumnConfig(side);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      side.columns[sideIndex] = columnConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      side.distanceColumn = columnConfig.additional;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const colIndex = this.columns.findIndex(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (row) => row[index] === "distance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (colIndex !== -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.columns[colIndex][index] = columnConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getDistanceColumnConfig(side: MatchingSide): FormFieldConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      id: "distance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      label: $localize`:Matching View column name:Distance`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      viewComponent: "DisplayDistance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      additional: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        coordinatesProperties:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          this.displayedLocationProperties[side.entityType.ENTITY_TYPE],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        compareCoordinates: new BehaviorSubject<Coordinates[]>([]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  updateMarkersAndDistances() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    this.sideDetails.forEach((side) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const sideProperties =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.displayedLocationProperties[side.entityType.ENTITY_TYPE];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (side.distanceColumn) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        side.distanceColumn.coordinatesProperties = sideProperties;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        const lastValue = side.distanceColumn.compareCoordinates.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        side.distanceColumn.compareCoordinates.next(lastValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      if (side.highlightedSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.updateDistanceColumn(side);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private updateDistanceColumn(side: MatchingSide) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const locationProperties =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.displayedLocationProperties[side.highlightedSelected?.getType()];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const otherIndex = this.sideDetails[0] === side ? 1 : 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    const distanceColumn = this.sideDetails[otherIndex].distanceColumn;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (locationProperties && distanceColumn) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      const coordinates: Coordinates[] = locationProperties.map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        (prop) => (side.highlightedSelected[prop] as GeoLocation)?.geoLookup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      distanceColumn.compareCoordinates.next(coordinates);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MatchingSideConfig.html b/documentation/interfaces/MatchingSideConfig.html new file mode 100644 index 0000000000..f2b0bc9bab --- /dev/null +++ b/documentation/interfaces/MatchingSideConfig.html @@ -0,0 +1,514 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/matching-entities/matching-entities/matching-entities-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + availableFilters + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + availableFilters: FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : FilterConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          UI filter elements displayed for users to filter available entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + columns + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + columns: ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          columns of the available entities table. Usually inferred from matching columns of the component

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + entityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + entityType: EntityConstructor | string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : EntityConstructor | string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          entity type of matching, used to load a list of available entities for manual selection

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + prefilter + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + prefilter: DataFilter<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : DataFilter<Entity> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          fixed pre-filters applied to remove some entities from the list of available entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { FilterConfig } from "../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity, EntityConstructor } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ColumnConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DataFilter } from "../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Config to be defined to set up a MatchingEntitiesComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface MatchingEntitiesConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * mapped columns to be compared side-by-side between the two entities to match.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * e.g. [["name", "name"], ["motherTongue", "language"]]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  columns?: [string, string][];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Mapped properties which should be displayed in a map (of left and right entity).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The properties need to have the format `{ lat: number, lon: number}`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * e.g. `["address", "location"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  showMap?: [string, string];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** overwrite the button label to describe the matching action */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  matchActionLabel?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** details of what is created when matching two entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  onMatch?: NewMatchAction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** details of entities on this side of the matching view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  leftSide?: MatchingSideConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** details of entities on this side of the matching view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  rightSide?: MatchingSideConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface MatchingSideConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * entity type of matching, used to load a list of available entities for manual selection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entityType?: EntityConstructor | string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** fixed pre-filters applied to remove some entities from the list of available entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  prefilter?: DataFilter<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** UI filter elements displayed for users to filter available entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  availableFilters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** columns of the available entities table. Usually inferred from matching columns of the component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  columns?: ColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface NewMatchAction {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** the entity type to be created on matching to represent the new match */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  newEntityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** name of the property on newEntityType that should take the id of the left matching entity */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  newEntityMatchPropertyLeft: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** name of the property on newEntityType that should take the id of the right matching entity */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  newEntityMatchPropertyRight: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * columns to display in a popup to review, edit and confirm during creation of a match.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * If undefined, match is created immediately without a popup form.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  columnsToReview?: ColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/MenuItem.html b/documentation/interfaces/MenuItem.html new file mode 100644 index 0000000000..9ec4be9ee7 --- /dev/null +++ b/documentation/interfaces/MenuItem.html @@ -0,0 +1,411 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/ui/navigation/menu-item.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Structure for menu items to be displayed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + icon + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + icon: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The icon to be displayed left of the label.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The text to be displayed in the menu.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + link + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + link: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The url fragment to which the item will route to (e.g. '/dashboard')

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            export interface MenuItem {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The text to be displayed in the menu.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The icon to be displayed left of the label.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  icon?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The url fragment to which the item will route to (e.g. '/dashboard')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  link: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * Object specifying overall navigation menu
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * as stored in the config database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface NavigationMenuConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  items: MenuItem[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/NavigationMenuConfig.html b/documentation/interfaces/NavigationMenuConfig.html new file mode 100644 index 0000000000..5dd3ecd238 --- /dev/null +++ b/documentation/interfaces/NavigationMenuConfig.html @@ -0,0 +1,310 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/ui/navigation/menu-item.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Object specifying overall navigation menu +as stored in the config database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + items + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + items: MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              export interface MenuItem {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The text to be displayed in the menu.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The icon to be displayed left of the label.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  icon?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The url fragment to which the item will route to (e.g. '/dashboard')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  link: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Object specifying overall navigation menu
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * as stored in the config database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface NavigationMenuConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  items: MenuItem[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/NewMatchAction.html b/documentation/interfaces/NewMatchAction.html new file mode 100644 index 0000000000..87a303cbd1 --- /dev/null +++ b/documentation/interfaces/NewMatchAction.html @@ -0,0 +1,497 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/features/matching-entities/matching-entities/matching-entities-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + columnsToReview + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + columnsToReview: ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : ColumnConfig[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                columns to display in a popup to review, edit and confirm during creation of a match. +If undefined, match is created immediately without a popup form.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + newEntityMatchPropertyLeft + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + newEntityMatchPropertyLeft: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                name of the property on newEntityType that should take the id of the left matching entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + newEntityMatchPropertyRight + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + newEntityMatchPropertyRight: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                name of the property on newEntityType that should take the id of the right matching entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + newEntityType + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + newEntityType: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                the entity type to be created on matching to represent the new match

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import { FilterConfig } from "../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ColumnConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DataFilter } from "../../../core/filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Config to be defined to set up a MatchingEntitiesComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface MatchingEntitiesConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * mapped columns to be compared side-by-side between the two entities to match.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * e.g. [["name", "name"], ["motherTongue", "language"]]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  columns?: [string, string][];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Mapped properties which should be displayed in a map (of left and right entity).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * The properties need to have the format `{ lat: number, lon: number}`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * e.g. `["address", "location"]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  showMap?: [string, string];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** overwrite the button label to describe the matching action */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  matchActionLabel?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** details of what is created when matching two entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  onMatch?: NewMatchAction;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** details of entities on this side of the matching view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  leftSide?: MatchingSideConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** details of entities on this side of the matching view */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  rightSide?: MatchingSideConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface MatchingSideConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * entity type of matching, used to load a list of available entities for manual selection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  entityType?: EntityConstructor | string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** fixed pre-filters applied to remove some entities from the list of available entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  prefilter?: DataFilter<Entity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** UI filter elements displayed for users to filter available entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  availableFilters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** columns of the available entities table. Usually inferred from matching columns of the component */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  columns?: ColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface NewMatchAction {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** the entity type to be created on matching to represent the new match */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  newEntityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** name of the property on newEntityType that should take the id of the left matching entity */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  newEntityMatchPropertyLeft: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** name of the property on newEntityType that should take the id of the right matching entity */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  newEntityMatchPropertyRight: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * columns to display in a popup to review, edit and confirm during creation of a match.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * If undefined, match is created immediately without a popup form.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  columnsToReview?: ColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/NotesDashboardConfig.html b/documentation/interfaces/NotesDashboardConfig.html new file mode 100644 index 0000000000..e5a83a4ce1 --- /dev/null +++ b/documentation/interfaces/NotesDashboardConfig.html @@ -0,0 +1,608 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/child-dev-project/notes/dashboard-widgets/notes-dashboard/notes-dashboard.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + entity: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + fromBeginningOfWeek + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + fromBeginningOfWeek: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + mode + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + mode: "with-recent-notes" | "without-recent-notes" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : "with-recent-notes" | "without-recent-notes" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + sinceDays + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + sinceDays: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ChildrenService } from "../../../children/children.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityRegistry } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityConstructor } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DecimalPipe, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { EntityBlockComponent } from "../../../../core/basic-datatypes/entity/entity-block/entity-block.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DashboardWidget } from "../../../../core/dashboard/dashboard-widget/dashboard-widget";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Note } from "../../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +interface NotesDashboardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entity?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  sinceDays?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  fromBeginningOfWeek?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  mode?: "with-recent-notes" | "without-recent-notes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Dashboard Widget displaying entities that do not have a recently added Note.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * If you do not set "sinceDays" of "fromBeginningOfWeek" inputs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * by default notes since beginning of the current week are considered.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@DynamicComponent("NotesDashboard")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  selector: "app-no-recent-notes-dashboard",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  templateUrl: "./notes-dashboard.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  styleUrls: ["./notes-dashboard.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    EntityBlockComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    DecimalPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    DashboardListWidgetComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class NotesDashboardComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  extends DashboardWidget
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  implements OnInit, NotesDashboardConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  static override getRequiredEntities(config: NotesDashboardConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return config?.entity || Note.ENTITY_TYPE;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Entity for which the recent notes should be counted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() set entity(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this._entity = this.entities.get(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  _entity: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * number of days since last note that entities should be considered having a "recent" note.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() sinceDays = 0;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** Whether an additional offset should be automatically added to include notes from the beginning of the week */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() fromBeginningOfWeek = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  @Input() mode: "with-recent-notes" | "without-recent-notes";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Entities displayed in the template with additional "daysSinceLastNote" field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entries: EntityWithRecentNoteInfo[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  subtitle: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private childrenService: ChildrenService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    private entities: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!this._entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.entity = "Child";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    let dayRangeBoundary = this.sinceDays;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.fromBeginningOfWeek) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      dayRangeBoundary += moment().diff(moment().startOf("week"), "days");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    switch (this.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case "with-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          (stat) => stat[1] <= dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.subtitle = $localize`:Subtitle|Subtitle informing the user that these are the entities with recent reports:${this._entity.labelPlural} with recent report`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case "without-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          (stat) => stat[1] >= dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          dayRangeBoundary,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this.subtitle = $localize`:Subtitle|Subtitle informing the user that these are the entities without recent reports:${this._entity.labelPlural} having no recent reports`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private async loadConcernedEntities(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    filter: (stat: [string, number]) => boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    dayRangeBoundary: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const queryRange = Math.round((dayRangeBoundary * 3) / 10) * 10; // query longer range to be able to display exact date of last note for recent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    // recent notes are sorted ascending, without recent notes descending
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const order = this.mode === "with-recent-notes" ? -1 : 1;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const recentNotesMap =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      await this.childrenService.getDaysSinceLastNoteOfEachEntity(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        this._entity.ENTITY_TYPE,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        queryRange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.entries = Array.from(recentNotesMap)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .filter(filter)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .map((stat) => statsToEntityWithRecentNoteInfo(stat, queryRange))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      .sort((a, b) => order * (b.daysSinceLastNote - a.daysSinceLastNote));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  get tooltip(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    switch (this.mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case "with-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return $localize`:Tooltip|Spaces in front of the variables are added automatically:includes cases with a note${this.sinceBeginningOfTheWeek}:sinceBeginningOfWeek:${this.withinTheLastNDays}:withinTheLastDays:`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case "without-recent-notes":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return $localize`:Tooltip|Spaces in front of the variables are added automatically:includes cases without a note${this.sinceBeginningOfTheWeek}:sinceBeginningOfWeek:${this.withinTheLastNDays}:withinTheLastDays:`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  get sinceBeginningOfTheWeek(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.fromBeginningOfWeek) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        $localize`:Tooltip-part|'includes cases without a note since the beginning of the week':since the beginning of the week`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  get withinTheLastNDays(): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (this.sinceDays > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        " " +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        $localize`:Tooltip-part|'includes cases without a note within the last x days':without a note within the last ${this.sinceDays} days`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * details on entity stats to be displayed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +interface EntityWithRecentNoteInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entityId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  daysSinceLastNote: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** true when the daysSinceLastNote is not accurate but was cut off for performance optimization */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  moreThanDaysSince: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Map a result entry from getDaysSinceLastNoteOfEachEntity to the EntityWithRecentNoteInfo interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * @param stat Array of [entityId, daysSinceLastNote]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * @param queryRange The query range (the maximum of days that exactly calculated)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +function statsToEntityWithRecentNoteInfo(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  stat: [string, number],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  queryRange: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +): EntityWithRecentNoteInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (stat[1] < Number.POSITIVE_INFINITY) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      entityId: stat[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      daysSinceLastNote: stat[1],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      moreThanDaysSince: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      entityId: stat[0],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      daysSinceLastNote: queryRange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      moreThanDaysSince: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/NotesManagerConfig.html b/documentation/interfaces/NotesManagerConfig.html new file mode 100644 index 0000000000..16beb5bc07 --- /dev/null +++ b/documentation/interfaces/NotesManagerConfig.html @@ -0,0 +1,468 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/child-dev-project/notes/notes-manager/notes-manager.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    additional config specifically for NotesManagerComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + includeEventNotes + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + includeEventNotes: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    whether to also load EventNote entities in addition to Note entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + showEventNotesToggle + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + showEventNotesToggle: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    whether a toggle control is displayed to users, allowing to change the "includeEventNotes" state

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Component, Input, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Note } from "../model/note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EntityListComponent } from "../../../core/entity-list/entity-list/entity-list.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { applyUpdate } from "../../../core/entity/model/entity-update";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ColumnGroupsConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  FilterConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +} from "../../../core/entity-list/EntityListConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { EventNote } from "../../attendance/model/event-note";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { merge } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Angulartics2Module } from "angulartics2";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { MatMenuModule } from "@angular/material/menu";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FaDynamicIconComponent } from "../../../core/common-components/fa-dynamic-icon/fa-dynamic-icon.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { RouteTarget } from "../../../route-target";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ExportColumnConfig } from "../../../core/export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * additional config specifically for NotesManagerComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface NotesManagerConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** whether to also load EventNote entities in addition to Note entities */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  includeEventNotes?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /** whether a toggle control is displayed to users, allowing to change the "includeEventNotes" state */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  showEventNotesToggle?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@RouteTarget("NotesManager")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  selector: "app-notes-manager",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  templateUrl: "./notes-manager.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    EntityListComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    Angulartics2Module,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    MatMenuModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    FaDynamicIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class NotesManagerComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  // inputs to be passed through to EntityList
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() defaultSort: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() exportConfig: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() showInactive: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() title = "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() columns: (FormFieldConfig | string)[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() columnGroups: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() filters: FilterConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() includeEventNotes: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  @Input() showEventNotesToggle: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entityConstructor = Note;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  notes: Note[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    private entityMapperService: EntityMapperService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.notes = await this.loadEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.subscribeEntityUpdates();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private async loadEntities(): Promise<Note[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    let notes = await this.entityMapperService.loadType(Note);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    if (this.includeEventNotes) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      const eventNotes = await this.entityMapperService.loadType(EventNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      notes = notes.concat(eventNotes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return notes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  private subscribeEntityUpdates() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    merge(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.entityMapperService.receiveUpdates(Note),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      this.entityMapperService.receiveUpdates(EventNote),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      .subscribe((updatedNote) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          !this.includeEventNotes &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          updatedNote?.entity?.getType() === EventNote.ENTITY_TYPE
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +          return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +        this.notes = applyUpdate(this.notes, updatedNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  async updateIncludeEvents() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.includeEventNotes = !this.includeEventNotes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.notes = await this.loadEntities();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  addNoteClick() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    const newNote = new Note(Date.now().toString());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.showDetails(newNote);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  showDetails(entity: Note) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    this.formDialog.openView(entity, "NoteDetails");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ObservableMatchers.html b/documentation/interfaces/ObservableMatchers.html new file mode 100644 index 0000000000..7c1b269949 --- /dev/null +++ b/documentation/interfaces/ObservableMatchers.html @@ -0,0 +1,367 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/utils/test-utils/observable-utils.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + first + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + first: jasmine.AsyncMatchers<T | any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : jasmine.AsyncMatchers<T | any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      only check for the first value if an observable +and discard the rest

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + inSequence + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + inSequence: jasmine.AsyncMatchers<T[] | any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : jasmine.AsyncMatchers<T[] | any> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      check for all observables in the sequence that they +arrived

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { firstValueFrom, Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { toArray } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface ObservableMatchers<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * only check for the first value if an observable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * and discard the rest
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  first: jasmine.AsyncMatchers<T, any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * check for all observables in the sequence that they
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   * arrived
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  inSequence: jasmine.AsyncMatchers<T[], any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export function expectObservable<T>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  observable: Observable<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +): ObservableMatchers<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  return new ObservableMatchersImpl(observable);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +class ObservableMatchersImpl<T> implements ObservableMatchers<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  constructor(private observable: Observable<T>) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  get first(): jasmine.AsyncMatchers<T, any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return expectAsync(firstValueFrom(this.observable));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  get inSequence(): jasmine.AsyncMatchers<T[], any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return expectAsync(firstValueFrom(this.observable.pipe(toArray())));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/Panel.html b/documentation/interfaces/Panel.html new file mode 100644 index 0000000000..330de383ff --- /dev/null +++ b/documentation/interfaces/Panel.html @@ -0,0 +1,415 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/entity-details/EntityDetailsConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A panel is a simple accordion that can be expanded and closed. +It can hold multiple components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + components + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + components: PanelComponent[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : PanelComponent[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The configurations for the components in this panel.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + title + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + title: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The title of this panel. This should group the contained components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * The configuration for an entity details page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface EntityDetailsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The name of the entity (according to the ENTITY_TYPE).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The configuration for the panels on this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  panels: Panel[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * A panel is a simple accordion that can be expanded and closed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * It can hold multiple components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface Panel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The title of this panel. This should group the contained components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The configurations for the components in this panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  components: PanelComponent[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * The configuration for a component displayed inside a panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface PanelComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * An optional second title for only this component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The name of the component. When registered, this usually is the name of the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * component without the `component` suffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  component: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * An addition config which will be passed to the component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  config?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This interface represents the config which will be created by the entity-details component and passed to each of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * the panel components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * This is not config that is defined and stored in the config file for customization.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface PanelConfig<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The full entity which is displayed in this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Whether this entity has been newly created.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  creatingNew?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * An additional config which has been defined in the PanelComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  config?: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/PanelComponent.html b/documentation/interfaces/PanelComponent.html new file mode 100644 index 0000000000..21e432d2dc --- /dev/null +++ b/documentation/interfaces/PanelComponent.html @@ -0,0 +1,472 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/entity-details/EntityDetailsConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The configuration for a component displayed inside a panel.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + component + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + component: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The name of the component. When registered, this usually is the name of the +component without the component suffix

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + config + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + config: any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          An addition config which will be passed to the component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + title + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + title: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          An optional second title for only this component.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * The configuration for an entity details page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface EntityDetailsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The name of the entity (according to the ENTITY_TYPE).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The configuration for the panels on this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  panels: Panel[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * A panel is a simple accordion that can be expanded and closed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * It can hold multiple components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface Panel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The title of this panel. This should group the contained components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The configurations for the components in this panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  components: PanelComponent[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * The configuration for a component displayed inside a panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface PanelComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * An optional second title for only this component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The name of the component. When registered, this usually is the name of the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * component without the `component` suffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  component: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * An addition config which will be passed to the component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  config?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This interface represents the config which will be created by the entity-details component and passed to each of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * the panel components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * This is not config that is defined and stored in the config file for customization.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface PanelConfig<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The full entity which is displayed in this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Whether this entity has been newly created.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  creatingNew?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * An additional config which has been defined in the PanelComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  config?: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/PanelConfig.html b/documentation/interfaces/PanelConfig.html new file mode 100644 index 0000000000..9135736ce0 --- /dev/null +++ b/documentation/interfaces/PanelConfig.html @@ -0,0 +1,473 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/entity-details/EntityDetailsConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This interface represents the config which will be created by the entity-details component and passed to each of +the panel components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This is not config that is defined and stored in the config file for customization.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + config + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + config: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            An additional config which has been defined in the PanelComponent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + creatingNew + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + creatingNew: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Whether this entity has been newly created.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + entity: Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : Entity + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The full entity which is displayed in this details page.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Entity } from "../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * The configuration for an entity details page
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface EntityDetailsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The name of the entity (according to the ENTITY_TYPE).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entityType: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The configuration for the panels on this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  panels: Panel[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * A panel is a simple accordion that can be expanded and closed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * It can hold multiple components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface Panel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The title of this panel. This should group the contained components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The configurations for the components in this panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  components: PanelComponent[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * The configuration for a component displayed inside a panel.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface PanelComponent {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * An optional second title for only this component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The name of the component. When registered, this usually is the name of the
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * component without the `component` suffix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  component: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * An addition config which will be passed to the component.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  config?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This interface represents the config which will be created by the entity-details component and passed to each of
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * the panel components.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + * This is not config that is defined and stored in the config file for customization.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface PanelConfig<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * The full entity which is displayed in this details page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  entity: Entity;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * Whether this entity has been newly created.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  creatingNew?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   * An additional config which has been defined in the PanelComponent.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  config?: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ParsedData.html b/documentation/interfaces/ParsedData.html new file mode 100644 index 0000000000..7099e363f1 --- /dev/null +++ b/documentation/interfaces/ParsedData.html @@ -0,0 +1,452 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/common-components/input-file/input-file.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Results and (optional) meta data about data parsed from a file.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + data + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + data: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              object or array of objects parsed from a file

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + fields + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + fields: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              meta information listing the fields contained in data objects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Component, EventEmitter, Input, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { readFile } from "../../../utils/utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Papa } from "ngx-papaparse";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FormControl, ReactiveFormsModule } from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatFormFieldModule } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Form Field to select and parse a file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Currently only supports CSV.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  selector: "app-input-file",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  templateUrl: "./input-file.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatFormFieldModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class InputFileComponent<T = any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** returns parsed data as an object on completing load after user selects a file */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Output() fileLoad = new EventEmitter<ParsedData<T>>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @Input() fileType: "csv" | "json";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  parsedData: ParsedData<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  formControl = new FormControl();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(private papa: Papa) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async loadFile($event: Event): Promise<void> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.formControl.reset();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const file = this.getFileFromInputEvent($event, this.fileType);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.formControl.setValue(file.name);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const fileContent = await readFile(file);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.parsedData = this.parseContent(fileContent);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.fileLoad.emit(this.parsedData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } catch (errors) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.formControl.setErrors(errors);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.formControl.markAsTouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private getFileFromInputEvent(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    inputEvent: Event,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    allowedFileType?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ): File {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const target = inputEvent.target as HTMLInputElement;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const file = target.files[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      allowedFileType &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      !file.name.toLowerCase().endsWith("." + allowedFileType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw { fileInvalid: `Only ${this.fileType} files are supported` };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return file;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private parseContent(fileContent: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.fileType === "csv") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      const papaParsed = this.papa.parse(fileContent, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        header: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        dynamicTyping: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        skipEmptyLines: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      result = { data: papaParsed.data, fields: papaParsed.meta.fields };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else if (this.fileType === "json") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      result = { data: JSON.parse(fileContent) };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (result === undefined) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw { parsingError: "File could not be parsed" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (result.data.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw { parsingError: "File has no content" };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return result;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Results and (optional) meta data about data parsed from a file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface ParsedData<T = any[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** object or array of objects parsed from a file */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  data: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** meta information listing the fields contained in data objects */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  fields?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ParsedJWT.html b/documentation/interfaces/ParsedJWT.html new file mode 100644 index 0000000000..bd3a238a62 --- /dev/null +++ b/documentation/interfaces/ParsedJWT.html @@ -0,0 +1,432 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/session/session-utils.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                JSON interface as returned by Keycloak in the access_token.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + _couchdb.roles + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + _couchdb.roles: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + email + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + email: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + sub + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + sub: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + username + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + username: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                export interface ParsedJWT {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // keycloak user ID
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  sub: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // keycloak `exact_username` attribute
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  username: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // email of keycloak user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  email: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // roles according to couchdb format
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  "_couchdb.roles": string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Parses and returns the payload of a JWT into a JSON object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * For me info see {@link https://jwt.io}.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * @param token a valid JWT
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export function parseJwt(token): ParsedJWT {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  const base64Url = token.split(".")[1];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  const jsonPayload = decodeURIComponent(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    window
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .atob(base64)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .split("")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .join(""),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  return JSON.parse(jsonPayload);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/PrebuiltFilterConfig-1.html b/documentation/interfaces/PrebuiltFilterConfig-1.html new file mode 100644 index 0000000000..97b900ccda --- /dev/null +++ b/documentation/interfaces/PrebuiltFilterConfig-1.html @@ -0,0 +1,395 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + BasicFilterConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + options + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + options: FilterSelectionOption<T>[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : FilterSelectionOption<T>[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/PrebuiltFilterConfig.html b/documentation/interfaces/PrebuiltFilterConfig.html new file mode 100644 index 0000000000..f7f5171128 --- /dev/null +++ b/documentation/interfaces/PrebuiltFilterConfig.html @@ -0,0 +1,395 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity-list/EntityListConfig.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + BasicFilterConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + options + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + options: FilterSelectionOption<T>[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : FilterSelectionOption<T>[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { FilterSelectionOption } from "../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { FormFieldConfig } from "../common-components/entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { ExportColumnConfig } from "../export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { Sort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { unitOfTime } from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface EntityListConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Title that is shown on top of the component
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  title?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Select which entities should be displayed in the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * (optional) This is only used and necessary if EntityListComponent is used directly in config
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entityType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Custom overwrites or additional columns to be displayed in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * If any special columns aside from the entity's fields are needed, add them here.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Fields of the entity type are available automatically.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columns?: (FormFieldConfig | string)[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config for which columns are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * By default, all columns are shown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columnGroups?: ColumnGroupsConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config for available filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is no filters.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  filters?: FilterConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional initial sort order.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is to sort by the first column.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  defaultSort?: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Optional config defining what fields are included in exports.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  exportConfig?: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ColumnGroupsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  groups: GroupConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The name of the group that should be selected by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The name of the group that should be selected by default on a mobile device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Default is the name of the first group.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  mobile?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface GroupConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  columns: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export type FilterConfig<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | BasicFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | BooleanFilterConfig
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | PrebuiltFilterConfig<T>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  | ConfigurableEnumFilterConfig<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  type?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  default?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface BooleanFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  true: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  false: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface DateRangeFilterConfig extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: DateRangeFilterConfigOption[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface DateRangeFilterConfigOption {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  startOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  endOffsets?: { amount: number; unit: unitOfTime.Base }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface PrebuiltFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  options: FilterSelectionOption<T>[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface ConfigurableEnumFilterConfig<T> extends BasicFilterConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  enumId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ProgressDashboardPart.html b/documentation/interfaces/ProgressDashboardPart.html new file mode 100644 index 0000000000..67bc998350 --- /dev/null +++ b/documentation/interfaces/ProgressDashboardPart.html @@ -0,0 +1,385 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/features/dashboard-widgets/progress-dashboard-widget/progress-dashboard/progress-dashboard-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + currentValue + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + currentValue: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + targetValue + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + targetValue: number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : number + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { Entity } from "../../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DatabaseEntity } from "../../../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +import { DatabaseField } from "../../../../core/entity/database-field.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +@DatabaseEntity("ProgressDashboardConfig")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export class ProgressDashboardConfig extends Entity {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @DatabaseField() title: string = $localize`Progress Widget`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  @DatabaseField({ isArray: true }) parts: Array<ProgressDashboardPart> = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  getTotalPercentage() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const currentTotal = this.parts.reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      (acc, entry) => acc + entry.currentValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    const targetTotal = this.parts.reduce(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      (acc, entry) => acc + entry.targetValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    return currentTotal / targetTotal;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface ProgressDashboardPart {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  currentValue: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  targetValue: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ReportCalculation.html b/documentation/interfaces/ReportCalculation.html new file mode 100644 index 0000000000..fd0720e4d1 --- /dev/null +++ b/documentation/interfaces/ReportCalculation.html @@ -0,0 +1,702 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/features/reporting/sql-report/sql-report.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + args + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + args: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + endDate + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + endDate: string | null + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string | null + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + outcome + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + outcome: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + report + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + report: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + startDate + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + startDate: string | null + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string | null + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + status + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + status: "PENDING" | "RUNNING" | "FINISHED_SUCCESS" | "FINISHED_ERROR" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : "PENDING" | "RUNNING" | "FINISHED_SUCCESS" | "FINISHED_ERROR" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { SqlReport } from "../report-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { map, switchMap, takeWhile } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +import { firstValueFrom, interval, lastValueFrom, Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ReportData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  report: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  calculation: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  data: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ReportCalculation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  report: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  startDate: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  endDate: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  args: { [key: string]: string };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  status: "PENDING" | "RUNNING" | "FINISHED_SUCCESS" | "FINISHED_ERROR";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  outcome: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    result_hash: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Service that handles management of necessary SQS configurations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export class SqlReportService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  static QUERY_PROXY = "/query";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  constructor(private http: HttpClient) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * Get the combines results of the SQL statements in the report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * @param forceCalculation Creates a new Calculation, even when an existing calculation is available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  async query(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    report: SqlReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    forceCalculation = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Promise<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (forceCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.createReportCalculation(report.getId(), from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .get<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          ReportCalculation[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        >(`${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/report/${report.getId()}`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          switchMap((reportDetails) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            let lastReports = this.getLastReports(reportDetails, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            if (lastReports.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              return this.createReportCalculation(report.getId(), from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +              return this.fetchReportCalculationData(lastReports[0].id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private getLastReports(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    reportDetails: ReportCalculation[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return reportDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .filter((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return this.filterFromToDates(value, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .sort((a: ReportCalculation, b: ReportCalculation) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        this.sortByEndDate(a, b),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private createReportCalculation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    reportId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Observable<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let params = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (from && to) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      params = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        from: moment(from).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        to: moment(to).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .post<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      }>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/report/${reportId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          params: params,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        map((value) => value.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        switchMap((id) => lastValueFrom(this.waitForReportData(id))),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        switchMap((value: ReportCalculation) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          return this.handleReportCalculationResponse(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  fetchReportCalculation(reportId: string): Observable<ReportCalculation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.http.get<ReportCalculation>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/${reportId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private waitForReportData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    reportCalculationId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): Observable<ReportCalculation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return interval(1500).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      switchMap(() => this.fetchReportCalculation(reportCalculationId)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      takeWhile((response) => this.pollCondition(response), true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private fetchReportCalculationData(reportId: string): Observable<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return this.http.get<ReportData>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/${reportId}/data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private handleReportCalculationResponse(value: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    switch (value.status) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      case "FINISHED_SUCCESS":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        return this.fetchReportCalculationData(value.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        throw new Error("Invalid ReportCalculation outcome.");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private sortByEndDate(a: ReportCalculation, b: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return new Date(b.endDate).getTime() - new Date(a.endDate).getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private pollCondition(reportCalculation: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      reportCalculation.status !== "FINISHED_SUCCESS" &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      reportCalculation.status !== "FINISHED_ERROR"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  private filterFromToDates(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    value: ReportCalculation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let argFrom = value.args["from"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    let argTo = value.args["to"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    if (!argFrom || !argTo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      moment(argFrom.toString()).format("YYYY-MM-DD") ==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        moment(from).format("YYYY-MM-DD") &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      moment(argTo.toString()).format("YYYY-MM-DD") ==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        moment(to).format("YYYY-MM-DD")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ReportData.html b/documentation/interfaces/ReportData.html new file mode 100644 index 0000000000..5a2075a0b1 --- /dev/null +++ b/documentation/interfaces/ReportData.html @@ -0,0 +1,585 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/reporting/sql-report/sql-report.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + calculation + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + calculation: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + data + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + data: any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : any[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + report + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + report: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { SqlReport } from "../report-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import moment from "moment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { map, switchMap, takeWhile } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { firstValueFrom, interval, lastValueFrom, Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface ReportData {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  report: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  calculation: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  data: any[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface ReportCalculation {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  report: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  startDate: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  endDate: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  args: { [key: string]: string };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  status: "PENDING" | "RUNNING" | "FINISHED_SUCCESS" | "FINISHED_ERROR";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  outcome: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    result_hash: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Service that handles management of necessary SQS configurations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Injectable({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  providedIn: "root",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class SqlReportService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  static QUERY_PROXY = "/query";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(private http: HttpClient) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * Get the combines results of the SQL statements in the report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param report
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param from
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * @param forceCalculation Creates a new Calculation, even when an existing calculation is available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  async query(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    report: SqlReport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    forceCalculation = false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Promise<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (forceCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.createReportCalculation(report.getId(), from, to),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return firstValueFrom(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .get<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          ReportCalculation[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        >(`${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/report/${report.getId()}`)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          switchMap((reportDetails) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            let lastReports = this.getLastReports(reportDetails, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            if (lastReports.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              return this.createReportCalculation(report.getId(), from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +              return this.fetchReportCalculationData(lastReports[0].id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getLastReports(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    reportDetails: ReportCalculation[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return reportDetails
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.filterFromToDates(value, from, to);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      })
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .sort((a: ReportCalculation, b: ReportCalculation) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.sortByEndDate(a, b),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private createReportCalculation(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    reportId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Observable<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let params = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (from && to) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      params = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        from: moment(from).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        to: moment(to).format("YYYY-MM-DD"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .post<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/report/${reportId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          params: params,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        map((value) => value.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        switchMap((id) => lastValueFrom(this.waitForReportData(id))),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        switchMap((value: ReportCalculation) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          return this.handleReportCalculationResponse(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  fetchReportCalculation(reportId: string): Observable<ReportCalculation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http.get<ReportCalculation>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/${reportId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private waitForReportData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    reportCalculationId: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): Observable<ReportCalculation> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return interval(1500).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      switchMap(() => this.fetchReportCalculation(reportCalculationId)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      takeWhile((response) => this.pollCondition(response), true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private fetchReportCalculationData(reportId: string): Observable<ReportData> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return this.http.get<ReportData>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      `${SqlReportService.QUERY_PROXY}/api/v1/reporting/report-calculation/${reportId}/data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private handleReportCalculationResponse(value: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    switch (value.status) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      case "FINISHED_SUCCESS":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return this.fetchReportCalculationData(value.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        throw new Error("Invalid ReportCalculation outcome.");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private sortByEndDate(a: ReportCalculation, b: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return new Date(b.endDate).getTime() - new Date(a.endDate).getTime();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private pollCondition(reportCalculation: ReportCalculation) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      reportCalculation.status !== "FINISHED_SUCCESS" &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      reportCalculation.status !== "FINISHED_ERROR"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private filterFromToDates(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    value: ReportCalculation,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    from: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    to: Date,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let argFrom = value.args["from"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let argTo = value.args["to"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!argFrom || !argTo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      moment(argFrom.toString()).format("YYYY-MM-DD") ==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        moment(from).format("YYYY-MM-DD") &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      moment(argTo.toString()).format("YYYY-MM-DD") ==
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        moment(to).format("YYYY-MM-DD")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ReportRow.html b/documentation/interfaces/ReportRow.html new file mode 100644 index 0000000000..70a146333d --- /dev/null +++ b/documentation/interfaces/ReportRow.html @@ -0,0 +1,358 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/features/reporting/report-row.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + header + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + header: literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : literal type + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + subRows + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + subRows: ReportRow[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : ReportRow[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            export interface ReportRow {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  header: { label: string; groupedBy: GroupByDescription[]; result: number };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  subRows: ReportRow[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export interface GroupByDescription {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  property: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  value: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export function getGroupingInformationString(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  groupedBy: GroupByDescription[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  if (groupedBy.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      "(" +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      groupedBy
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        .map((group) => getValueDescription(group.value, group.property))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        .join(", ") +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ")"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +function getValueDescription(value: any, property: string): string {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  if (typeof value === "boolean") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ? property
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      : $localize`:Not a certain property|e.g. 'not male':not ${property}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  } else if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return $localize`:Excluding a certain property|e.g. 'without religion':without ${property}`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  } else if (value.hasOwnProperty("label")) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return value.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    return value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/Role.html b/documentation/interfaces/Role.html new file mode 100644 index 0000000000..2edf333cec --- /dev/null +++ b/documentation/interfaces/Role.html @@ -0,0 +1,603 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/core/session/auth/keycloak/keycloak-auth.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extract of Keycloak role object. +See https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_rolerepresentation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + description + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + description: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + name + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + name: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { HttpClient } from "@angular/common/http";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { environment } from "../../../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { SessionInfo } from "../session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { KeycloakEventType, KeycloakService } from "keycloak-angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Logging } from "../../../logging/logging.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Entity } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ParsedJWT, parseJwt } from "../../session-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { RemoteLoginNotAvailableError } from "./remote-login-not-available.error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { switchMap } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Handles the remote session with keycloak
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export class KeycloakAuthService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Users with this role can create and update other accounts.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static readonly ACCOUNT_MANAGER_ROLE = "account_manager";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  static readonly LAST_AUTH_KEY = "LAST_REMOTE_LOGIN";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private keycloakInitialised = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  accessToken: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private httpClient: HttpClient,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    private keycloak: KeycloakService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Check for an existing session or forward to the login page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async login(): Promise<SessionInfo> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!this.keycloakInitialised) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.initKeycloak();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    await this.keycloak.updateToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    let token = await this.keycloak.getToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!token) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      // Forward to the keycloak login page.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.keycloak.login({ redirectUri: location.href });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      token = await this.keycloak.getToken();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.processToken(token);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private async initKeycloak() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    try {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      await this.keycloak.init({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        config: window.location.origin + "/assets/keycloak.json",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        initOptions: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          onLoad: "check-sso",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          silentCheckSsoRedirectUri:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +            window.location.origin + "/assets/silent-check-sso.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // GitHub API rejects if non GitHub bearer token is present
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        shouldAddToken: ({ url }) => !url.includes("api.github.com"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } catch (err) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        err?.error ===
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        "Timeout when waiting for 3rd party check iframe message."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // this is actually an expected scenario, user's internet is slow or not available
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        err = new RemoteLoginNotAvailableError();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        Logging.error("Keycloak init failed", err);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      this.keycloakInitialised = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw err;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    // auto-refresh expiring tokens, as suggested by https://github.com/mauriciovigolo/keycloak-angular?tab=readme-ov-file#keycloak-js-events
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.keycloak.keycloakEvents$.subscribe((event) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (event.type == KeycloakEventType.OnTokenExpired) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.login().catch((err) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Logging.debug("automatic token refresh failed", err),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.keycloakInitialised = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  private processToken(token: string): SessionInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (!token) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      throw new Error("No token received from Keycloak");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.accessToken = token;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    this.logSuccessfulAuth();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const parsedToken: ParsedJWT = parseJwt(this.accessToken);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const sessionInfo: SessionInfo = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      name: parsedToken.username ?? parsedToken.sub,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      id: parsedToken.sub,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      roles: parsedToken["_couchdb.roles"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      email: parsedToken.email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (parsedToken.username) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      sessionInfo.entityId = parsedToken.username.includes(":")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ? parsedToken.username
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        : // fallback for legacy config: manually add "User" entity prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          Entity.createPrefixedId("User", parsedToken.username);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      Logging.debug(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        `User not linked with an entity (userId: ${sessionInfo.id} | ${sessionInfo.name})`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (parsedToken.email) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      sessionInfo.email = parsedToken.email;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return sessionInfo;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Add the Bearer auth header to a existing header object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * @param headers
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  addAuthHeader(headers: any) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    if (this.accessToken) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      if (headers.set && typeof headers.set === "function") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // PouchDB headers are set as a map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        headers.set("Authorization", "Bearer " + this.accessToken);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        // Interceptor headers are set as a simple object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        headers["Authorization"] = "Bearer " + this.accessToken;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Forward to the keycloak logout endpoint to clear the session.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async logout() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return await this.keycloak.logout(location.href);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Open password reset page in browser.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Only works with internet connection.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  changePassword(): Promise<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.keycloak.login({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      action: "UPDATE_PASSWORD",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      redirectUri: location.href,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  async getUserinfo(): Promise<KeycloakUserDto> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    const user = await this.keycloak.getKeycloakInstance().loadUserInfo();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return user as KeycloakUserDto;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  setEmail(email: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.put(`${environment.account_url}/account/set-email`, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      email,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  createUser(user: Partial<KeycloakUserDto>): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.post(`${environment.account_url}/account`, user);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  deleteUser(username: string): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.getUser(username).pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      switchMap((value) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        this.httpClient.delete(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +          `${environment.account_url}/account/${value.id}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +        ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  updateUser(userId: string, user: Partial<KeycloakUserDto>): Observable<any> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.put(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      `${environment.account_url}/account/${userId}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      user,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  getUser(username: string): Observable<KeycloakUserDto> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.get<KeycloakUserDto>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      `${environment.account_url}/account/${username}`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Get a list of all roles generally available in the user management system.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  getRoles(): Observable<Role[]> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    return this.httpClient.get<Role[]>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      `${environment.account_url}/account/roles`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Log timestamp of last successful authentication
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  logSuccessfulAuth() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    localStorage.setItem(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      KeycloakAuthService.LAST_AUTH_KEY,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +      new Date().toISOString(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Extract of Keycloak role object.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * See {@link https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_rolerepresentation}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface Role {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  description: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Extract of Keycloak user object as provided by the external Keycloak Service.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * See {@link https://www.keycloak.org/docs-api/19.0.3/rest-api/index.html#_userrepresentation}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * These fields overlap with our internal `SessionInfo` interface that is seen as abstracted from Keycloak.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface KeycloakUserDto {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  username: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  email: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  roles: Role[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  enabled: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SelectableOption.html b/documentation/interfaces/SelectableOption.html new file mode 100644 index 0000000000..c6687f08e0 --- /dev/null +++ b/documentation/interfaces/SelectableOption.html @@ -0,0 +1,781 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/basic-autocomplete/basic-autocomplete.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + asString + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + asString: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + asValue + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + asValue: V + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : V + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + initial + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + initial: O + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : O + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + selected + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + selected: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ContentChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ElementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  OnInit,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Optional,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Self,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  TemplateRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { AsyncPipe, NgForOf, NgIf, NgTemplateOutlet } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatFormFieldControl } from "@angular/material/form-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  FormGroupDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  NgControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  NgForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatInput, MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatAutocompleteModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatAutocompleteTrigger,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/material/autocomplete";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatCheckboxModule } from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { filter, map, startWith } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ErrorStateMatcher } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { CustomFormControlDirective } from "./custom-form-control.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { coerceBooleanProperty } from "@angular/cdk/coercion";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatChipGrid,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatChipInput,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatChipRemove,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatChipRow,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/material/chips";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTooltip } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatIcon } from "@angular/material/icon";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  CdkDragDrop,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  DragDropModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  moveItemInArray,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/cdk/drag-drop";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  CdkFixedSizeVirtualScroll,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  CdkVirtualForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  CdkVirtualScrollViewport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/cdk/scrolling";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +interface SelectableOption<O, V> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  initial: O;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  asString: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  asValue: V;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selected: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/** Custom `MatFormFieldControl` for any select / dropdown field. */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-basic-autocomplete",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "basic-autocomplete.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrls: ["./basic-autocomplete.component.scss"],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  providers: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    { provide: MatFormFieldControl, useExisting: BasicAutocompleteComponent },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatAutocompleteModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    AsyncPipe,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    NgTemplateOutlet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatChipInput,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatChipGrid,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatChipRow,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTooltip,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatIcon,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatChipRemove,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    DragDropModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    CdkVirtualScrollViewport,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    CdkVirtualForOf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    CdkFixedSizeVirtualScroll,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class BasicAutocompleteComponent<O, V = O>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  extends CustomFormControlDirective<V | V[]>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  implements OnChanges, OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ContentChild(TemplateRef) templateRef: TemplateRef<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  // `_elementRef` is protected in `MapInput`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild(MatInput, { static: true }) inputElement: MatInput & {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    _elementRef: ElementRef<HTMLElement>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild(MatAutocompleteTrigger) autocomplete: MatAutocompleteTrigger;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild(CdkVirtualScrollViewport)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  virtualScrollViewport: CdkVirtualScrollViewport;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() valueMapper = (option: O) => option as unknown as V;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() optionToString = (option: O) => option?.toString();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() createOption: (input: string) => Promise<O>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() hideOption: (option: O) => boolean = () => false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Whether the user should be able to select multiple values.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() multi?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() reorder?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Whether the user can manually drag & drop to reorder the selected items
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  autocompleteOptions: SelectableOption<O, V>[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  autocompleteForm = new FormControl("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  autocompleteSuggestedOptions = this.autocompleteForm.valueChanges.pipe(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    filter((val) => typeof val === "string"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    map((val) => this.updateAutocomplete(val)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    startWith([] as SelectableOption<O, V>[]),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  autocompleteFilterFunction: (option: O) => boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() autocompleteFilterChange = new EventEmitter<(o: O) => boolean>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** whether the "add new" option is logically allowed in the current context (e.g. not creating a duplicate) */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  showAddOption = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  get displayText() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const values: V[] = Array.isArray(this.value) ? this.value : [this.value];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return values
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .map((v) => this._options.find((o) => o.asValue === v)?.asString)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .join(", ");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override get disabled(): boolean {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this._disabled;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override set disabled(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._disabled = coerceBooleanProperty(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._disabled
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ? this.autocompleteForm.disable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      : this.autocompleteForm.enable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.stateChanges.next();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set options(options: O[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._options = options.map((o) => this.toSelectableOption(o));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  retainSearchValue: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private _options: SelectableOption<O, V>[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _selectedOptions: SelectableOption<O, V>[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Display the selected items as simple text, as chips or not at all (if used in combination with another component)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() display: "text" | "chips" | "none" = "text";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    elementRef: ElementRef<HTMLElement>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    errorStateMatcher: ErrorStateMatcher,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @Optional() @Self() ngControl: NgControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @Optional() parentForm: NgForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    @Optional() parentFormGroup: FormGroupDirective,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      elementRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      errorStateMatcher,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ngControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      parentForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      parentFormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.autocompleteSuggestedOptions.subscribe((options) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteOptions = options;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // Subscribe to the valueChanges observable to print the input value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.autocompleteForm.valueChanges.subscribe((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (typeof value === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.retainSearchValue = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ngOnChanges(changes: { [key in keyof this]?: any }) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (changes.valueMapper) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this._options.forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (opt) => (opt.asValue = this.valueMapper(opt.initial)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (changes.optionToString) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this._options.forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (opt) => (opt.asString = this.optionToString(opt.initial)),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (changes.value || changes.options) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.setInitialInputValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (this.autocomplete?.panelOpen) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        // if new options have been added, make sure to update the visible autocomplete options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.showAutocomplete(this.autocompleteForm.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  drop(event: CdkDragDrop<any[]>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (event.previousContainer === event.container) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      moveItemInArray(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.autocompleteOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        event.previousIndex,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        event.currentIndex,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._selectedOptions = this.autocompleteOptions.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.multi) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.value = this._selectedOptions.map((o) => o.asValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.value = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.setInitialInputValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.onChange(this.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.showAutocomplete(this.autocompleteForm.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  showAutocomplete(valueToRevertTo?: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.retainSearchValue) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteForm.setValue(this.retainSearchValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteForm.setValue("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!this.multi) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // cannot setValue to "" here because the current selection would be lost
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteForm.setValue(this.displayText, { emitEvent: false });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    setTimeout(() => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.inputElement.focus();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // select all text for easy overwriting when typing to search for options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.inputElement._elementRef.nativeElement as HTMLInputElement
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ).select();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (valueToRevertTo) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.autocompleteForm.setValue(valueToRevertTo);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.focus();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // update virtual scroll as the container remains empty until the user scrolls initially
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.virtualScrollViewport.scrollToIndex(0);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private updateAutocomplete(inputText: string): SelectableOption<O, V>[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let filteredOptions = this._options.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (o) => !this.hideOption(o.initial),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (inputText) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteFilterFunction = (option) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.optionToString(option)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          .toLowerCase()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          .includes(inputText.toLowerCase());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteFilterChange.emit(this.autocompleteFilterFunction);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      filteredOptions = filteredOptions.filter((o) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.autocompleteFilterFunction(o.initial),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // do not allow users to create a new entry "identical" to an existing one:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.showAddOption = !this._options.some(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (o) => o.asString.toLowerCase() === inputText.toLowerCase(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return filteredOptions;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private setInitialInputValue() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._options.forEach(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (o) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (o.selected = Array.isArray(this.value)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          ? this.value?.includes(o.asValue)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          : this.value === o.asValue),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._selectedOptions = this._options.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  select(selected: string | SelectableOption<O, V>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (typeof selected === "string") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.createNewOption(selected);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (selected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectOption(selected);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteForm.setValue("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this._selectedOptions = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.value = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.onChange(this.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  unselect(option: SelectableOption<O, V>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    option.selected = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._selectedOptions = this._options.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.multi) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.value = this._selectedOptions.map((o) => o.asValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.value = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.onChange(this.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  async createNewOption(option: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const createdOption = await this.createOption(option);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (createdOption) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const newOption = this.toSelectableOption(createdOption);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this._options.push(newOption);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.select(newOption);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // continue editing
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.showAutocomplete();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.autocompleteForm.setValue(option);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private selectOption(option: SelectableOption<O, V>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.multi) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      option.selected = !option.selected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this._selectedOptions = this._options.filter((o) => o.selected);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.value = this._selectedOptions.map((o) => o.asValue);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // re-open autocomplete to select next option
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.showAutocomplete();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this._selectedOptions = [option];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.value = option.asValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.blur();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private toSelectableOption(opt: O): SelectableOption<O, V> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      initial: opt,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      asValue: this.valueMapper(opt),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      asString: this.optionToString(opt),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      selected: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  onFocusOut(event: FocusEvent) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !this.elementRef.nativeElement.contains(event.relatedTarget as Element)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (!this.multi && this.autocompleteForm.value === "") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.select(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.blur();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override onContainerClick(event: MouseEvent) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      !this._disabled &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (event.target as Element).tagName.toLowerCase() != "input"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.showAutocomplete();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  override writeValue(val: V[] | V) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    super.writeValue(val);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.setInitialInputValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SentryBreadcrumbHint.html b/documentation/interfaces/SentryBreadcrumbHint.html new file mode 100644 index 0000000000..849b243ec4 --- /dev/null +++ b/documentation/interfaces/SentryBreadcrumbHint.html @@ -0,0 +1,786 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/core/logging/logging.service.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  https://docs.sentry.io/platforms/javascript/configuration/filtering/#hints-for-breadcrumbs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + event + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + event: PointerEvent + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : PointerEvent + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  For breadcrumbs created from browser events, the Sentry SDK often supplies the event to the breadcrumb as a hint. +This can be used to extract data from the target DOM element into a breadcrumb, for example.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + input + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + input: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + level + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + level: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  e.g. console output level (warn / log / ...)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + request + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + request: any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : any + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + response + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + response: Response + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Response + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + xhr + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + xhr: XMLHttpRequest + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : XMLHttpRequest + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import { LogLevel } from "./log-level";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import * as Sentry from "@sentry/angular";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { environment } from "../../../environments/environment";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { APP_INITIALIZER, ErrorHandler, Provider } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { LoginState } from "../session/session-states/login-state.enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { LoginStateSubject } from "../session/session-type";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +import { SessionSubject } from "../session/auth/session-info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/* eslint-disable no-console */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Centrally managed logging to allow log messages to be filtered by level and even sent to a remote logging service
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * that allows developers to monitor and analyse problems.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Logging to the remote monitoring server is set only for warnings and errors.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * To allow remote logging, call Sentry.init during bootstrap in your AppModule or somewhere early on during startup.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Import the constant `Logging` to use this from anywhere (without Angular DI).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export class LoggingService {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Initialize the remote logging module with the given options.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * If set up this will be used to send errors to a remote endpoint for analysis.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  initRemoteLogging(options: Sentry.BrowserOptions) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (!options.dsn) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      // abort if no target url is set
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const defaultOptions = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      release: "ndb-core@" + environment.appVersion,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      transport: Sentry.makeBrowserOfflineTransport(Sentry.makeFetchTransport),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      beforeBreadcrumb: enhanceSentryBreadcrumb,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    Sentry.init(Object.assign(defaultOptions, options));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Register any additional logging context integrations that need Angular services.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param loginState
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param sessionInfo
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  initAngularLogging(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    loginState: LoginStateSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    sessionInfo: SessionSubject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return () =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      loginState.subscribe((newState) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        if (newState === LoginState.LOGGED_IN) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          const username = sessionInfo.value?.id;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          Logging.setLoggingContextUser(username);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          Logging.setLoggingContextUser(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Get the Angular providers to set up additional logging and tracing,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * that should be added to the providers array of the AppModule.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  getAngularTracingProviders(): Provider[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    return [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      /* Sentry setup */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        provide: ErrorHandler,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        useValue: Sentry.createErrorHandler(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        provide: Sentry.TraceService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        deps: [Router],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        provide: APP_INITIALIZER,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        useFactory: () => () => {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        deps: [Sentry.TraceService],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        multi: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        provide: APP_INITIALIZER,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        useFactory: Logging.initAngularLogging,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        deps: [LoginStateSubject, SessionSubject],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        multi: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Update a piece of context information that will be attached to all log messages for easier debugging,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * especially in remote logging.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param key Identifier of the key-value pair
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param value Value of the key-value pair
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param asTag If this should be added as indexed tag rather than simple context (see https://docs.sentry.io/platforms/javascript/enriching-events/tags/)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  addContext(key: string, value: any, asTag: boolean = false) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (asTag) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      Sentry.setTag(key, value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (typeof value !== "object") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        value = { value: value };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      Sentry.getCurrentScope().setContext(key, value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Update the username to be attached to all log messages for easier debugging,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * especially in remote logging.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param username
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  setLoggingContextUser(username: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    Sentry.setUser({ username: username });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Log the message with "debug" level - for very detailed, non-essential information.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param context Additional context for debugging
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public debug(message: any, ...context: any[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.log(message, LogLevel.DEBUG, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Log the message with "info" level - for relevant information that occurs during regular functioning of the app.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public info(message: any) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.log(message, LogLevel.INFO);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Log the message with "warning" level - for unexpected events that the app can still handle gracefully.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param context
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public warn(message: any, ...context: any[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.log(message, LogLevel.WARN, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Log the message with "error" level - for unexpected critical events that cannot be handled and will affect functions.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param message
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param context
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public error(message: any, ...context: any[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.log(message, LogLevel.ERROR, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * Generic logging of a message.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param message Message to be logged
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param logLevel Optional log level - default is "info"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * @param context Additional context for debugging
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  public log(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    message: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    logLevel: LogLevel = LogLevel.INFO,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    ...context: any[]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    this.logToConsole(message, logLevel, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (logLevel !== LogLevel.DEBUG && logLevel !== LogLevel.INFO) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      this.logToRemoteMonitoring(message, logLevel);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private logToConsole(message: any, logLevel: LogLevel, ...context: any[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    switch (+logLevel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.DEBUG:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        console.debug(message, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.INFO:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        console.info(message, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.WARN:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        console.warn(message, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.ERROR:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        console.error(message, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        console.log(message, ...context);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private logToRemoteMonitoring(message: any, logLevel: LogLevel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    if (logLevel === LogLevel.ERROR) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      if (message instanceof Error) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Sentry.captureException(message);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        Sentry.captureException(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +          new Error(message?.message ?? message?.error ?? message),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      Sentry.captureMessage(message, this.translateLogLevel(logLevel));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  private translateLogLevel(logLevel: LogLevel): Sentry.SeverityLevel {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    switch (+logLevel) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.DEBUG:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return "debug";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.INFO:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return "info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.WARN:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return "warning";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      case LogLevel.ERROR:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return "error";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +      default:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +        return "info";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * Add more human-readable descriptions to Sentry breadcrumbs for debugging.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * see https://docs.sentry.io/platforms/javascript/enriching-events/breadcrumbs/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +function enhanceSentryBreadcrumb(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  breadcrumb: Sentry.Breadcrumb,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  hint: SentryBreadcrumbHint,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  if (breadcrumb.category === "ui.click") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const event = hint.event;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    const elementText = event.target?.["innerText"] ?? "";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +    breadcrumb.message = elementText + " | " + breadcrumb.message;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  return breadcrumb;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + * https://docs.sentry.io/platforms/javascript/configuration/filtering/#hints-for-breadcrumbs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +interface SentryBreadcrumbHint {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * For breadcrumbs created from browser events, the Sentry SDK often supplies the event to the breadcrumb as a hint.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * This can be used to extract data from the target DOM element into a breadcrumb, for example.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  event?: PointerEvent;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  input?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   * e.g. console output level (warn / log / ...)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  level: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  response?: Response;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  request?: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  xhr?: XMLHttpRequest;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +export const Logging = new LoggingService();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SessionInfo.html b/documentation/interfaces/SessionInfo.html new file mode 100644 index 0000000000..3b33778c9c --- /dev/null +++ b/documentation/interfaces/SessionInfo.html @@ -0,0 +1,592 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/session/auth/session-info.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The session info which holds information about the currently logged-in user. +This is retrieved during the login process and will always be present once state changes to LOGGED_IN.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + email + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + email: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Email address of a user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entityId + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + entityId: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ID of the entity which is connected with the user account.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This is either a full ID or (e.g. Child:123) or only the last part. +In the later case it refers to the User entity.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + name + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Use id or entityId instead as this is an unpredictable mix from different sources +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + name: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Name of user account.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + projects + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + projects: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List of linked projects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + roles + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + roles: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    List of roles the logged-in user hold.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Injectable } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +import { BehaviorSubject } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * The session info which holds information about the currently logged-in user.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * This is retrieved during the login process and will always be present once state changes to `LOGGED_IN`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface SessionInfo {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The user account id from the auth server (e.g. User ID in Keycloak)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Name of user account.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * @deprecated Use id or entityId instead as this is an unpredictable mix from different sources
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * List of roles the logged-in user hold.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  roles: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * List of linked projects
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  projects?: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * ID of the entity which is connected with the user account.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * This is either a full ID or (e.g. Child:123) or only the last part.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * In the later case it refers to the `User` entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entityId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * Email address of a user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  email?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Use this provider to get information about the currently active session.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * E.g. for checking required roles or accessing the unique user identifier.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +@Injectable()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export class SessionSubject extends BehaviorSubject<SessionInfo> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  constructor() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    super(undefined);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SetupWizardConfig.html b/documentation/interfaces/SetupWizardConfig.html new file mode 100644 index 0000000000..3469812bbe --- /dev/null +++ b/documentation/interfaces/SetupWizardConfig.html @@ -0,0 +1,486 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/admin/setup-wizard/setup-wizard-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + finished + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + finished: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      whether the wizard has been completed overall and should be hidden

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + openOnStart + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + openOnStart: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      whether users should on startup be navigated automatically to the setup wizard screen while it is not finished

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + steps + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + steps: SetupWizardStep[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : SetupWizardStep[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      import { MenuItem } from "../../ui/navigation/menu-item";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export const CONFIG_SETUP_WIZARD_ID = "Config:SetupWizard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface SetupWizardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** whether the wizard has been completed overall and should be hidden */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  finished?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** whether users should on startup be navigated automatically to the setup wizard screen while it is not finished */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  openOnStart?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  steps: SetupWizardStep[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export interface SetupWizardStep {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  text: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  actions?: MenuItem[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export const defaultSetupWizardConfig: SetupWizardConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  openOnStart: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  steps: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      title: $localize`:Setup Wizard Step Title:Welcome`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +# Welcome to Aam Digital!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +We are here to help you manage your participants' or beneficiaries' details
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +and your team's interactions with them.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +The Aam Digital platform is very flexible and you can customize the structures and views
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +to exactly fit your project needs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +The following steps guide you through the most important configuration options for this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +And you can start working with your data within a few minutes already.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +We also have some short video guides for you: [Aam Digital Video Guides (YouTube)](https://www.youtube.com/channel/UCZSFOX_MBa8zz5Mtfv_qlnA/videos)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +Feel free to leave this setup wizard in between to explore the existing system first.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +You can always come back to this view through the "Setup Wizard" button at the bottom of the main menu on the left.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +To dismiss and hide this wizard, go to the last step of the wizard and "finish" the setup process.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      title: $localize`:Setup Wizard Step Title:Profiles & Fields`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +The system already holds some basic structures for your case management.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +You can adapt the fields and how the details are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +If you have further requirements, don't hesitate to reach out to us at [support@aam-digital.com](mailto:support@aam-digital.com).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +_Please note that the setup wizard and form builder is still under active development ("beta" version).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +Some advanced configuration options are not available here yet for you to configure yourself and may need assistance from the tech support team.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +We are currently extending and optimizing the user interfaces for these steps._
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      actions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          label: $localize`:Setup Wizard Step Action:Customize Child profile`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          link: "/admin/entity/Child",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          label: $localize`:Setup Wizard Step Action:Customize School profile`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          link: "/admin/entity/School",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      title: $localize`:Setup Wizard Step Title:User Accounts`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +You can collaborate on Aam Digital as a team.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +Data is synced and all users have access to the latest information.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      actions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          label: $localize`:Setup Wizard Step Action:Manage User Accounts`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          link: "/user",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      title: $localize`:Setup Wizard Step Title:Import Data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +If you have exising data from a previous system, you can easily import it.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +Save the data in ".csv" format (e.g. from MS Excel).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +You do not need any specific column names in your file to be imported.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +The Import Module helps your map your spreadsheet data to the relevant fields in your Aam Digital profiles.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      actions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          label: $localize`:Setup Wizard Step Action:Import Data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +          link: "/import",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      title: $localize`:Setup Wizard Step Title:Done!`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +That's it. You are ready to explore your system and start work!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +You can always adapt your setup further, after you started using it.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +We recommend to keep things simple in the beginning,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +start using it for some of your tasks
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +and then add further fields and adjust your setup.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +Feel free to reach out to us with your questions or feedback: [support@aam-digital.com](mailto:support@aam-digital.com)`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SetupWizardStep.html b/documentation/interfaces/SetupWizardStep.html new file mode 100644 index 0000000000..2c869cd0c2 --- /dev/null +++ b/documentation/interfaces/SetupWizardStep.html @@ -0,0 +1,468 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/admin/setup-wizard/setup-wizard-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + actions + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + actions: MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : MenuItem[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + text + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + text: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + title + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + title: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { MenuItem } from "../../ui/navigation/menu-item";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export const CONFIG_SETUP_WIZARD_ID = "Config:SetupWizard";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface SetupWizardConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** whether the wizard has been completed overall and should be hidden */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  finished?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** whether users should on startup be navigated automatically to the setup wizard screen while it is not finished */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  openOnStart?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  steps: SetupWizardStep[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface SetupWizardStep {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  text: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  actions?: MenuItem[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export const defaultSetupWizardConfig: SetupWizardConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  openOnStart: false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  steps: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      title: $localize`:Setup Wizard Step Title:Welcome`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +# Welcome to Aam Digital!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +We are here to help you manage your participants' or beneficiaries' details
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +and your team's interactions with them.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +The Aam Digital platform is very flexible and you can customize the structures and views
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +to exactly fit your project needs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +The following steps guide you through the most important configuration options for this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +And you can start working with your data within a few minutes already.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +We also have some short video guides for you: [Aam Digital Video Guides (YouTube)](https://www.youtube.com/channel/UCZSFOX_MBa8zz5Mtfv_qlnA/videos)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +Feel free to leave this setup wizard in between to explore the existing system first.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +You can always come back to this view through the "Setup Wizard" button at the bottom of the main menu on the left.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +To dismiss and hide this wizard, go to the last step of the wizard and "finish" the setup process.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      title: $localize`:Setup Wizard Step Title:Profiles & Fields`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +The system already holds some basic structures for your case management.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +You can adapt the fields and how the details are displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +If you have further requirements, don't hesitate to reach out to us at [support@aam-digital.com](mailto:support@aam-digital.com).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +_Please note that the setup wizard and form builder is still under active development ("beta" version).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +Some advanced configuration options are not available here yet for you to configure yourself and may need assistance from the tech support team.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +We are currently extending and optimizing the user interfaces for these steps._
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      actions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          label: $localize`:Setup Wizard Step Action:Customize Child profile`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          link: "/admin/entity/Child",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          label: $localize`:Setup Wizard Step Action:Customize School profile`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          link: "/admin/entity/School",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      title: $localize`:Setup Wizard Step Title:User Accounts`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +You can collaborate on Aam Digital as a team.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +Data is synced and all users have access to the latest information.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      actions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          label: $localize`:Setup Wizard Step Action:Manage User Accounts`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          link: "/user",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      title: $localize`:Setup Wizard Step Title:Import Data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +If you have exising data from a previous system, you can easily import it.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +Save the data in ".csv" format (e.g. from MS Excel).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +You do not need any specific column names in your file to be imported.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +The Import Module helps your map your spreadsheet data to the relevant fields in your Aam Digital profiles.`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      actions: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          label: $localize`:Setup Wizard Step Action:Import Data`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +          link: "/import",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +        },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      title: $localize`:Setup Wizard Step Title:Done!`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +      text: $localize`:Setup Wizard Step Text:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +That's it. You are ready to explore your system and start work!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +You can always adapt your setup further, after you started using it.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +We recommend to keep things simple in the beginning,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +start using it for some of your tasks
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +and then add further fields and adjust your setup.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +Feel free to reach out to us with your questions or feedback: [support@aam-digital.com](mailto:support@aam-digital.com)`,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SimpleDropdownValue-1.html b/documentation/interfaces/SimpleDropdownValue-1.html new file mode 100644 index 0000000000..e1550def92 --- /dev/null +++ b/documentation/interfaces/SimpleDropdownValue-1.html @@ -0,0 +1,637 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/core/admin/admin-entity-details/admin-entity-field/admin-entity-field.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + value + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + value: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Inject,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  OnChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  SimpleChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity, EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MAT_DIALOG_DATA,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  MatDialogRef,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/material/dialog";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DialogCloseComponent } from "../../../common-components/dialog-close/dialog-close.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ErrorHintComponent } from "../../../common-components/error-hint/error-hint.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormControl,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  Validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntitySchemaField } from "../../../entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { BasicAutocompleteComponent } from "../../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DefaultDatatype } from "../../../entity/default-datatype/default.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigurableEnumDatatype } from "../../../basic-datatypes/configurable-enum/configurable-enum-datatype/configurable-enum.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityDatatype } from "../../../basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigurableEnumService } from "../../../basic-datatypes/configurable-enum/configurable-enum.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { EntityRegistry } from "../../../entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AdminEntityService } from "../../admin-entity.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigureEnumPopupComponent } from "../../../basic-datatypes/configurable-enum/configure-enum-popup/configure-enum-popup.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigurableEnum } from "../../../basic-datatypes/configurable-enum/configurable-enum";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { generateIdFromLabel } from "../../../../utils/generate-id-from-label/generate-id-from-label";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { merge } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { filter } from "rxjs/operators";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { uniqueIdValidator } from "app/core/common-components/entity-form/unique-id-validator/unique-id-validator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ConfigureEntityFieldValidatorComponent } from "./configure-entity-field-validator/configure-entity-field-validator.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { FormValidatorConfig } from "app/core/common-components/entity-form/dynamic-form-validators/form-validator-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { AnonymizeOptionsComponent } from "./anonymize-options/anonymize-options.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { MatCheckbox } from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DefaultValueOptionsComponent } from "./default-value-options/default-value-options.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Allows configuration of the schema of a single Entity field, like its dataType and labels.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-admin-entity-field",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  templateUrl: "./admin-entity-field.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  styleUrls: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    "./admin-entity-field.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    "../../../common-components/entity-form/entity-form/entity-form.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatDialogModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DialogCloseComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ErrorHintComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatTabsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    FontAwesomeModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ConfigureEntityFieldValidatorComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    AnonymizeOptionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    MatCheckbox,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    DefaultValueOptionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class AdminEntityFieldComponent implements OnChanges {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() fieldId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  @Input() entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entitySchemaField: EntitySchemaField;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  form: FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  fieldIdForm: FormControl;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /** form group of all fields in EntitySchemaField (i.e. without fieldId) */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  schemaFieldsForm: FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  additionalForm: FormControl;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  typeAdditionalOptions: SimpleDropdownValue[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  dataTypes: SimpleDropdownValue[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    @Inject(MAT_DIALOG_DATA)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fieldId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      entityType: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    },
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private dialogRef: MatDialogRef<any>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    @Inject(DefaultDatatype) allDataTypes: DefaultDatatype[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private configurableEnumService: ConfigurableEnumService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private entityRegistry: EntityRegistry,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private adminEntityService: AdminEntityService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    private dialog: MatDialog,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.fieldId = data.fieldId;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.entityType = data.entityType;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.entitySchemaField = this.entityType.schema.get(this.fieldId) ?? {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.initSettings();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.initAvailableDatatypes(allDataTypes);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnChanges(changes: SimpleChanges): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (changes.entitySchemaField) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.initSettings();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private initSettings() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.fieldIdForm = this.fb.control(this.fieldId, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      validators: [Validators.required],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      asyncValidators: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        uniqueIdValidator(Array.from(this.entityType.schema.keys())),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.additionalForm = this.fb.control(this.entitySchemaField.additional);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.schemaFieldsForm = this.fb.group({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      label: [this.entitySchemaField.label, Validators.required],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      labelShort: [this.entitySchemaField.labelShort],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      description: [this.entitySchemaField.description],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      dataType: [this.entitySchemaField.dataType, Validators.required],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      isArray: [this.entitySchemaField.isArray],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      additional: this.additionalForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      defaultValue: [this.entitySchemaField.defaultValue],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      searchable: [this.entitySchemaField.searchable],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      anonymize: [this.entitySchemaField.anonymize],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      //viewComponent: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      //editComponent: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      //showInDetailsView: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      //generateIndex: [],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      validators: [this.entitySchemaField.validators],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.form = this.fb.group({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      id: this.fieldIdForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      schemaFields: this.schemaFieldsForm,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.schemaFieldsForm
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .get("labelShort")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .valueChanges.pipe(filter((v) => v === ""))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .subscribe((v) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        // labelShort should never be empty string, in that case it has to be removed so that label works as fallback
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.schemaFieldsForm.get("labelShort").setValue(null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.updateDataTypeAdditional(this.schemaFieldsForm.get("dataType").value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.schemaFieldsForm
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .get("dataType")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .valueChanges.subscribe((v) => this.updateDataTypeAdditional(v));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.updateForNewOrExistingField();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private updateForNewOrExistingField() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!!this.fieldId) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // existing fields' id is readonly
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.fieldIdForm.disable();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const autoGenerateSubscr = merge(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.schemaFieldsForm.get("label").valueChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.schemaFieldsForm.get("labelShort").valueChanges,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      ).subscribe(() => this.autoGenerateId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // stop updating id when user manually edits
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.fieldIdForm.valueChanges.subscribe(() =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        autoGenerateSubscr.unsubscribe(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  entityFieldValidatorChanges(validatorData: FormValidatorConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.schemaFieldsForm.get("validators").setValue(validatorData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private autoGenerateId() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // prefer labelShort if it exists, as this makes less verbose IDs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const label =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.schemaFieldsForm.get("labelShort").value ??
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.schemaFieldsForm.get("label").value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const generatedId = generateIdFromLabel(label);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.fieldIdForm.setValue(generatedId, { emitEvent: false });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private initAvailableDatatypes(dataTypes: DefaultDatatype[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dataTypes = dataTypes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .filter((d) => d.label !== DefaultDatatype.label) // hide "internal" technical dataTypes that did not define a human-readable label
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((d) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        label: d.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        value: d.dataType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  objectToLabel = (v: SimpleDropdownValue) => v?.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  objectToValue = (v: SimpleDropdownValue) => v?.value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  createNewAdditionalOption: (input: string) => SimpleDropdownValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  createNewAdditionalOptionAsync = async (input) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.createNewAdditionalOption(input);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private updateDataTypeAdditional(dataType: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.resetAdditional();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (dataType === ConfigurableEnumDatatype.dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.initAdditionalForEnum();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else if (dataType === EntityDatatype.dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.initAdditionalForEntityRef();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // hasInnerType: [ArrayDatatype.dataType].includes(d.dataType),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // TODO: this mapping of having an "additional" schema should probably become part of Datatype classes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private initAdditionalForEnum() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.typeAdditionalOptions = this.configurableEnumService
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .listEnums()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((x) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        label: Entity.extractEntityIdFromId(x), // TODO: add human-readable label to configurable-enum entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        value: Entity.extractEntityIdFromId(x),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.additionalForm.addValidators(Validators.required);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.createNewAdditionalOption = (text) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      value: generateIdFromLabel(text),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      label: text,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.entitySchemaField.additional) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.additionalForm.setValue(this.entitySchemaField.additional);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    } else if (this.schemaFieldsForm.get("label").value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // when switching to enum datatype in the form, if unset generate a suggested enum-id immediately
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const newOption = this.createNewAdditionalOption(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        this.schemaFieldsForm.get("label").value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.typeAdditionalOptions.push(newOption);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.additionalForm.setValue(newOption.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private initAdditionalForEntityRef() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.typeAdditionalOptions = this.entityRegistry
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .getEntityTypes(true)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .map((x) => ({ label: x.value.label, value: x.value.ENTITY_TYPE }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.additionalForm.addValidators(Validators.required);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.typeAdditionalOptions.some(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        (x) => x.value === this.entitySchemaField.additional,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.additionalForm.setValue(this.entitySchemaField.additional);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private resetAdditional() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.additionalForm.removeValidators(Validators.required);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.additionalForm.reset(null);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.typeAdditionalOptions = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.createNewAdditionalOption = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  save() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.form.markAllAsTouched();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (this.form.invalid) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const formValues = this.schemaFieldsForm.getRawValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const key of Object.keys(formValues)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (formValues[key] === null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        delete formValues[key];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const updatedEntitySchema = Object.assign(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      {},
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entitySchemaField, // TODO: remove this merge once all schema fields are in the form (then only form values should apply)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      formValues,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const fieldId = this.fieldIdForm.getRawValue();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.adminEntityService.updateSchemaField(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.entityType,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      fieldId,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      updatedEntitySchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dialogRef.close(fieldId);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  openEnumOptions(event: Event) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    event.stopPropagation(); // do not open the autocomplete dropdown when clicking the settings icon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    let enumEntity = this.configurableEnumService.getEnum(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      this.additionalForm.value,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    if (!enumEntity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      // if the user makes changes, the dialog component itself is saving the new entity to the database already
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      enumEntity = new ConfigurableEnum(this.additionalForm.value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.dialog.open(ConfigureEnumPopupComponent, { data: enumEntity });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +interface SimpleDropdownValue {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  value: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SimpleDropdownValue.html b/documentation/interfaces/SimpleDropdownValue.html new file mode 100644 index 0000000000..ea29cd3309 --- /dev/null +++ b/documentation/interfaces/SimpleDropdownValue.html @@ -0,0 +1,490 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + src/app/core/admin/admin-entity/admin-entity-general-settings/admin-entity-general-settings.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + key + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + key: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + label + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + label: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityConstructor } from "../../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatButtonModule } from "@angular/material/button";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatInputModule } from "@angular/material/input";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  FormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  Validators,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/forms";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { CommonModule, NgIf } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatTabsModule } from "@angular/material/tabs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatTooltipModule } from "@angular/material/tooltip";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { BasicAutocompleteComponent } from "../../../common-components/basic-autocomplete/basic-autocomplete.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityConfig } from "../../../entity/entity-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatTableDataSource, MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MatCheckboxChange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +} from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatOptionModule } from "@angular/material/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatSelectModule } from "@angular/material/select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntitySchemaField } from "app/core/entity/schema/entity-schema-field";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { AdminEntityService } from "../../admin-entity.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { StringDatatype } from "../../../basic-datatypes/string/string.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { HelpButtonComponent } from "../../../common-components/help-button/help-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { MatSort } from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { EntityFieldLabelComponent } from "../../../common-components/entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { AnonymizeOptionsComponent } from "../../admin-entity-details/admin-entity-field/anonymize-options/anonymize-options.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +import { FaIconComponent } from "@fortawesome/angular-fontawesome";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  selector: "app-admin-entity-general-settings",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  templateUrl: "./admin-entity-general-settings.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  styleUrls: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    "./admin-entity-general-settings.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    "../admin-entity-styles.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatButtonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatInputModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    FormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    NgIf,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatTabsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ReactiveFormsModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    BasicAutocompleteComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatOptionModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatSelectModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatTooltipModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    HelpButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    MatSort,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    AnonymizeOptionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    FaIconComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +export class AdminEntityGeneralSettingsComponent implements OnInit {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() entityConstructor: EntityConstructor;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Output() generalSettingsChange: EventEmitter<EntityConfig> =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    new EventEmitter<EntityConfig>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() generalSettings: EntityConfig;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  @Input() showPIIDetails: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  fieldAnonymizationDataSource: MatTableDataSource<{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    field: EntitySchemaField;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  basicSettingsForm: FormGroup;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  toStringAttributesOptions: SimpleDropdownValue[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private fb: FormBuilder,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    private adminEntityService: AdminEntityService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ngOnInit(): void {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.init();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private init() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.basicSettingsForm = this.fb.group({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      label: [this.generalSettings.label, Validators.required],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      labelPlural: [this.generalSettings.labelPlural],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      icon: [this.generalSettings.icon],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      toStringAttributes: [this.generalSettings.toStringAttributes],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      hasPII: [this.generalSettings.hasPII],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.showPIIDetails = this.basicSettingsForm.get("hasPII").value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.fetchAnonymizationTableData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.initToStringAttributesOptions();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.basicSettingsForm.valueChanges.subscribe((value) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.generalSettingsChange.emit(this.basicSettingsForm.getRawValue()); // Optionally, emit the initial value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  fetchAnonymizationTableData() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (this.showPIIDetails) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      const fields = Array.from(this.entityConstructor.schema.entries())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        .filter(([key, field]) => field.label)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        .map(([key, field]) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          key: key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          label: field.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          field: field,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.fieldAnonymizationDataSource = new MatTableDataSource(fields);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  toggleAnonymizationTable(event: MatCheckboxChange) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.showPIIDetails = event.checked;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.basicSettingsForm.get("hasPII").setValue(this.showPIIDetails);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.fetchAnonymizationTableData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  changeFieldAnonymization(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldSchema: EntitySchemaField,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    newAnonymizationValue,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    fieldSchema.anonymize = newAnonymizationValue;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.adminEntityService.updateSchemaField(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityConstructor,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.fieldAnonymizationDataSource.data.find(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        (v) => v.field === fieldSchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ).key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      fieldSchema,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  private initToStringAttributesOptions() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    if (!this.generalSettings.toStringAttributes) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const selectedOptions = this.generalSettings.toStringAttributes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    const unselectedOptions = Array.from(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      this.entityConstructor.schema.entries(),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        ([key, field]) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          field.dataType === StringDatatype.dataType &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          field.label &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +          !selectedOptions.includes(key),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      .map(([key, field]) => ({ key: key, label: field.label }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    this.toStringAttributesOptions = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ...selectedOptions.map((key) => ({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        key: key,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +        label: this.entityConstructor.schema.get(key)?.label,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      })),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +      ...unselectedOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  objectToLabel = (v: SimpleDropdownValue) => v?.label;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  objectToValue = (v: SimpleDropdownValue) => v?.key;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +interface SimpleDropdownValue {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  key: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +  label: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/SqlReport.html b/documentation/interfaces/SqlReport.html new file mode 100644 index 0000000000..00aa5bded1 --- /dev/null +++ b/documentation/interfaces/SqlReport.html @@ -0,0 +1,458 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + src/app/features/reporting/report-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Reports handles by the {@class SqlReportService}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + ReportConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + aggregationDefinition + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + aggregationDefinition: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              a valid SQL SELECT statements, can contain "?" placeholder for arguments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + mode + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + mode: + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + neededArgs + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + neededArgs: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              a list of arguments, passed into the sql statement

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              import { Entity, EntityConstructor } from "../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DatabaseEntity } from "../../core/entity/database-entity.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { Aggregation } from "./data-aggregation.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { ExportColumnConfig } from "../../core/export/data-transformation-service/export-column-config";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +import { DatabaseField } from "../../core/entity/database-field.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * A report can be accessed by users to generate aggregated statistics or customized exports calculated from available data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * "read" permission for a ReportConfig entity is also used to control which users can generate the report's results.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * This is the class which is saved to the database.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * However, when using this in code, use the {@link ReportEntity} instead which provides better type safety.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +@DatabaseEntity("ReportConfig")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +class ReportConfig extends Entity {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** human-readable title of the report */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @DatabaseField() title: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * (optional) mode of export.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * The {@link ReportEntity} holds the restriction on valid report modes.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * Default is "reporting"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @DatabaseField() mode?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * (sql only) list of arguments needed for the sql query. Placeholder "?" will be replaced.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @DatabaseField() neededArgs?: string[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** the definitions to calculate the report's aggregations */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @DatabaseField() aggregationDefinitions: any[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /** (sql only) the definition to calculate the report */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  @DatabaseField() aggregationDefinition: string | undefined = undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Union type to enable type safety for report configs.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Use this instead of the {@class ReportConfig}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export type ReportEntity = AggregationReport | ExportingReport | SqlReport;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * This allows the `ReportEntity` to also be used as a constructor or in the `EntityMapper`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export const ReportEntity = ReportConfig as EntityConstructor<ReportEntity>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Reports handles by the {@class DataAggregationService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface AggregationReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  mode: "reporting";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  aggregationDefinitions: Aggregation[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Reports handles by the {@class DataTransformationService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface ExportingReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * If no mode is set, it will default to 'exporting'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  mode?: "exporting";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  aggregationDefinitions: ExportColumnConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + * Reports handles by the {@class SqlReportService}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +export interface SqlReport extends ReportConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  mode: "sql";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * a valid SQL SELECT statements, can contain "?" placeholder for arguments
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  aggregationDefinition: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   * a list of arguments, passed into the sql statement
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +  neededArgs: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/TableRow.html b/documentation/interfaces/TableRow.html new file mode 100644 index 0000000000..4e18ca3e0a --- /dev/null +++ b/documentation/interfaces/TableRow.html @@ -0,0 +1,784 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + src/app/core/common-components/entities-table/entities-table.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Wrapper to keep additional form data for each row of an entity, required for inline editing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + formGroup + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + formGroup: EntityFormGroup<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : EntityFormGroup<T> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + record + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + record: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Component,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EventEmitter,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Input,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Output,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ViewChild,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { CommonModule } from "@angular/common";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityFieldEditComponent } from "../entity-field-edit/entity-field-edit.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityFieldLabelComponent } from "../entity-field-label/entity-field-label.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityFieldViewComponent } from "../entity-field-view/entity-field-view.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { ListPaginatorComponent } from "./list-paginator/list-paginator.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatCheckboxChange,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/material/checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatProgressBarModule } from "@angular/material/progress-bar";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatSlideToggleModule } from "@angular/material/slide-toggle";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatSort,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  MatSortModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  Sort,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  SortDirection,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "@angular/material/sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { MatTableDataSource, MatTableModule } from "@angular/material/table";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Entity, EntityConstructor } from "../../entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ColumnConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  toFormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../entity-form/FormConfig";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityFormGroup,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +} from "../entity-form/entity-form.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { tableSort } from "./table-sort/table-sort";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { UntilDestroy } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { entityFilterPredicate } from "../../filter/filter-generator/filter-predicate";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FormDialogService } from "../../form-dialog/form-dialog.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { Router } from "@angular/router";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { FilterService } from "../../filter/filter.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DataFilter } from "../../filter/filters/filters";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityInlineEditActionsComponent } from "./entity-inline-edit-actions/entity-inline-edit-actions.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityCreateButtonComponent } from "../entity-create-button/entity-create-button.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { DateDatatype } from "../../basic-datatypes/date/date.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntitySchemaService } from "../../entity/schema/entity-schema.service";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +import { EntityDatatype } from "../../basic-datatypes/entity/entity.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * A simple display component (no logic and transformations) to display a table of entities.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selector: "app-entities-table",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  imports: [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    CommonModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntityFieldEditComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntityFieldLabelComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntityFieldViewComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ListPaginatorComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatCheckboxModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatProgressBarModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatSlideToggleModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatSortModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    MatTableModule,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntityInlineEditActionsComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    EntityCreateButtonComponent,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  templateUrl: "./entities-table.component.html",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  styleUrl: "./entities-table.component.scss",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export class EntitiesTableComponent<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set records(value: T[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._records = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.updateFilteredData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.isLoading = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private lastSelectedIndex: number = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private lastSelection: boolean = null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _records: T[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** data displayed in the template's table */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  recordsDataSource: MatTableDataSource<TableRow<T>>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isLoading: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Additional or overwritten field configurations for columns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set customColumns(value: ColumnConfig[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._customColumns = (value ?? []).map((c) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this._entityType
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ? this.entityFormService.extendFormFieldConfig(c, this._entityType)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        : toFormFieldConfig(c),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const entityColumns = this._entityType?.schema
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ? [...this._entityType.schema.entries()].map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          ([id, field]) => ({ ...field, id }) as FormFieldConfig,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        )
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      : [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._columns = [
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ...entityColumns.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        // if there is a customColumn for a field from entity config, don't add the base schema field
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (c) => !this._customColumns.some((customCol) => customCol.id === c.id),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      ...this._customColumns,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._columns.forEach((c) => this.disableSortingHeaderForAdvancedFields(c));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!this.columnsToDisplay) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.columnsToDisplay = this._customColumns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .filter((c) => !c.hideFromTable)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        .map((c) => c.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.idForSavingPagination = this._customColumns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .map((col) => col.id)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      .join("");
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _customColumns: FormFieldConfig[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _columns: FormFieldConfig[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Manually define the columns to be shown.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set columnsToDisplay(value: string[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!value || value.length === 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      value = (this._customColumns ?? this._columns).map((c) => c.id);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    value = value.filter((c) => !c.startsWith("__")); // remove internal action columns
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const cols = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this._selectable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      cols.push(this.ACTIONCOLUMN_SELECT);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this._editable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      cols.push(this.ACTIONCOLUMN_EDIT);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    cols.push(...value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._columnsToDisplay = cols;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this.sortIsInferred) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.sortBy = this.inferDefaultSort();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.sortIsInferred = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _columnsToDisplay: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set entityType(value: EntityConstructor<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._entityType = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.customColumns = this._customColumns;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _entityType: EntityConstructor<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** how to sort data by default during initialization */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set sortBy(value: Sort) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!value) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._sortBy = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.sortIsInferred = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _sortBy: Sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @ViewChild(MatSort, { static: false }) set sort(sort: MatSort) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.recordsDataSource.sort = sort;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private sortIsInferred: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Adds a filter for the displayed data.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Only data, that passes the filter will be shown in the table.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set filter(value: DataFilter<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._filter = value ?? {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.updateFilteredData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _filter: DataFilter<T> = {};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** output the currently displayed records, whenever filters for the user change */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() filteredRecordsChange = new EventEmitter<T[]>(true);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private updateFilteredData() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.addActiveInactiveFilter(this._filter);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const filterPredicate = this.filterService.getFilterPredicate(this._filter);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const filteredData = this._records.filter(filterPredicate);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.recordsDataSource.data = filteredData.map((record) => ({ record }));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.filteredRecordsChange.emit(filteredData);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set filterFreetext(value: string) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.recordsDataSource.filter = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /** function returns the background color for each row*/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() getBackgroundColor?: (rec: T) => string = (rec: T) => rec.getColor();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  idForSavingPagination: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() clickMode: "popup" | "navigate" | "none" = "popup";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Emits the entity being clicked in the table - or the newly created entity from the "create" button.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() entityClick = new EventEmitter<T>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * BULK SELECT
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * User can use checkboxes to select multiple rows, so that parent components can execute bulk actions on them.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set selectable(v: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._selectable = v;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.columnsToDisplay = this._columnsToDisplay;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _selectable: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  readonly ACTIONCOLUMN_SELECT = "__select";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * outputs an event containing an array of currently selected records (checkmarked by the user)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Checkboxes to select rows are only displayed if you set "selectable" also.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() selectedRecordsChange: EventEmitter<T[]> = new EventEmitter<T[]>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() selectedRecords: T[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selectRow(row: TableRow<T>, checked: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (checked) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectedRecords.push(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const index = this.selectedRecords.indexOf(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      if (index > -1) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.selectedRecords.splice(index, 1);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.selectedRecordsChange.emit(this.selectedRecords);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * INLINE EDIT
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * User can switch a row into edit mode to change and save field values directly from within the table
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set editable(v: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._editable = v;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.columnsToDisplay = this._columnsToDisplay;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _editable: boolean = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  readonly ACTIONCOLUMN_EDIT = "__edit";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * factory method to create a new instance of the displayed Entity type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * used when the user adds a new entity to the list.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() newRecordFactory: () => T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Show one record's details in a modal dialog (if configured).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param row The entity whose details should be displayed.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  onRowClick(row: TableRow<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (row.formGroup && !row.formGroup.disabled) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this._selectable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectRow(row, !this.selectedRecords?.includes(row.record));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.showEntity(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.entityClick.emit(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  onRowMouseDown(event: MouseEvent, row: TableRow<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (!this._selectable) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.onRowClick(row);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // Find the index of the row in the sorted and filtered data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const sortedData = this.recordsDataSource.sortData(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.recordsDataSource.data,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.recordsDataSource.sort,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const currentIndex = sortedData.indexOf(row);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const isCheckboxClick =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      event.target instanceof HTMLInputElement &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      event.target.type === "checkbox";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (event.shiftKey && this.lastSelectedIndex !== null) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const start = Math.min(this.lastSelectedIndex, currentIndex);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const end = Math.max(this.lastSelectedIndex, currentIndex);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const shouldCheck =
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.lastSelection !== null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          ? !this.lastSelection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          : !this.selectedRecords.includes(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      for (let i = start; i <= end; i++) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const rowToSelect = sortedData[i];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        const isSelected = this.selectedRecords.includes(rowToSelect.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        if (shouldCheck && !isSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.selectedRecords.push(rowToSelect.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        } else if (!shouldCheck && isSelected) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          this.selectedRecords = this.selectedRecords.filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +            (record) => record !== rowToSelect.record,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectedRecordsChange.emit(this.selectedRecords);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      const isSelected = this.selectedRecords.includes(row.record);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectRow(row, !isSelected);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.lastSelectedIndex = currentIndex;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.lastSelection = isSelected;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (isCheckboxClick) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.onRowClick(row);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  onRowSelect(event: MatCheckboxChange, row: TableRow<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.selectRow(row, event.checked);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  selectAllRows(event: MatCheckboxChange) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (event.checked) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectedRecords = this.recordsDataSource.data.map(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        (row) => row.record,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.selectedRecords = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.selectedRecordsChange.emit(this.selectedRecords);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isAllSelected() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.selectedRecords.length === this.recordsDataSource.data.length;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  isIndeterminate() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return this.selectedRecords.length > 0 && !this.isAllSelected();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  showEntity(entity: T) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    switch (this.clickMode) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      case "popup":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.formDialog.openFormPopup(entity, this._customColumns);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      case "navigate":
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        this.router.navigate([
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          entity.getConstructor().route,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +          entity.isNew ? "new" : entity.getId(true),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        ]);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        break;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private entityFormService: EntityFormService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private formDialog: FormDialogService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private router: Router,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private filterService: FilterService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    private schemaService: EntitySchemaService,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.recordsDataSource = this.createDataSource();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private createDataSource() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const dataSource = new MatTableDataSource<TableRow<T>>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    dataSource.sortData = (data, sort) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      tableSort(data, {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        active: sort.active as keyof Entity | "",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        direction: sort.direction,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    dataSource.filterPredicate = (data, filter) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      entityFilterPredicate(data.record, filter);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return dataSource;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private inferDefaultSort(): Sort {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // initial sorting by first column, ensure that not the 'action' column is used
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const sortBy = (this._columnsToDisplay ?? []).filter(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      (c) => !c.startsWith("__"),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    )[0];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    const sortByColumn = this._columns.find((c) => c.id === sortBy);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    let sortDirection: SortDirection = "asc";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      sortByColumn?.viewComponent === "DisplayDate" ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      sortByColumn?.viewComponent === "DisplayMonth" ||
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      this.schemaService.getDatatypeOrDefault(sortByColumn?.dataType) instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +        DateDatatype
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      // flip default sort order for dates (latest first)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      sortDirection = "desc";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    return sortBy ? { active: sortBy, direction: sortDirection } : undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * Advanced fields like entity references cannot be sorted sensibly yet - disable sort for them.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @param c
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * @private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  private disableSortingHeaderForAdvancedFields(c: FormFieldConfig) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    // if no dataType is defined, these are dynamic, display-only components
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (c.isArray || c.dataType === EntityDatatype.dataType || !c.dataType) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      c.noSorting = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * FILTER ARCHIVED RECORDS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   * User can hide / show inactive records through a toggle
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Input() set showInactive(value: boolean) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (value === this._showInactive) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      return;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this._showInactive = value;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.updateFilteredData();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    this.showInactiveChange.emit(value);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  _showInactive: boolean = false;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  @Output() showInactiveChange = new EventEmitter<boolean>();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  addActiveInactiveFilter(filter: DataFilter<T>) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    if (this._showInactive) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      delete filter["isActive"];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +      filter["isActive"] = true;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + * Wrapper to keep additional form data for each row of an entity, required for inline editing.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +export interface TableRow<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  record: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +  formGroup?: EntityFormGroup<T>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/TodoCompletion.html b/documentation/interfaces/TodoCompletion.html new file mode 100644 index 0000000000..f1e1aaa881 --- /dev/null +++ b/documentation/interfaces/TodoCompletion.html @@ -0,0 +1,399 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + src/app/features/todos/model/todo-completion.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  meta details for completion of a Todo item.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + completedAt + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + completedAt: Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : Date + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  when the item was completed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + completedBy + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + completedBy: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  user id of who completed the task

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + nextRepetition + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + nextRepetition: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  the next task that was automatically created based on the repetitionInterval

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  export interface TodoCompletion {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** user id of who completed the task */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  completedBy: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** when the item was completed */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  completedAt: Date;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  /** the next task that was automatically created based on the repetitionInterval */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +  nextRepetition?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/UpdatedEntity.html b/documentation/interfaces/UpdatedEntity.html new file mode 100644 index 0000000000..e89cbe3b24 --- /dev/null +++ b/documentation/interfaces/UpdatedEntity.html @@ -0,0 +1,404 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + src/app/core/entity/model/entity-update.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Interface that conveys an updated entity as well as information +on the update-type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + entity + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + entity: T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : T + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The updated entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + type + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + type: "new" | "update" | "remove" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + Type : "new" | "update" | "remove" + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The type of the update, either: +"new" - a new entity was created, +"update" - an existing entity was updated +"remove" - the entity was deleted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import { Entity } from "./entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Interface that conveys an updated entity as well as information
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * on the update-type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export interface UpdatedEntity<T extends Entity> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The updated entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entity: T;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * The type of the update, either:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * "new" - a new entity was created,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * "update" - an existing entity was updated
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   * "remove" - the entity was deleted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  type: "new" | "update" | "remove";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * Updates a list of entities given an updated version of the entity. This updated version
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * can either be a new entity (that should be inserted into the list), or an existing entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * that should be updated or deleted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * The given array will not be mutated but will be returned when the given new entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * or type is illegal
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * @param next An entity that should be updated as well as the type of update. This, as well as the entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * may be undefined or null. In this event, the entities-array is returned as is.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * @param entities The entities to update, must be defined
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * @param addIfMissing (Optional) whether to add an entity that comes through an update event but is not part of the array yet,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + *                          default is to add, disable this if you do special filtering or calculations on the data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + * @return An array of the given entities with the update applied
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +export function applyUpdate<T extends Entity>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  entities: T[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  next: UpdatedEntity<T>,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  addIfMissing: boolean = true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +): T[] {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  if (!next || !next.entity || !entities) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return entities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  if (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    (next.type === "new" || (addIfMissing && next.type === "update")) &&
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    !entities.find((e) => e.getId() === next.entity.getId())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  ) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return [next.entity].concat(entities);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  if (next.type === "update") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return entities.map((e) =>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +      e.getId() === next.entity.getId() ? next.entity : e,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  if (next.type === "remove") {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +    return entities.filter((e) => e.getId() !== next.entity.getId());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +  return entities;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/UsageAnalyticsConfig.html b/documentation/interfaces/UsageAnalyticsConfig.html new file mode 100644 index 0000000000..8d9f29125c --- /dev/null +++ b/documentation/interfaces/UsageAnalyticsConfig.html @@ -0,0 +1,402 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + src/app/core/analytics/usage-analytics-config.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Interface for the config object in the general application configuration database +to define usage analytics settings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + no_cookies + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + no_cookies: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      do not set any cookies for analytics

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + site_id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + site_id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      the id by which this site is represented in the analytics backend

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + url + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + url: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      url of the backend to report usage data to

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      export interface UsageAnalyticsConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** url of the backend to report usage data to */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  url: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** the id by which this site is represented in the analytics backend */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  site_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  /** do not set any cookies for analytics */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +  no_cookies?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +export const USAGE_ANALYTICS_CONFIG_ID = "appConfig:usage-analytics";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ViewConfig.html b/documentation/interfaces/ViewConfig.html new file mode 100644 index 0000000000..74d7421141 --- /dev/null +++ b/documentation/interfaces/ViewConfig.html @@ -0,0 +1,376 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + src/app/core/config/dynamic-routing/view-config.interface.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Object specifying a route and config of its view +as stored in the config database

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Extends

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + DynamicComponentConfig +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + _id + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + _id: string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : string + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        config object id which equals the route path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + lazyLoaded + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + lazyLoaded: boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Type : boolean + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + Optional +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        indicate that the route is lazy loaded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        At the moment that means the routing is set in the app.routing.ts and not loaded from the config. +The ViewConfig of a lazy-loaded route is only used for additional flags like requiresAdmin.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import { DynamicComponentConfig } from "../dynamic-components/dynamic-component-config.interface";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * Object specifying a route and config of its view
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * as stored in the config database
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export interface ViewConfig<T = any> extends DynamicComponentConfig<T> {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /** config object id which equals the route path */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  _id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * indicate that the route is lazy loaded.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * At the moment that means the routing is set in the app.routing.ts and not loaded from the config.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   * The ViewConfig of a lazy-loaded route is only used for additional flags like `requiresAdmin`.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +  lazyLoaded?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + * The prefix which is used to find the ViewConfig's in the config file
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +export const PREFIX_VIEW_CONFIG = "view:";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ViewDistanceConfig.html b/documentation/interfaces/ViewDistanceConfig.html new file mode 100644 index 0000000000..b7ee5c15d8 --- /dev/null +++ b/documentation/interfaces/ViewDistanceConfig.html @@ -0,0 +1,425 @@ + + + + + + ndb-core documentation + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          File

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + src/app/features/location/view-distance/view-distance.component.ts +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Config for displaying the distance between two entities

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Index

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Properties

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + compareCoordinates + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + compareCoordinates: Observable<Coordinates[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : Observable<Coordinates[]> + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The updates of coordinates of the second entity. +A ReplaySubject works best for this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + coordinatesProperties + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + coordinatesProperties: string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + Type : string[] + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The name of the GeoResult/Coordinates property of the first entity

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          import { ChangeDetectorRef, Component, OnInit } from "@angular/core";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ViewDirective } from "../../../core/entity/default-datatype/view.directive";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Entity } from "../../../core/entity/model/entity";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Coordinates } from "../coordinates";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { getKmDistance } from "../map-utils";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { Observable } from "rxjs";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { ReadonlyFunctionComponent } from "../../../core/common-components/display-readonly-function/readonly-function.component";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +import { GeoLocation } from "../location.datatype";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Config for displaying the distance between two entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export interface ViewDistanceConfig {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The name of the `GeoResult`/`Coordinates` property of the first entity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  coordinatesProperties: string[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * The updates of coordinates of the second entity.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   * A `ReplaySubject` works best for this.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +   */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  compareCoordinates: Observable<Coordinates[]>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +/**
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + * Displays the distance between two entities
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@UntilDestroy()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@DynamicComponent("DisplayDistance")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +@Component({
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  selector: "app-view-distance",
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  template: `
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    <app-readonly-function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [entity]="entity"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      [config]="distanceFunction"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    ></app-readonly-function>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  `,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  imports: [ReadonlyFunctionComponent],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  standalone: true,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +export class ViewDistanceComponent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  extends ViewDirective<Geolocation, ViewDistanceConfig>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  implements OnInit
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +{
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  constructor(private changeDetector: ChangeDetectorRef) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    super();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  distanceFunction = (_entity: Entity) => "-";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  ngOnInit() {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.config.compareCoordinates
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .pipe(untilDestroyed(this))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      .subscribe((coordinates) => this.setDistanceFunction(coordinates));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private setDistanceFunction(compareCoordinates: Coordinates[]) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.distanceFunction = (e: Entity) => {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      const distances = this.getAllDistances(compareCoordinates, e);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      if (distances.length > 0) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        const closest = Math.min(...distances).toFixed(2);
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return $localize`:distance with unit|e.g. 5 km:${closest} km`;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      } else {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        return "-";
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    // somehow changes to `displayFunction` don't trigger the change detection
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    this.changeDetector.detectChanges();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  private getAllDistances(compareCoordinates: Coordinates[], e: Entity) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    const results: number[] = [];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    for (const prop of this.config.coordinatesProperties) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      for (const coord of compareCoordinates) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        if (e[prop]?.geoLookup && coord) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          results.push(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +            getKmDistance((e[prop] as GeoLocation).geoLookup, coord),
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +          );
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +      }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +    return results;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +  }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          + + + + + + + + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No results matching ""

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/js/compodoc.js b/documentation/js/compodoc.js new file mode 100644 index 0000000000..8cc41d3354 --- /dev/null +++ b/documentation/js/compodoc.js @@ -0,0 +1,14 @@ +var compodoc = { + EVENTS: { + READY: 'compodoc.ready', + SEARCH_READY: 'compodoc.search.ready' + } +}; + +Object.assign( compodoc, EventDispatcher.prototype ); + +document.addEventListener('DOMContentLoaded', function() { + compodoc.dispatchEvent({ + type: compodoc.EVENTS.READY + }); +}); diff --git a/documentation/js/lazy-load-graphs.js b/documentation/js/lazy-load-graphs.js new file mode 100644 index 0000000000..2ef47cab9e --- /dev/null +++ b/documentation/js/lazy-load-graphs.js @@ -0,0 +1,44 @@ +document.addEventListener('DOMContentLoaded', function() { + var lazyGraphs = [].slice.call(document.querySelectorAll('[lazy]')); + var active = false; + + var lazyLoad = function() { + if (active === false) { + active = true; + + setTimeout(function() { + lazyGraphs.forEach(function(lazyGraph) { + if ( + lazyGraph.getBoundingClientRect().top <= window.innerHeight && + lazyGraph.getBoundingClientRect().bottom >= 0 && + getComputedStyle(lazyGraph).display !== 'none' + ) { + lazyGraph.data = lazyGraph.getAttribute('lazy'); + lazyGraph.removeAttribute('lazy'); + + lazyGraphs = lazyGraphs.filter(function(image) { return image !== lazyGraph}); + + if (lazyGraphs.length === 0) { + document.removeEventListener('scroll', lazyLoad); + window.removeEventListener('resize', lazyLoad); + window.removeEventListener('orientationchange', lazyLoad); + } + } + }); + + active = false; + }, 200); + } + }; + + // initial load + lazyLoad(); + + var container = document.querySelector('.container-fluid.modules'); + if (container) { + container.addEventListener('scroll', lazyLoad); + window.addEventListener('resize', lazyLoad); + window.addEventListener('orientationchange', lazyLoad); + } + +}); diff --git a/documentation/js/libs/EventDispatcher.js b/documentation/js/libs/EventDispatcher.js new file mode 100644 index 0000000000..f112877d70 --- /dev/null +++ b/documentation/js/libs/EventDispatcher.js @@ -0,0 +1,5 @@ +/** + * @author mrdoob / http://mrdoob.com/ + */ + +var EventDispatcher=function(){};Object.assign(EventDispatcher.prototype,{addEventListener:function(i,t){void 0===this._listeners&&(this._listeners={});var e=this._listeners;void 0===e[i]&&(e[i]=[]),-1===e[i].indexOf(t)&&e[i].push(t)},hasEventListener:function(i,t){if(void 0===this._listeners)return!1;var e=this._listeners;return void 0!==e[i]&&-1!==e[i].indexOf(t)},removeEventListener:function(i,t){if(void 0!==this._listeners){var e=this._listeners[i];if(void 0!==e){var s=e.indexOf(t);-1!==s&&e.splice(s,1)}}},dispatchEvent:function(i){if(void 0!==this._listeners){var t=this._listeners[i.type];if(void 0!==t){i.target=this;var e=[],s=0,n=t.length;for(s=0;sit in H?Vc(H,it,{enumerable:!0,configurable:!0,writable:!0,value:ct}):H[it]=ct;var d=(H,it,ct)=>(Kc(H,typeof it!="symbol"?it+"":it,ct),ct);const it="aria-describedby",ct="aria-expanded",Se="aria-hidden",He="aria-modal",_s="aria-pressed",Ue="aria-selected",Bo="DOMContentLoaded",qe="focus",Qe="focusin",Bs="focusout",Pe="keydown",Ro="keyup",N="click",Rs="mousedown",Wo="hover",De="mouseenter",Ze="mouseleave",Fo="pointerdown",jo="pointermove",zo="pointerup",xe="resize",Ae="scroll",Ge="touchstart",Vo="dragstart",Je="ArrowDown",ts="ArrowUp",Ws="ArrowLeft",Fs="ArrowRight",es="Escape",Ko="transitionDuration",Xo="transitionDelay",ss="transitionend",js="transitionProperty",Yo=navigator.userAgentData,Le=Yo,{userAgent:Uo}=navigator,Ie=Uo,zs=/iPhone|iPad|iPod|Android/i;Le?Le.brands.some(t=>zs.test(t.brand)):zs.test(Ie);const Vs=/(iPhone|iPod|iPad)/,qo=Le?Le.brands.some(t=>Vs.test(t.brand)):Vs.test(Ie);Ie&&Ie.includes("Firefox");const{head:ke}=document;["webkitPerspective","perspective"].some(t=>t in ke.style);const Qo=(t,s,e,n)=>{const o=n||!1;t.addEventListener(s,e,o)},Zo=(t,s,e,n)=>{const o=n||!1;t.removeEventListener(s,e,o)},Go=(t,s,e,n)=>{const o=i=>{(i.target===t||i.currentTarget===t)&&(e.apply(t,[i]),Zo(t,s,o,n))};Qo(t,s,o,n)},le=()=>{};(()=>{let t=!1;try{const s=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});Go(document,Bo,le,s)}catch{}return t})(),["webkitTransform","transform"].some(t=>t in ke.style),["webkitAnimation","animation"].some(t=>t in ke.style),["webkitTransition","transition"].some(t=>t in ke.style);const at=(t,s)=>t.getAttribute(s),Ne=(t,s)=>t.hasAttribute(s),O=(t,s,e)=>t.setAttribute(s,e),At=(t,s)=>t.removeAttribute(s),f=(t,...s)=>{t.classList.add(...s)},b=(t,...s)=>{t.classList.remove(...s)},h=(t,s)=>t.classList.contains(s),de=t=>t!=null&&typeof t=="object"||!1,A=t=>de(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(s=>t.nodeType===s)||!1,T=t=>A(t)&&t.nodeType===1||!1,jt=new Map,Lt={data:jt,set:(t,s,e)=>{T(t)&&(jt.has(s)||jt.set(s,new Map),jt.get(s).set(t,e))},getAllFor:t=>jt.get(t)||null,get:(t,s)=>{if(!T(t)||!s)return null;const e=Lt.getAllFor(s);return t&&e&&e.get(t)||null},remove:(t,s)=>{const e=Lt.getAllFor(s);!e||!T(t)||(e.delete(t),e.size===0&&jt.delete(s))}},F=(t,s)=>Lt.get(t,s),he=t=>typeof t=="string"||!1,ns=t=>de(t)&&t.constructor.name==="Window"||!1,Ks=t=>A(t)&&t.nodeType===9||!1,E=t=>ns(t)?t.document:Ks(t)?t:A(t)?t.ownerDocument:window.document,dt=(t,...s)=>Object.assign(t,...s),vt=t=>{if(!t)return;if(he(t))return E().createElement(t);const{tagName:s}=t,e=vt(s);if(!e)return;const n={...t};return delete n.tagName,dt(e,n)},w=(t,s)=>t.dispatchEvent(s),z=(t,s)=>{const e=getComputedStyle(t),n=s.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return e.getPropertyValue(n)},Jo=t=>{const s=z(t,js),e=z(t,Xo),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},zt=t=>{const s=z(t,js),e=z(t,Ko),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},P=(t,s)=>{let e=0;const n=new Event(ss),o=zt(t),i=Jo(t);if(o){const c=a=>{a.target===t&&(s.apply(t,[a]),t.removeEventListener(ss,c),e=1)};t.addEventListener(ss,c),setTimeout(()=>{e||w(t,n)},o+i+17)}else s.apply(t,[n])},ht=(t,s)=>t.focus(s),Xs=t=>["true",!0].includes(t)?!0:["false",!1].includes(t)?!1:["null","",null,void 0].includes(t)?null:t!==""&&!Number.isNaN(+t)?+t:t,Oe=t=>Object.entries(t),Vt=t=>t.toLowerCase(),ti=(t,s,e,n)=>{const o={...e},i={...t.dataset},c={...s},a={},l="title";return Oe(i).forEach(([r,g])=>{const p=n&&typeof r=="string"&&r.includes(n)?r.replace(n,"").replace(/[A-Z]/g,v=>Vt(v)):r;a[p]=Xs(g)}),Oe(o).forEach(([r,g])=>{o[r]=Xs(g)}),Oe(s).forEach(([r,g])=>{r in o?c[r]=o[r]:r in a?c[r]=a[r]:c[r]=r===l?at(t,l):g}),c},Ys=t=>Object.keys(t),$=(t,s)=>{const e=new CustomEvent(t,{cancelable:!0,bubbles:!0});return de(s)&&dt(e,s),e},tt={passive:!0},It=t=>t.offsetHeight,L=(t,s)=>{Oe(s).forEach(([e,n])=>{if(n&&he(e)&&e.includes("--"))t.style.setProperty(e,n);else{const o={};o[e]=n,dt(t.style,o)}})},os=t=>de(t)&&t.constructor.name==="Map"||!1,ei=t=>typeof t=="number"||!1,bt=new Map,u={set:(t,s,e,n)=>{T(t)&&(n&&n.length?(bt.has(t)||bt.set(t,new Map),bt.get(t).set(n,setTimeout(s,e))):bt.set(t,setTimeout(s,e)))},get:(t,s)=>{if(!T(t))return null;const e=bt.get(t);return s&&e&&os(e)?e.get(s)||null:ei(e)?e:null},clear:(t,s)=>{if(!T(t))return;const e=bt.get(t);s&&s.length&&os(e)?(clearTimeout(e.get(s)),e.delete(s),e.size===0&&bt.delete(t)):(clearTimeout(e),bt.delete(t))}},fe=(t,s)=>{const{width:e,height:n,top:o,right:i,bottom:c,left:a}=t.getBoundingClientRect();let l=1,r=1;if(s&&T(t)){const{offsetWidth:g,offsetHeight:p}=t;l=g>0?Math.round(e)/g:1,r=p>0?Math.round(n)/p:1}return{width:e/l,height:n/r,top:o/r,right:i/l,bottom:c/r,left:a/l,x:a/l,y:o/r}},wt=t=>E(t).body,ft=t=>E(t).documentElement,Us=t=>A(t)&&t.constructor.name==="ShadowRoot"||!1,si=t=>t.nodeName==="HTML"?t:T(t)&&t.assignedSlot||A(t)&&t.parentNode||Us(t)&&t.host||ft(t);let qs=0,Qs=0;const Kt=new Map,Zs=(t,s)=>{let e=s?qs:Qs;if(s){const n=Zs(t),o=Kt.get(n)||new Map;Kt.has(n)||Kt.set(n,o),os(o)&&!o.has(s)?(o.set(s,e),qs+=1):e=o.get(s)}else{const n=t.id||t;Kt.has(n)?e=Kt.get(n):(Kt.set(n,e),Qs+=1)}return e},Xt=t=>{var s;return t?Ks(t)?t.defaultView:A(t)?(s=t==null?void 0:t.ownerDocument)==null?void 0:s.defaultView:t:window},ni=t=>Array.isArray(t)||!1,Gs=t=>{if(!A(t))return!1;const{top:s,bottom:e}=fe(t),{clientHeight:n}=ft(t);return s<=n&&e>=0},oi=t=>typeof t=="function"||!1,ii=t=>de(t)&&t.constructor.name==="NodeList"||!1,Et=t=>ft(t).dir==="rtl",ci=t=>A(t)&&["TABLE","TD","TH"].includes(t.nodeName)||!1,M=(t,s)=>t?t.closest(s)||M(t.getRootNode().host,s):null,D=(t,s)=>T(t)?t:(A(s)?s:E()).querySelector(t),is=(t,s)=>(A(s)?s:E()).getElementsByTagName(t),et=(t,s)=>(A(s)?s:E()).querySelectorAll(t),gt=(t,s)=>(s&&A(s)?s:E()).getElementsByClassName(t),Js=(t,s)=>t.matches(s),Yt={},tn=t=>{const{type:s,currentTarget:e}=t;[...Yt[s]].forEach(([n,o])=>{e===n&&[...o].forEach(([i,c])=>{i.apply(n,[t]),typeof c=="object"&&c.once&&B(n,s,i,c)})})},_=(t,s,e,n)=>{Yt[s]||(Yt[s]=new Map);const o=Yt[s];o.has(t)||o.set(t,new Map);const i=o.get(t),{size:c}=i;i.set(e,n),c||t.addEventListener(s,tn,n)},B=(t,s,e,n)=>{const o=Yt[s],i=o&&o.get(t),c=i&&i.get(e),a=c!==void 0?c:n;i&&i.has(e)&&i.delete(e),o&&(!i||!i.size)&&o.delete(t),(!o||!o.size)&&delete Yt[s],(!i||!i.size)&&t.removeEventListener(s,tn,a)},W="fade",m="show",Me="data-bs-dismiss",_e="alert",en="Alert",ai="5.0.12";class st{constructor(s,e){d(this,"_toggleEventListeners",()=>{});const n=D(s);if(!n)throw he(s)?Error(`${this.name} Error: "${s}" is not a valid selector.`):Error(`${this.name} Error: your target is not an instance of HTMLElement.`);const o=Lt.get(n,this.name);o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&Ys(this.defaults).length?ti(n,this.defaults,e||{},"bs"):{},Lt.set(n,this.name,this)}get version(){return ai}get name(){return"BaseComponent"}get defaults(){return{}}dispose(){Lt.remove(this.element,this.name),Ys(this).forEach(s=>{delete this[s]})}}const ri=`.${_e}`,li=`[${Me}="${_e}"]`,di=t=>F(t,en),hi=t=>new Ut(t),sn=$(`close.bs.${_e}`),fi=$(`closed.bs.${_e}`),nn=t=>{const{element:s}=t;w(s,fi),t._toggleEventListeners(),t.dispose(),s.remove()};class Ut extends st{constructor(e){super(e);d(this,"dismiss");d(this,"close",()=>{const{element:e}=this;e&&h(e,m)&&(w(e,sn),sn.defaultPrevented||(b(e,m),h(e,W)?P(e,()=>nn(this)):nn(this)))});d(this,"_toggleEventListeners",e=>{const n=e?_:B,{dismiss:o,close:i}=this;o&&n(o,N,i)});this.dismiss=D(li,this.element),this._toggleEventListeners(!0)}get name(){return en}dispose(){this._toggleEventListeners(),super.dispose()}}d(Ut,"selector",ri),d(Ut,"init",hi),d(Ut,"getInstance",di);const C="active",rt="data-bs-toggle",gi="button",on="Button",pi=`[${rt}="${gi}"]`,ui=t=>F(t,on),mi=t=>new qt(t);class qt extends st{constructor(e){super(e);d(this,"isActive",!1);d(this,"toggle",e=>{e&&e.preventDefault();const{element:n,isActive:o}=this;!h(n,"disabled")&&!at(n,"disabled")&&((o?b:f)(n,C),O(n,_s,o?"false":"true"),this.isActive=h(n,C))});d(this,"_toggleEventListeners",e=>{(e?_:B)(this.element,N,this.toggle)});const{element:n}=this;this.isActive=h(n,C),O(n,_s,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return on}dispose(){this._toggleEventListeners(),super.dispose()}}d(qt,"selector",pi),d(qt,"init",mi),d(qt,"getInstance",ui);const cs="data-bs-target",kt="carousel",cn="Carousel",an="data-bs-parent",vi="data-bs-container",V=t=>{const s=[cs,an,vi,"href"],e=E(t);return s.map(n=>{const o=at(t,n);return o?n===an?M(t,o):D(o,e):null}).filter(n=>n)[0]},ge=`[data-bs-ride="${kt}"]`,Q=`${kt}-item`,as="data-bs-slide-to",$t="data-bs-slide",Tt="paused",rn={pause:"hover",keyboard:!1,touch:!0,interval:5e3},pt=t=>F(t,cn),bi=t=>new Qt(t);let pe=0,Be=0,rs=0;const ls=$(`slide.bs.${kt}`),ds=$(`slid.bs.${kt}`),ln=t=>{const{index:s,direction:e,element:n,slides:o,options:i}=t;if(t.isAnimating){const c=fs(t),a=e==="left"?"next":"prev",l=e==="left"?"start":"end";f(o[s],C),b(o[s],`${Q}-${a}`),b(o[s],`${Q}-${l}`),b(o[c],C),b(o[c],`${Q}-${l}`),w(n,ds),u.clear(n,$t),t.cycle&&!E(n).hidden&&i.interval&&!t.isPaused&&t.cycle()}};function wi(){const t=pt(this);t&&!t.isPaused&&!u.get(this,Tt)&&f(this,Tt)}function Ei(){const t=pt(this);t&&t.isPaused&&!u.get(this,Tt)&&t.cycle()}function $i(t){t.preventDefault();const s=M(this,ge)||V(this),e=pt(s);if(e&&!e.isAnimating){const n=+(at(this,as)||0);this&&!h(this,C)&&!Number.isNaN(n)&&e.to(n)}}function Ti(t){t.preventDefault();const s=M(this,ge)||V(this),e=pt(s);if(e&&!e.isAnimating){const n=at(this,$t);n==="next"?e.next():n==="prev"&&e.prev()}}const yi=({code:t,target:s})=>{const e=E(s),[n]=[...et(ge,e)].filter(i=>Gs(i)),o=pt(n);if(o&&!o.isAnimating&&!/textarea|input/i.test(s.nodeName)){const i=Et(n);t===(i?Fs:Ws)?o.prev():t===(i?Ws:Fs)&&o.next()}};function dn(t){const{target:s}=t,e=pt(this);e&&e.isTouch&&(e.indicator&&!e.indicator.contains(s)||!e.controls.includes(s))&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())}function Ci(t){const{target:s}=t,e=pt(this);if(e&&!e.isAnimating&&!e.isTouch){const{controls:n,indicators:o}=e;[...n,...o].every(i=>i===s||i.contains(s))||(pe=t.pageX,this.contains(s)&&(e.isTouch=!0,hn(e,!0)))}}const Si=t=>{Be=t.pageX},Hi=t=>{var o;const{target:s}=t,e=E(s),n=[...et(ge,e)].map(i=>pt(i)).find(i=>i.isTouch);if(n){const{element:i,index:c}=n,a=Et(i);rs=t.pageX,n.isTouch=!1,hn(n),!((o=e.getSelection())!=null&&o.toString().length)&&i.contains(s)&&Math.abs(pe-rs)>120&&(Bepe&&n.to(c+(a?1:-1))),pe=0,Be=0,rs=0}},hs=(t,s)=>{const{indicators:e}=t;[...e].forEach(n=>b(n,C)),t.indicators[s]&&f(e[s],C)},hn=(t,s)=>{const{element:e}=t,n=s?_:B;n(E(e),jo,Si,tt),n(E(e),zo,Hi,tt)},fs=t=>{const{slides:s,element:e}=t,n=D(`.${Q}.${C}`,e);return T(n)?[...s].indexOf(n):-1};class Qt extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const{element:n,options:o,slides:i,controls:c,indicators:a}=this,{touch:l,pause:r,interval:g,keyboard:p}=o,v=e?_:B;r&&g&&(v(n,De,wi),v(n,Ze,Ei)),l&&i.length>2&&(v(n,Fo,Ci,tt),v(n,Ge,dn,{passive:!1}),v(n,Vo,dn,{passive:!1})),c.length&&c.forEach(k=>{k&&v(k,N,Ti)}),a.length&&a.forEach(k=>{v(k,N,$i)}),p&&v(E(n),Pe,yi)});const{element:o}=this;this.direction=Et(o)?"right":"left",this.isTouch=!1,this.slides=gt(Q,o);const{slides:i}=this;if(i.length>=2){const c=fs(this),a=[...i].find(g=>Js(g,`.${Q}-next,.${Q}-next`));this.index=c;const l=E(o);this.controls=[...et(`[${$t}]`,o),...et(`[${$t}][${cs}="#${o.id}"]`,l)].filter((g,p,v)=>p===v.indexOf(g)),this.indicator=D(`.${kt}-indicators`,o),this.indicators=[...this.indicator?et(`[${as}]`,this.indicator):[],...et(`[${as}][${cs}="#${o.id}"]`,l)].filter((g,p,v)=>p===v.indexOf(g));const{options:r}=this;this.options.interval=r.interval===!0?rn.interval:r.interval,a?this.index=[...i].indexOf(a):c<0&&(this.index=0,f(i[0],C),this.indicators.length&&hs(this,0)),this.indicators.length&&hs(this,this.index),this._toggleEventListeners(!0),r.interval&&this.cycle()}}get name(){return cn}get defaults(){return rn}get isPaused(){return h(this.element,Tt)}get isAnimating(){return D(`.${Q}-next,.${Q}-prev`,this.element)!==null}cycle(){const{element:e,options:n,isPaused:o,index:i}=this;u.clear(e,kt),o&&(u.clear(e,Tt),b(e,Tt)),u.set(e,()=>{this.element&&!this.isPaused&&!this.isTouch&&Gs(e)&&this.to(i+1)},n.interval,kt)}pause(){const{element:e,options:n}=this;!this.isPaused&&n.interval&&(f(e,Tt),u.set(e,()=>{},1,Tt))}next(){this.isAnimating||this.to(this.index+1)}prev(){this.isAnimating||this.to(this.index-1)}to(e){const{element:n,slides:o,options:i}=this,c=fs(this),a=Et(n);let l=e;if(!this.isAnimating&&c!==l&&!u.get(n,$t)){cl||c===o.length-1&&l===0)&&(this.direction=a?"left":"right");const{direction:r}=this;l<0?l=o.length-1:l>=o.length&&(l=0);const g=r==="left"?"next":"prev",p=r==="left"?"start":"end",v={relatedTarget:o[l],from:c,to:l,direction:r};dt(ls,v),dt(ds,v),w(n,ls),ls.defaultPrevented||(this.index=l,hs(this,l),zt(o[l])&&h(n,"slide")?u.set(n,()=>{f(o[l],`${Q}-${g}`),It(o[l]),f(o[l],`${Q}-${p}`),f(o[c],`${Q}-${p}`),P(o[l],()=>this.slides&&this.slides.length&&ln(this))},0,$t):(f(o[l],C),b(o[c],C),u.set(n,()=>{u.clear(n,$t),n&&i.interval&&!this.isPaused&&this.cycle(),w(n,ds)},0,$t)))}}dispose(){const{isAnimating:e}=this,n={...this,isAnimating:e};this._toggleEventListeners(),super.dispose(),n.isAnimating&&P(n.slides[n.index],()=>{ln(n)})}}d(Qt,"selector",ge),d(Qt,"init",bi),d(Qt,"getInstance",pt);const Nt="collapsing",K="collapse",fn="Collapse",Pi=`.${K}`,gn=`[${rt}="${K}"]`,Di={parent:null},Re=t=>F(t,fn),xi=t=>new Zt(t),pn=$(`show.bs.${K}`),Ai=$(`shown.bs.${K}`),un=$(`hide.bs.${K}`),Li=$(`hidden.bs.${K}`),Ii=t=>{const{element:s,parent:e,triggers:n}=t;w(s,pn),pn.defaultPrevented||(u.set(s,le,17),e&&u.set(e,le,17),f(s,Nt),b(s,K),L(s,{height:`${s.scrollHeight}px`}),P(s,()=>{u.clear(s),e&&u.clear(e),n.forEach(o=>O(o,ct,"true")),b(s,Nt),f(s,K),f(s,m),L(s,{height:""}),w(s,Ai)}))},mn=t=>{const{element:s,parent:e,triggers:n}=t;w(s,un),un.defaultPrevented||(u.set(s,le,17),e&&u.set(e,le,17),L(s,{height:`${s.scrollHeight}px`}),b(s,K),b(s,m),f(s,Nt),It(s),L(s,{height:"0px"}),P(s,()=>{u.clear(s),e&&u.clear(e),n.forEach(o=>O(o,ct,"false")),b(s,Nt),f(s,K),L(s,{height:""}),w(s,Li)}))},ki=t=>{const{target:s}=t,e=s&&M(s,gn),n=e&&V(e),o=n&&Re(n);o&&o.toggle(),e&&e.tagName==="A"&&t.preventDefault()};class Zt extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?_:B,{triggers:o}=this;o.length&&o.forEach(i=>n(i,N,ki))});const{element:o,options:i}=this,c=E(o);this.triggers=[...et(gn,c)].filter(a=>V(a)===o),this.parent=T(i.parent)?i.parent:he(i.parent)?V(o)||D(i.parent,c):null,this._toggleEventListeners(!0)}get name(){return fn}get defaults(){return Di}hide(){const{triggers:e,element:n}=this;u.get(n)||(mn(this),e.length&&e.forEach(o=>f(o,`${K}d`)))}show(){const{element:e,parent:n,triggers:o}=this;let i,c;n&&(i=[...et(`.${K}.${m}`,n)].find(a=>Re(a)),c=i&&Re(i)),(!n||!u.get(n))&&!u.get(e)&&(c&&i!==e&&(mn(c),c.triggers.forEach(a=>{f(a,`${K}d`)})),Ii(this),o.length&&o.forEach(a=>b(a,`${K}d`)))}toggle(){h(this.element,m)?this.hide():this.show()}dispose(){this._toggleEventListeners(),super.dispose()}}d(Zt,"selector",Pi),d(Zt,"init",xi),d(Zt,"getInstance",Re);const Ot=["dropdown","dropup","dropstart","dropend"],vn="Dropdown",bn="dropdown-menu",wn=t=>{const s=M(t,"A");return t.tagName==="A"&&Ne(t,"href")&&at(t,"href").slice(-1)==="#"||s&&Ne(s,"href")&&at(s,"href").slice(-1)==="#"},[nt,gs,ps,us]=Ot,En=`[${rt}="${nt}"]`,Gt=t=>F(t,vn),Ni=t=>new Jt(t),Oi=`${bn}-end`,$n=[nt,gs],Tn=[ps,us],yn=["A","BUTTON"],Mi={offset:5,display:"dynamic"},ms=$(`show.bs.${nt}`),Cn=$(`shown.bs.${nt}`),vs=$(`hide.bs.${nt}`),Sn=$(`hidden.bs.${nt}`),Hn=$(`updated.bs.${nt}`),Pn=t=>{const{element:s,menu:e,parentElement:n,options:o}=t,{offset:i}=o;if(z(e,"position")!=="static"){const c=Et(s),a=h(e,Oi);["margin","top","bottom","left","right"].forEach(R=>{const Pt={};Pt[R]="",L(e,Pt)});let r=Ot.find(R=>h(n,R))||nt;const g={dropdown:[i,0,0],dropup:[0,0,i],dropstart:c?[-1,0,0,i]:[-1,i,0],dropend:c?[-1,i,0]:[-1,0,0,i]},p={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:c?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:c?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:c?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:c?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:v,offsetHeight:k}=e,{clientWidth:J,clientHeight:y}=ft(s),{left:X,top:q,width:ce,height:mt}=fe(s),S=X-v-i<0,ot=X+v+ce+i>=J,lt=q+k+i>=y,j=q+k+mt+i>=y,Y=q-k-i<0,x=(!c&&a||c&&!a)&&X+ce-v<0,ae=(c&&a||!c&&!a)&&X+v>=J;if(Tn.includes(r)&&S&&ot&&(r=nt),r===ps&&(c?ot:S)&&(r=us),r===us&&(c?S:ot)&&(r=ps),r===gs&&Y&&!j&&(r=nt),r===nt&&j&&!Y&&(r=gs),Tn.includes(r)&<&&dt(p[r],{top:"auto",bottom:0}),$n.includes(r)&&(x||ae)){let R={left:"auto",right:"auto"};!x&&ae&&!c&&(R={left:"auto",right:0}),x&&!ae&&c&&(R={left:0,right:"auto"}),R&&dt(p[r],R)}const Ht=g[r];L(e,{...p[r],margin:`${Ht.map(R=>R&&`${R}px`).join(" ")}`}),$n.includes(r)&&a&&a&&L(e,p[!c&&x||c&&ae?"menuStart":"menuEnd"]),w(n,Hn)}},_i=t=>[...t.children].map(s=>{if(s&&yn.includes(s.tagName))return s;const{firstElementChild:e}=s;return e&&yn.includes(e.tagName)?e:null}).filter(s=>s),Dn=t=>{const{element:s,options:e}=t,n=t.open?_:B,o=E(s);n(o,N,xn),n(o,qe,xn),n(o,Pe,Ri),n(o,Ro,Wi),e.display==="dynamic"&&[Ae,xe].forEach(i=>{n(Xt(s),i,Fi,tt)})},We=t=>{const s=[...Ot,"btn-group","input-group"].map(e=>gt(`${e} ${m}`,E(t))).find(e=>e.length);if(s&&s.length)return[...s[0].children].find(e=>Ot.some(n=>n===at(e,rt)))},xn=t=>{const{target:s,type:e}=t;if(s&&T(s)){const n=We(s),o=n&&Gt(n);if(o){const{parentElement:i,menu:c}=o,a=i&&i.contains(s)&&(s.tagName==="form"||M(s,"form")!==null);[N,Rs].includes(e)&&wn(s)&&t.preventDefault(),!a&&e!==qe&&s!==n&&s!==c&&o.hide()}}},Bi=t=>{const{target:s}=t,e=s&&M(s,En),n=e&&Gt(e);n&&(t.stopPropagation(),n.toggle(),e&&wn(e)&&t.preventDefault())},Ri=t=>{[Je,ts].includes(t.code)&&t.preventDefault()};function Wi(t){const{code:s}=t,e=We(this),n=e&&Gt(e),{activeElement:o}=e&&E(e);if(n&&o){const{menu:i,open:c}=n,a=_i(i);if(a&&a.length&&[Je,ts].includes(s)){let l=a.indexOf(o);o===e?l=0:s===ts?l=l>1?l-1:0:s===Je&&(l=l{(e?_:B)(this.element,N,Bi)});const{parentElement:o}=this.element,[i]=gt(bn,o);i&&(this.parentElement=o,this.menu=i,this._toggleEventListeners(!0))}get name(){return vn}get defaults(){return Mi}toggle(){this.open?this.hide():this.show()}show(){const{element:e,open:n,menu:o,parentElement:i}=this;if(!n){const c=We(e),a=c&&Gt(c);a&&a.hide(),[ms,Cn,Hn].forEach(l=>{l.relatedTarget=e}),w(i,ms),ms.defaultPrevented||(f(o,m),f(i,m),O(e,ct,"true"),Pn(this),this.open=!n,ht(e),Dn(this),w(i,Cn))}}hide(){const{element:e,open:n,menu:o,parentElement:i}=this;n&&([vs,Sn].forEach(c=>{c.relatedTarget=e}),w(i,vs),vs.defaultPrevented||(b(o,m),b(i,m),O(e,ct,"false"),this.open=!n,Dn(this),w(i,Sn)))}dispose(){this.open&&this.hide(),this._toggleEventListeners(),super.dispose()}}d(Jt,"selector",En),d(Jt,"init",Ni),d(Jt,"getInstance",Gt);const U="modal",bs="Modal",ws="Offcanvas",ji="fixed-top",zi="fixed-bottom",An="sticky-top",Ln="position-sticky",In=t=>[...gt(ji,t),...gt(zi,t),...gt(An,t),...gt(Ln,t),...gt("is-fixed",t)],Vi=t=>{const s=wt(t);L(s,{paddingRight:"",overflow:""});const e=In(s);e.length&&e.forEach(n=>{L(n,{paddingRight:"",marginRight:""})})},kn=t=>{const{clientWidth:s}=ft(t),{innerWidth:e}=Xt(t);return Math.abs(e-s)},Nn=(t,s)=>{const e=wt(t),n=parseInt(z(e,"paddingRight"),10),i=z(e,"overflow")==="hidden"&&n?0:kn(t),c=In(e);s&&(L(e,{overflow:"hidden",paddingRight:`${n+i}px`}),c.length&&c.forEach(a=>{const l=z(a,"paddingRight");if(a.style.paddingRight=`${parseInt(l,10)+i}px`,[An,Ln].some(r=>h(a,r))){const r=z(a,"marginRight");a.style.marginRight=`${parseInt(r,10)-i}px`}}))},Z="offcanvas",yt=vt({tagName:"div",className:"popup-container"}),On=(t,s)=>{const e=A(s)&&s.nodeName==="BODY",n=A(s)&&!e?s:yt,o=e?s:wt(t);A(t)&&(n===yt&&o.append(yt),n.append(t))},Mn=(t,s)=>{const e=A(s)&&s.nodeName==="BODY",n=A(s)&&!e?s:yt;A(t)&&(t.remove(),n===yt&&!yt.children.length&&yt.remove())},Es=(t,s)=>{const e=A(s)&&s.nodeName!=="BODY"?s:yt;return A(t)&&e.contains(t)},_n="backdrop",Bn=`${U}-${_n}`,Rn=`${Z}-${_n}`,Wn=`.${U}.${m}`,$s=`.${Z}.${m}`,I=vt("div"),Mt=t=>D(`${Wn},${$s}`,E(t)),Ts=t=>{const s=t?Bn:Rn;[Bn,Rn].forEach(e=>{b(I,e)}),f(I,s)},Fn=(t,s,e)=>{Ts(e),On(I,wt(t)),s&&f(I,W)},jn=()=>{h(I,m)||(f(I,m),It(I))},Fe=()=>{b(I,m)},zn=t=>{Mt(t)||(b(I,W),Mn(I,wt(t)),Vi(t))},Vn=t=>T(t)&&z(t,"visibility")!=="hidden"&&t.offsetParent!==null,Ki=`.${U}`,Kn=`[${rt}="${U}"]`,Xi=`[${Me}="${U}"]`,Xn=`${U}-static`,Yi={backdrop:!0,keyboard:!0},ue=t=>F(t,bs),Ui=t=>new te(t),je=$(`show.bs.${U}`),Yn=$(`shown.bs.${U}`),ys=$(`hide.bs.${U}`),Un=$(`hidden.bs.${U}`),qn=t=>{const{element:s}=t,e=kn(s),{clientHeight:n,scrollHeight:o}=ft(s),{clientHeight:i,scrollHeight:c}=s,a=i!==c;if(!a&&e){const l=Et(s)?"paddingLeft":"paddingRight",r={};r[l]=`${e}px`,L(s,r)}Nn(s,a||n!==o)},Qn=(t,s)=>{const e=s?_:B,{element:n,update:o}=t;e(n,N,Zi),e(Xt(n),xe,o,tt),e(E(n),Pe,Qi)},Zn=t=>{const{triggers:s,element:e,relatedTarget:n}=t;zn(e),L(e,{paddingRight:"",display:""}),Qn(t);const o=je.relatedTarget||s.find(Vn);o&&ht(o),Un.relatedTarget=n,w(e,Un)},Gn=t=>{const{element:s,relatedTarget:e}=t;ht(s),Qn(t,!0),Yn.relatedTarget=e,w(s,Yn)},Jn=t=>{const{element:s,hasFade:e}=t;L(s,{display:"block"}),qn(t),Mt(s)||L(wt(s),{overflow:"hidden"}),f(s,m),At(s,Se),O(s,He,"true"),e?P(s,()=>Gn(t)):Gn(t)},to=t=>{const{element:s,options:e,hasFade:n}=t;e.backdrop&&n&&h(I,m)&&!Mt(s)?(Fe(),P(I,()=>Zn(t))):Zn(t)},qi=t=>{const{target:s}=t,e=s&&M(s,Kn),n=e&&V(e),o=n&&ue(n);o&&(e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.toggle())},Qi=({code:t,target:s})=>{const e=D(Wn,E(s)),n=e&&ue(e);if(n){const{options:o}=n;o.keyboard&&t===es&&h(e,m)&&(n.relatedTarget=null,n.hide())}},Zi=t=>{var n,o;const{currentTarget:s}=t,e=s?ue(s):null;if(e&&s&&!u.get(s)){const{options:i,isStatic:c,modalDialog:a}=e,{backdrop:l}=i,{target:r}=t,g=(o=(n=E(s))==null?void 0:n.getSelection())==null?void 0:o.toString().length,p=a.contains(r),v=r&&M(r,Xi);c&&!p?u.set(s,()=>{f(s,Xn),P(a,()=>Gi(e))},17):(v||!g&&!c&&!p&&l)&&(e.relatedTarget=v||null,e.hide(),t.preventDefault())}},Gi=t=>{const{element:s,modalDialog:e}=t,n=(zt(e)||0)+17;b(s,Xn),u.set(s,()=>u.clear(s),n)};class te extends st{constructor(e,n){super(e,n);d(this,"update",()=>{h(this.element,m)&&qn(this)});d(this,"_toggleEventListeners",e=>{const n=e?_:B,{triggers:o}=this;o.length&&o.forEach(i=>n(i,N,qi))});const{element:o}=this,i=D(`.${U}-dialog`,o);i&&(this.modalDialog=i,this.triggers=[...et(Kn,E(o))].filter(c=>V(c)===o),this.isStatic=this.options.backdrop==="static",this.hasFade=h(o,W),this.relatedTarget=null,this._toggleEventListeners(!0))}get name(){return bs}get defaults(){return Yi}toggle(){h(this.element,m)?this.hide():this.show()}show(){const{element:e,options:n,hasFade:o,relatedTarget:i}=this,{backdrop:c}=n;let a=0;if(!h(e,m)&&(je.relatedTarget=i||void 0,w(e,je),!je.defaultPrevented)){const l=Mt(e);if(l&&l!==e){const r=ue(l)||F(l,ws);r&&r.hide()}c?(Es(I)?Ts(!0):Fn(e,o,!0),a=zt(I),jn(),setTimeout(()=>Jn(this),a)):(Jn(this),l&&h(I,m)&&Fe())}}hide(){const{element:e,hasFade:n,relatedTarget:o}=this;h(e,m)&&(ys.relatedTarget=o||void 0,w(e,ys),ys.defaultPrevented||(b(e,m),O(e,Se,"true"),At(e,He),n?P(e,()=>to(this)):to(this)))}dispose(){const e={...this},{element:n,modalDialog:o}=e,i=()=>super.dispose();this._toggleEventListeners(),this.hide(),h(n,"fade")?P(o,i):i()}}d(te,"selector",Ki),d(te,"init",Ui),d(te,"getInstance",ue);const Ji=`.${Z}`,Cs=`[${rt}="${Z}"]`,tc=`[${Me}="${Z}"]`,ze=`${Z}-toggling`,ec={backdrop:!0,keyboard:!0,scroll:!1},me=t=>F(t,ws),sc=t=>new ee(t),Ve=$(`show.bs.${Z}`),eo=$(`shown.bs.${Z}`),Ss=$(`hide.bs.${Z}`),so=$(`hidden.bs.${Z}`),nc=t=>{const{element:s}=t,{clientHeight:e,scrollHeight:n}=ft(s);Nn(s,e!==n)},no=(t,s)=>{const e=s?_:B,n=E(t.element);e(n,Pe,ac),e(n,N,cc)},oo=t=>{const{element:s,options:e}=t;e.scroll||(nc(t),L(wt(s),{overflow:"hidden"})),f(s,ze),f(s,m),L(s,{visibility:"visible"}),P(s,()=>rc(t))},oc=t=>{const{element:s,options:e}=t,n=Mt(s);s.blur(),!n&&e.backdrop&&h(I,m)&&Fe(),P(s,()=>lc(t))},ic=t=>{const s=M(t.target,Cs),e=s&&V(s),n=e&&me(e);n&&(n.relatedTarget=s,n.toggle(),s&&s.tagName==="A"&&t.preventDefault())},cc=t=>{const{target:s}=t,e=D($s,E(s)),n=D(tc,e),o=e&&me(e);if(o){const{options:i,triggers:c}=o,{backdrop:a}=i,l=M(s,Cs),r=E(e).getSelection();(!I.contains(s)||a!=="static")&&(!(r&&r.toString().length)&&(!e.contains(s)&&a&&(!l||c.includes(s))||n&&n.contains(s))&&(o.relatedTarget=n&&n.contains(s)?n:null,o.hide()),l&&l.tagName==="A"&&t.preventDefault())}},ac=({code:t,target:s})=>{const e=D($s,E(s)),n=e&&me(e);n&&n.options.keyboard&&t===es&&(n.relatedTarget=null,n.hide())},rc=t=>{const{element:s}=t;b(s,ze),At(s,Se),O(s,He,"true"),O(s,"role","dialog"),w(s,eo),no(t,!0),ht(s)},lc=t=>{const{element:s,triggers:e}=t;O(s,Se,"true"),At(s,He),At(s,"role"),L(s,{visibility:""});const n=Ve.relatedTarget||e.find(Vn);n&&ht(n),zn(s),w(s,so),b(s,ze),Mt(s)||no(t)};class ee extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?_:B;this.triggers.forEach(o=>n(o,N,ic))});const{element:o}=this;this.triggers=[...et(Cs,E(o))].filter(i=>V(i)===o),this.relatedTarget=null,this._toggleEventListeners(!0)}get name(){return ws}get defaults(){return ec}toggle(){h(this.element,m)?this.hide():this.show()}show(){const{element:e,options:n,relatedTarget:o}=this;let i=0;if(!h(e,m)&&(Ve.relatedTarget=o||void 0,eo.relatedTarget=o||void 0,w(e,Ve),!Ve.defaultPrevented)){const c=Mt(e);if(c&&c!==e){const a=me(c)||F(c,bs);a&&a.hide()}n.backdrop?(Es(I)?Ts():Fn(e,!0),i=zt(I),jn(),setTimeout(()=>oo(this),i)):(oo(this),c&&h(I,m)&&Fe())}}hide(){const{element:e,relatedTarget:n}=this;h(e,m)&&(Ss.relatedTarget=n||void 0,so.relatedTarget=n||void 0,w(e,Ss),Ss.defaultPrevented||(f(e,ze),b(e,m),oc(this)))}dispose(){const e={...this},{element:n,options:o}=e,i=o.backdrop?zt(I):0,c=()=>setTimeout(()=>super.dispose(),i+17);this._toggleEventListeners(),this.hide(),h(n,m)?P(n,c):c()}}d(ee,"selector",Ji),d(ee,"init",sc),d(ee,"getInstance",me);const _t="popover",Ke="Popover",ut="tooltip",io=t=>{const s=t===ut,e=s?`${t}-inner`:`${t}-body`,n=s?"":`

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            `,o=`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            `,i=`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            `;return`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ${n+o+i}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            `},co={top:"top",bottom:"bottom",left:"start",right:"end"},Hs=t=>{const s=/\b(top|bottom|start|end)+/,{element:e,tooltip:n,container:o,options:i,arrow:c}=t;if(n){const a={...co},l=Et(e);L(n,{top:"",left:"",right:"",bottom:""});const r=t.name===Ke,{offsetWidth:g,offsetHeight:p}=n,{clientWidth:v,clientHeight:k,offsetWidth:J}=ft(e);let{placement:y}=i;const{clientWidth:X,offsetWidth:q}=o,mt=z(o,"position")==="fixed",S=Math.abs(mt?X-q:v-J),ot=l&&mt?S:0,lt=v-(l?0:S)-1,{width:j,height:Y,left:x,right:ae,top:Ht}=fe(e,!0),{x:R,y:Pt}={x,y:Ht};L(c,{top:"",left:"",right:"",bottom:""});let Wt=0,Ee="",Dt=0,ks="",re="",Xe="",Ns="";const Ft=c.offsetWidth||0,xt=c.offsetHeight||0,Os=Ft/2;let $e=Ht-p-xt<0,Te=Ht+p+Y+xt>=k,ye=x-g-Ft=lt;const Ye=["left","right"],Ms=["top","bottom"];$e=Ye.includes(y)?Ht+Y/2-p/2-xt<0:$e,Te=Ye.includes(y)?Ht+p/2+Y/2+xt>=k:Te,ye=Ms.includes(y)?x+j/2-g/2=lt:Ce,y=Ye.includes(y)&&ye&&Ce?"top":y,y=y==="top"&&$e?"bottom":y,y=y==="bottom"&&Te?"top":y,y=y==="left"&&ye?"right":y,y=y==="right"&&Ce?"left":y,n.className.includes(y)||(n.className=n.className.replace(s,a[y])),Ye.includes(y)?(y==="left"?Dt=R-g-(r?Ft:0):Dt=R+j+(r?Ft:0),$e&&Te?(Wt=0,Ee=0,re=Ht+Y/2-xt/2):$e?(Wt=Pt,Ee="",re=Y/2-Ft):Te?(Wt=Pt-p+Y,Ee="",re=p-Y/2-Ft):(Wt=Pt-p/2+Y/2,re=p/2-xt/2)):Ms.includes(y)&&(y==="top"?Wt=Pt-p-(r?xt:0):Wt=Pt+Y+(r?xt:0),ye?(Dt=0,Xe=R+j/2-Os):Ce?(Dt="auto",ks=0,Ns=j/2+lt-ae-Os):(Dt=R-g/2+j/2,Xe=g/2-Os)),L(n,{top:`${Wt}px`,bottom:Ee===""?"":`${Ee}px`,left:Dt==="auto"?Dt:`${Dt}px`,right:ks!==""?`${ks}px`:""}),T(c)&&(re!==""&&(c.style.top=`${re}px`),Xe!==""?c.style.left=`${Xe}px`:Ns!==""&&(c.style.right=`${Ns}px`));const zc=$(`updated.bs.${Vt(t.name)}`);w(e,zc)}},Ps={template:io(ut),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""},ao="data-original-title",Bt="Tooltip",Ct=(t,s,e)=>{if(he(s)&&s.length){let n=s.trim();oi(e)&&(n=e(n));const i=new DOMParser().parseFromString(n,"text/html");t.append(...i.body.childNodes)}else T(s)?t.append(s):(ii(s)||ni(s)&&s.every(A))&&t.append(...s)},dc=t=>{const s=t.name===Bt,{id:e,element:n,options:o}=t,{title:i,placement:c,template:a,animation:l,customClass:r,sanitizeFn:g,dismissible:p,content:v,btnClose:k}=o,J=s?ut:_t,y={...co};let X=[],q=[];Et(n)&&(y.left="end",y.right="start");const ce=`bs-${J}-${y[c]}`;let mt;if(T(a))mt=a;else{const ot=vt("div");Ct(ot,a,g),mt=ot.firstChild}t.tooltip=T(mt)?mt.cloneNode(!0):void 0;const{tooltip:S}=t;if(S){O(S,"id",e),O(S,"role",ut);const ot=s?`${ut}-inner`:`${_t}-body`,lt=s?null:D(`.${_t}-header`,S),j=D(`.${ot}`,S);t.arrow=D(`.${J}-arrow`,S);const{arrow:Y}=t;if(T(i))X=[i.cloneNode(!0)];else{const x=vt("div");Ct(x,i,g),X=[...x.childNodes]}if(T(v))q=[v.cloneNode(!0)];else{const x=vt("div");Ct(x,v,g),q=[...x.childNodes]}if(p)if(i)if(T(k))X=[...X,k.cloneNode(!0)];else{const x=vt("div");Ct(x,k,g),X=[...X,x.firstChild]}else if(lt&<.remove(),T(k))q=[...q,k.cloneNode(!0)];else{const x=vt("div");Ct(x,k,g),q=[...q,x.firstChild]}s?i&&j&&Ct(j,i,g):(i&<&&Ct(lt,X,g),v&&j&&Ct(j,q,g),t.btn=D(".btn-close",S)||void 0),f(S,"position-fixed"),f(Y,"position-absolute"),h(S,J)||f(S,J),l&&!h(S,W)&&f(S,W),r&&!h(S,r)&&f(S,r),h(S,ce)||f(S,ce)}},hc=t=>{const s=["HTML","BODY"],e=[];let{parentNode:n}=t;for(;n&&!s.includes(n.nodeName);)n=si(n),Us(n)||ci(n)||e.push(n);return e.find((o,i)=>z(o,"position")!=="relative"&&e.slice(i+1).every(c=>z(c,"position")==="static")?o:null)||E(t).body},fc=`[${rt}="${ut}"],[data-tip="${ut}"]`,ro="title";let lo=t=>F(t,Bt);const gc=t=>new St(t),pc=t=>{const{element:s,tooltip:e,container:n,offsetParent:o}=t;At(s,it),Mn(e,n===o?n:o)},ve=t=>{const{tooltip:s,container:e,offsetParent:n}=t;return s&&Es(s,e===n?e:n)},uc=(t,s)=>{const{element:e}=t;t._toggleEventListeners(),Ne(e,ao)&&t.name===Bt&&uo(t),s&&s()},ho=(t,s)=>{const e=s?_:B,{element:n}=t;e(E(n),Ge,t.handleTouch,tt),[Ae,xe].forEach(o=>{e(Xt(n),o,t.update,tt)})},fo=t=>{const{element:s}=t,e=$(`shown.bs.${Vt(t.name)}`);ho(t,!0),w(s,e),u.clear(s,"in")},go=t=>{const{element:s}=t,e=$(`hidden.bs.${Vt(t.name)}`);ho(t),pc(t),w(s,e),u.clear(s,"out")},po=(t,s)=>{const e=s?_:B,{element:n,container:o,offsetParent:i}=t,{offsetHeight:c,scrollHeight:a}=o,l=M(n,`.${U}`),r=M(n,`.${Z}`),g=Xt(n),v=o===i&&c!==a?o:g;e(v,xe,t.update,tt),e(v,Ae,t.update,tt),l&&e(l,`hide.bs.${U}`,t.handleHide),r&&e(r,`hide.bs.${Z}`,t.handleHide)},uo=(t,s)=>{const e=[ao,ro],{element:n}=t;O(n,e[s?0:1],s||at(n,e[0])||""),At(n,e[s?1:0])};class St extends st{constructor(e,n){super(e,n);d(this,"handleFocus",()=>ht(this.element));d(this,"handleShow",()=>this.show());d(this,"handleHide",()=>this.hide());d(this,"update",()=>{Hs(this)});d(this,"toggle",()=>{const{tooltip:e}=this;e&&!ve(this)?this.show():this.hide()});d(this,"handleTouch",({target:e})=>{const{tooltip:n,element:o}=this;n&&n.contains(e)||e===o||e&&o.contains(e)||this.hide()});d(this,"_toggleEventListeners",e=>{const n=e?_:B,{element:o,options:i,btn:c}=this,{trigger:a}=i,r=!!(this.name!==Bt&&i.dismissible);a.includes("manual")||(this.enabled=!!e,a.split(" ").forEach(p=>{p===Wo?(n(o,Rs,this.handleShow),n(o,De,this.handleShow),r||(n(o,Ze,this.handleHide),n(E(o),Ge,this.handleTouch,tt))):p===N?n(o,p,r?this.handleShow:this.toggle):p===qe&&(n(o,Qe,this.handleShow),r||n(o,Bs,this.handleHide),qo&&n(o,N,this.handleFocus)),r&&c&&n(c,N,this.handleHide)}))});const{element:o}=this,i=this.name===Bt,c=i?ut:_t,a=i?Bt:Ke;lo=r=>F(r,a),this.enabled=!0,this.id=`${c}-${Zs(o,c)}`;const{options:l}=this;!l.title&&i||!i&&!l.content||(dt(Ps,{titleAttr:""}),Ne(o,ro)&&i&&typeof l.title=="string"&&uo(this,l.title),this.container=hc(o),this.offsetParent=["sticky","fixed"].some(r=>z(this.container,"position")===r)?this.container:E(this.element).body,dc(this),this._toggleEventListeners(!0))}get name(){return Bt}get defaults(){return Ps}show(){const{options:e,tooltip:n,element:o,container:i,offsetParent:c,id:a}=this,{animation:l}=e,r=u.get(o,"out"),g=i===c?i:c;u.clear(o,"out"),n&&!r&&!ve(this)&&u.set(o,()=>{const p=$(`show.bs.${Vt(this.name)}`);w(o,p),p.defaultPrevented||(On(n,g),O(o,it,`#${a}`),this.update(),po(this,!0),h(n,m)||f(n,m),l?P(n,()=>fo(this)):fo(this))},17,"in")}hide(){const{options:e,tooltip:n,element:o}=this,{animation:i,delay:c}=e;u.clear(o,"in"),n&&ve(this)&&u.set(o,()=>{const a=$(`hide.bs.${Vt(this.name)}`);w(o,a),a.defaultPrevented||(this.update(),b(n,m),po(this),i?P(n,()=>go(this)):go(this))},c+17,"out")}enable(){const{enabled:e}=this;e||(this._toggleEventListeners(!0),this.enabled=!e)}disable(){const{tooltip:e,options:n,enabled:o}=this,{animation:i}=n;o&&(e&&ve(this)&&i?(this.hide(),P(e,()=>this._toggleEventListeners())):this._toggleEventListeners(),this.enabled=!o)}toggleEnabled(){this.enabled?this.disable():this.enable()}dispose(){const{tooltip:e,options:n}=this,o={...this,name:this.name},i=()=>setTimeout(()=>uc(o,()=>super.dispose()),17);n.animation&&ve(o)?(this.options.delay=0,this.hide(),P(e,i)):i()}}d(St,"selector",fc),d(St,"init",gc),d(St,"getInstance",lo),d(St,"styleTip",Hs);const mc=`[${rt}="${_t}"],[data-tip="${_t}"]`,vc=dt({},Ps,{template:io(_t),content:"",dismissible:!1,btnClose:''}),bc=t=>F(t,Ke),wc=t=>new Rt(t);class Rt extends St{constructor(e,n){super(e,n);d(this,"show",()=>{super.show();const{options:e,btn:n}=this;e.dismissible&&n&&setTimeout(()=>ht(n),17)})}get name(){return Ke}get defaults(){return vc}}d(Rt,"selector",mc),d(Rt,"init",wc),d(Rt,"getInstance",bc),d(Rt,"styleTip",Hs);const Ec="scrollspy",mo="ScrollSpy",$c='[data-bs-spy="scroll"]',Tc={offset:10,target:null},yc=t=>F(t,mo),Cc=t=>new se(t),vo=$(`activate.bs.${Ec}`),Sc=t=>{const{target:s,scrollTarget:e,options:n,itemsLength:o,scrollHeight:i,element:c}=t,{offset:a}=n,l=ns(e),r=s&&is("A",s),g=e?bo(e):i;if(t.scrollTop=l?e.scrollY:e.scrollTop,r&&(g!==i||o!==r.length)){let p,v,k;t.items=[],t.offsets=[],t.scrollHeight=g,t.maxScroll=t.scrollHeight-Hc(t),[...r].forEach(J=>{p=at(J,"href"),v=p&&p.charAt(0)==="#"&&p.slice(-1)!=="#"&&D(p,E(c)),v&&(t.items.push(J),k=fe(v),t.offsets.push((l?k.top+t.scrollTop:v.offsetTop)-a))}),t.itemsLength=t.items.length}},bo=t=>T(t)?t.scrollHeight:ft(t).scrollHeight,Hc=({element:t,scrollTarget:s})=>ns(s)?s.innerHeight:fe(t).height,wo=t=>{[...is("A",t)].forEach(s=>{h(s,C)&&b(s,C)})},Eo=(t,s)=>{const{target:e,element:n}=t;T(e)&&wo(e),t.activeItem=s,f(s,C);const o=[];let i=s;for(;i!==wt(n);)i=i.parentElement,(h(i,"nav")||h(i,"dropdown-menu"))&&o.push(i);o.forEach(c=>{const a=c.previousElementSibling;a&&!h(a,C)&&f(a,C)}),vo.relatedTarget=s,w(n,vo)};class se extends st{constructor(e,n){super(e,n);d(this,"refresh",()=>{const{target:e}=this;if(T(e)&&e.offsetHeight>0){Sc(this);const{scrollTop:n,maxScroll:o,itemsLength:i,items:c,activeItem:a}=this;if(n>=o){const r=c[i-1];a!==r&&Eo(this,r);return}const{offsets:l}=this;if(a&&n0){this.activeItem=null,e&&wo(e);return}c.forEach((r,g)=>{a!==r&&n>=l[g]&&(typeof l[g+1]>"u"||n{(e?_:B)(this.scrollTarget,Ae,this.refresh,tt)});const{element:o,options:i}=this;this.target=D(i.target,E(o)),this.target&&(this.scrollTarget=o.clientHeightF(t,$o),Pc=t=>new ne(t),Ds=$(`show.bs.${be}`),Co=$(`shown.bs.${be}`),xs=$(`hide.bs.${be}`),So=$(`hidden.bs.${be}`),we=new Map,Ho=t=>{const{tabContent:s,nav:e}=t;s&&h(s,Nt)&&(s.style.height="",b(s,Nt)),e&&u.clear(e)},Po=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=T(o)&&we.get(o)||{tab:null};if(e&&n&&h(n,W)){const{currentHeight:c,nextHeight:a}=we.get(s)||{currentHeight:0,nextHeight:0};c===a?Ho(t):setTimeout(()=>{e.style.height=`${a}px`,It(e),P(e,()=>Ho(t))},50)}else o&&u.clear(o);Co.relatedTarget=i,w(s,Co)},Do=t=>{const{element:s,content:e,tabContent:n,nav:o}=t,{tab:i,content:c}=o&&we.get(o)||{tab:null,content:null};let a=0;if(n&&e&&h(e,W)&&([c,e].forEach(l=>{T(l)&&f(l,"overflow-hidden")}),a=T(c)?c.scrollHeight:0),Ds.relatedTarget=i,So.relatedTarget=s,w(s,Ds),!Ds.defaultPrevented){if(e&&f(e,C),c&&b(c,C),n&&e&&h(e,W)){const l=e.scrollHeight;we.set(s,{currentHeight:a,nextHeight:l,tab:null,content:null}),f(n,Nt),n.style.height=`${a}px`,It(n),[c,e].forEach(r=>{r&&b(r,"overflow-hidden")})}e&&e&&h(e,W)?setTimeout(()=>{f(e,m),P(e,()=>{Po(t)})},1):(e&&f(e,m),Po(t)),i&&w(i,So)}},xo=t=>{const{nav:s}=t;if(!T(s))return{tab:null,content:null};const e=gt(C,s);let n=null;e.length===1&&!Ot.some(i=>h(e[0].parentElement,i))?[n]=e:e.length>1&&(n=e[e.length-1]);const o=T(n)?V(n):null;return{tab:n,content:o}},Ao=t=>{if(!T(t))return null;const s=M(t,`.${Ot.join(",.")}`);return s?D(`.${Ot[0]}-toggle`,s):null},Dc=t=>{const s=yo(t.target);s&&(t.preventDefault(),s.show())};class ne extends st{constructor(e){super(e);d(this,"_toggleEventListeners",e=>{(e?_:B)(this.element,N,Dc)});const{element:n}=this,o=V(n);if(o){const i=M(n,".nav"),c=M(o,".tab-content");this.nav=i,this.content=o,this.tabContent=c,this.dropdown=Ao(n);const{tab:a}=xo(this);if(i&&!a){const l=D(To,i),r=l&&V(l);r&&(f(l,C),f(r,m),f(r,C),O(n,Ue,"true"))}this._toggleEventListeners(!0)}}get name(){return $o}show(){const{element:e,content:n,nav:o,dropdown:i}=this;if(!(o&&u.get(o))&&!h(e,C)){const{tab:c,content:a}=xo(this);if(o&&we.set(o,{tab:c,content:a,currentHeight:0,nextHeight:0}),xs.relatedTarget=e,T(c)&&(w(c,xs),!xs.defaultPrevented)){f(e,C),O(e,Ue,"true");const l=T(c)&&Ao(c);if(l&&h(l,C)&&b(l,C),o){const r=()=>{c&&(b(c,C),O(c,Ue,"false")),i&&!h(i,C)&&f(i,C)};a&&(h(a,W)||n&&h(n,W))?u.set(o,r,1):r()}a&&(b(a,m),h(a,W)?P(a,()=>Do(this)):Do(this))}}}dispose(){this._toggleEventListeners(),super.dispose()}}d(ne,"selector",To),d(ne,"init",Pc),d(ne,"getInstance",yo);const G="toast",Lo="Toast",xc=`.${G}`,Ac=`[${Me}="${G}"]`,Io=`[${rt}="${G}"]`,oe="showing",ko="hide",Lc={animation:!0,autohide:!0,delay:5e3},As=t=>F(t,Lo),Ic=t=>new ie(t),No=$(`show.bs.${G}`),kc=$(`shown.bs.${G}`),Oo=$(`hide.bs.${G}`),Nc=$(`hidden.bs.${G}`),Mo=t=>{const{element:s,options:e}=t;b(s,oe),u.clear(s,oe),w(s,kc),e.autohide&&u.set(s,()=>t.hide(),e.delay,G)},_o=t=>{const{element:s}=t;b(s,oe),b(s,m),f(s,ko),u.clear(s,G),w(s,Nc)},Oc=t=>{const{element:s,options:e}=t;f(s,oe),e.animation?(It(s),P(s,()=>_o(t))):_o(t)},Mc=t=>{const{element:s,options:e}=t;u.set(s,()=>{b(s,ko),It(s),f(s,m),f(s,oe),e.animation?P(s,()=>Mo(t)):Mo(t)},17,oe)},_c=t=>{u.clear(t.element,G),t._toggleEventListeners()},Bc=t=>{const{target:s}=t,e=s&&M(s,Io),n=e&&V(e),o=n&&As(n);o&&(e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.show())},Rc=t=>{const s=t.target,e=As(s),{type:n,relatedTarget:o}=t;e&&s!==o&&!s.contains(o)&&([De,Qe].includes(n)?u.clear(s,G):u.set(s,()=>e.hide(),e.options.delay,G))};class ie extends st{constructor(e,n){super(e,n);d(this,"show",()=>{const{element:e,isShown:n}=this;e&&!n&&(w(e,No),No.defaultPrevented||Mc(this))});d(this,"hide",()=>{const{element:e,isShown:n}=this;e&&n&&(w(e,Oo),Oo.defaultPrevented||Oc(this))});d(this,"_toggleEventListeners",e=>{const n=e?_:B,{element:o,triggers:i,dismiss:c,options:a,hide:l}=this;c&&n(c,N,l),a.autohide&&[Qe,Bs,De,Ze].forEach(r=>n(o,r,Rc)),i.length&&i.forEach(r=>n(r,N,Bc))});const{element:o,options:i}=this;i.animation&&!h(o,W)?f(o,W):!i.animation&&h(o,W)&&b(o,W),this.dismiss=D(Ac,o),this.triggers=[...et(Io,E(o))].filter(c=>V(c)===o),this._toggleEventListeners(!0)}get name(){return Lo}get defaults(){return Lc}get isShown(){return h(this.element,m)}dispose(){const{element:e,isShown:n}=this;n&&b(e,m),_c(this),super.dispose()}}d(ie,"selector",xc),d(ie,"init",Ic),d(ie,"getInstance",As);const Ls=new Map;[Ut,qt,Qt,Zt,Jt,te,ee,Rt,se,ne,ie,St].forEach(t=>Ls.set(t.prototype.name,t));const Wc=(t,s)=>{[...s].forEach(e=>t(e))},Fc=(t,s)=>{const e=Lt.getAllFor(t);e&&[...e].forEach(([n,o])=>{s.contains(n)&&o.dispose()})},Is=t=>{const s=t&&t.nodeName?t:document,e=[...is("*",s)];Ls.forEach(n=>{const{init:o,selector:i}=n;Wc(o,e.filter(c=>Js(c,i)))})},jc=t=>{const s=t&&t.nodeName?t:document;Ls.forEach(e=>{Fc(e.prototype.name,s)})};return document.body?Is():_(document,"DOMContentLoaded",()=>Is(),{once:!0}),H.Alert=Ut,H.Button=qt,H.Carousel=Qt,H.Collapse=Zt,H.Dropdown=Jt,H.Modal=te,H.Offcanvas=ee,H.Popover=Rt,H.ScrollSpy=se,H.Tab=ne,H.Toast=ie,H.Tooltip=St,H.initCallback=Is,H.removeDataAPI=jc,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}),H}({}); +//# sourceMappingURL=bootstrap-native.js.map diff --git a/documentation/js/libs/clipboard.min.js b/documentation/js/libs/clipboard.min.js new file mode 100644 index 0000000000..b00ee51535 --- /dev/null +++ b/documentation/js/libs/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.0 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,n){var o,r,i;!function(a,c){r=[t,n(7)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(t){return t&&t.__esModule?t:{default:t}}(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])}); \ No newline at end of file diff --git a/documentation/js/libs/custom-elements-es5-adapter.js b/documentation/js/libs/custom-elements-es5-adapter.js new file mode 100644 index 0000000000..3a694b8f70 --- /dev/null +++ b/documentation/js/libs/custom-elements-es5-adapter.js @@ -0,0 +1,15 @@ +/** +@license @nocompile +Copyright (c) 2018 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +(function () { + 'use strict'; + + (function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.hasOwnProperty('polyfillWrapFlushCallback'))return;const a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)},HTMLElement.prototype=a.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,a);})(); + +}()); diff --git a/documentation/js/libs/custom-elements.min.js b/documentation/js/libs/custom-elements.min.js new file mode 100644 index 0000000000..9b64a23caf --- /dev/null +++ b/documentation/js/libs/custom-elements.min.js @@ -0,0 +1,38 @@ +(function(){ + 'use strict';var h=new function(){};var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function m(b){var a=aa.has(b);b=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(b);return!a&&b}function n(b){var a=b.isConnected;if(void 0!==a)return a;for(;b&&!(b.__CE_isImportDocument||b instanceof Document);)b=b.parentNode||(window.ShadowRoot&&b instanceof ShadowRoot?b.host:void 0);return!(!b||!(b.__CE_isImportDocument||b instanceof Document))} + function p(b,a){for(;a&&a!==b&&!a.nextSibling;)a=a.parentNode;return a&&a!==b?a.nextSibling:null} + function t(b,a,c){c=c?c:new Set;for(var d=b;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;a(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)t(d,a,c);d=p(b,e);continue}else if("template"===f){d=p(b,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)t(e,a,c)}d=d.firstChild?d.firstChild:p(b,d)}}function u(b,a,c){b[a]=c};function v(){this.a=new Map;this.s=new Map;this.f=[];this.b=!1}function ba(b,a,c){b.a.set(a,c);b.s.set(c.constructor,c)}function w(b,a){b.b=!0;b.f.push(a)}function x(b,a){b.b&&t(a,function(a){return y(b,a)})}function y(b,a){if(b.b&&!a.__CE_patched){a.__CE_patched=!0;for(var c=0;ct?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===ho||n[0]===po?po+n:n}function s(n){return(n+="")[0]===po?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function d(){var n=0;for(var t in this._)++n;return n}function v(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function x(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function M(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=go.length;e=t&&(t=i+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var c=ko.get(n);return c&&(n=c,l=B),a?t?i:r:t?_:u}function $(n,t){return function(e){var r=to.event;to.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{to.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Eo,i="click"+r,u=to.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==No&&(No=!("onselectstart"in e)&&M(e.style,"userSelect")),No){var o=n(e).style,a=o[No];o[No]="none"}return function(n){if(u.on(r,null),No&&(o[No]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(Ao<0){var u=t(n);if(u.scrollX||u.scrollY){var o=(r=to.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Ao=!(o.f||o.e),r.remove()}}return Ao?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return to.event.changedTouches[0].identifier}function K(n){return n>0?1:n<0?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:n<-1?Lo:Math.acos(n)}function tn(n){return n>1?Ro:n<-1?-Ro:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):bn(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:n<0&&(n+=360),n<60?u+(o-u)*n/60:n<180?o:n<240?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:t>1?1:t,e=e<0?0:e>1?1:e,o=e<=.5?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=to.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Do)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=dn(i)*Zo,r=dn(r)*Vo,u=dn(u)*Xo,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Po,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function dn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):bn(""+n,mn,cn):new mn(n,t,e)}function xn(n){return new mn(n>>16,n>>8&255,255&n)}function Mn(n){return xn(n)+""}function _n(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bn(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=Wo.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o|=o>>4,a=240&u,a|=a>>4,l=15&u,l|=l<<4):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=l<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t0&&l<1?0:r),new ln(r,i,l)}function Sn(n,t,e){var r=vn((.4124564*(n=kn(n))+.3575761*(t=kn(t))+.1804375*(e=kn(e)))/Zo),i=vn((.2126729*n+.7151522*t+.072175*e)/Vo);return hn(116*i-16,500*(r-i),200*(i-vn((.0193339*n+.119192*t+.9503041*e)/Xo)))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&t<300||304===t){try{n=e.call(u,l)}catch(n){return void o.error.call(u,n)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=to.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=to.event;to.event=n;try{o.progress.call(u,l)}finally{to.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(ro(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},to.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i={c:n,t:e+t,n:null};return Go?Go.n=i:Jo=i,Go=i,Ko||(Qo=clearTimeout(Qo),Ko=1,na(Tn)),i}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(Qo),Qo=setTimeout(Tn,t)),Ko=0):(Ko=1,na(Tn))}function Rn(){for(var n=Date.now(),t=Jo;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=Jo,e=1/0;t;)t.c?(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Un(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=ea.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,d="",v="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,v="%",p="f";break;case"p":g=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(d="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(d=i[0],v=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=ra.get(p)||Fn;var x=c&&s;return function(n){var e=v;if(y&&n%1)return"";var i=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===a?"":a;if(g<0){var l=to.formatPrefix(n,h);n=l.scale(n),e=l.symbol+v}else n*=g;var M,_,b=(n=p(n,h)).lastIndexOf(".");if(b<0){var w=m?n.lastIndexOf("e"):-1;w<0?(M=n,_=""):(M=n.substring(0,w),_=n.substring(w))}else M=n.substring(0,b),_=t+n.substring(b+1);!c&&s&&(M=u(M,1/0));var S=d.length+M.length+_.length+(x?0:i.length),k=S"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(x?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return t-e1)for(;o=c)return-1;if(37===(i=t.charCodeAt(a++))){if(o=t.charAt(a++),!(u=C[o in aa?t.charAt(a++):o])||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){M.lastIndex=0;var r=M.exec(t.slice(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=x.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,d=n.days,v=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{var t=new(ua=Hn);return t._=n,r(t)}finally{ua=Date}}var r=t(n);return e.parse=function(n){try{ua=Hn;var t=r.parse(n);return t&&t._}finally{ua=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var x=to.map(),M=Vn(d),_=Xn(d),b=Vn(v),w=Xn(v),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){x.set(n.toLowerCase(),t)});var A={a:function(n){return v[n.getDay()]},A:function(n){return d[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ia.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ia.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ia.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u68?1900:2e3)}function nt(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){la.lastIndex=0;var r=la.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=so(t)/60|0,i=so(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function lt(n,t,e){ca.lastIndex=0;var r=ca.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);da.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;va.point=function(o,a){va.point=n,r=(t=o)*Do,i=Math.cos(a=(e=a)*Do/2+Lo/4),u=Math.sin(a)},va.lineEnd=function(){n(t,e)}}function vt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function xt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Mt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function _t(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function bt(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return so(n[0]-t[0])=0;--a)i.point((s=f[a])[0],s[1]);else r(p.x,p.p.x,-1,i);p=p.p}f=(p=p.o).z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r0){for(_||(u.polygonStart(),_=!0),u.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,d,v=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=to.merge(p);var n=Ot(y,g);p.length?(_||(u.polygonStart(),_=!0),Lt(p,jt,n,e,u)):n&&(_||(u.polygonStart(),_=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),_&&(u.polygonEnd(),_=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},x=Pt(),M=t(x),_=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:_,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function jt(n,t){return((n=n.x)[0]<0?n[1]-Ro-Co:Ro-n[1])-((t=t.x)[0]<0?t[1]-Ro-Co:Ro-t[1])}function Ut(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Lo:-Lo,l=so(u-e);so(l-Lo)0?Ro:-Ro),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Lo&&(so(e-i)Co?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Ro,r.point(-Lo,i),r.point(0,i),r.point(Lo,i),r.point(Lo,0),r.point(Lo,-i),r.point(0,-i),r.point(-Lo,-i),r.point(-Lo,0),r.point(-Lo,i);else if(so(n[0]-t[0])>Co){var u=n[0]=0?1:-1,w=b*_,S=w>Lo,k=g*x;if(da.add(Math.atan2(k*b*Math.sin(w),d*M+k*Math.cos(w))),u+=S?_+b*qo:_,S^h>=e^y>=e){var N=mt(vt(s),vt(n));_t(N);var E=mt(i,N);_t(E);var A=(S^_>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^_>=0?1:-1)}if(!v++)break;h=y,g=x,d=M,s=n}}return(u<-Co||uu}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],d=t(s,h),v=o?d?0:i(s,h):d?i(s+(s<0?Lo:-Lo),h):0;if(!e&&(c=l=d)&&n.lineStart(),d!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Co,g[1]+=Co,d=t(g[0],g[1]))),d!==l)f=0,d?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^d){var y;v&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!d||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=d,u=v},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=[1,0,0],i=mt(vt(n),vt(t)),o=yt(i,i),a=i[0],l=o-a*a;if(!l)return!e&&n;var c=u*o/l,f=-u*a/l,s=mt(r,i),h=Mt(r,c);xt(h,Mt(i,f));var p=s,g=yt(h,p),d=yt(p,p),v=g*g-d*(yt(h,h)-1);if(!(v<0)){var y=Math.sqrt(v),m=Mt(p,(-g-y)/d);if(xt(m,h),m=bt(m),!e)return m;var x,M=n[0],_=t[0],b=n[1],w=t[1];_0^m[1]<(so(m[0]-M)Lo^(M<=m[0]&&m[0]<=_)){var E=Mt(p,(-g+y)/d);return xt(E,h),[m,bt(E)]}}}function i(t,e){var r=o?n:Lo-n,i=0;return t<-r?i|=1:t>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=so(u)>Co;return Rt(t,e,de(n,6*Do),o?[0,-n]:[-Lo,n-Lo])}function It(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=0,s=1,h=a.x-l,p=a.y-c;if(u=n-l,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=e-l,h||!(u<0)){if(u/=h,h<0){if(u>s)return;u>f&&(f=u)}else if(h>0){if(u0)){if(u/=p,p<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=r-c,p||!(u<0)){if(u/=p,p<0){if(u>s)return;u>f&&(f=u)}else if(p>0){if(u0&&(i.a={x:l+f*h,y:c+f*p}),s<1&&(i.b={x:l+s*h,y:c+s*p}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return so(r[0]-n)0?0:3:so(r[0]-e)0?2:1:so(r[1]-t)0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=v.length,r=n[1],i=0;ir&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0)do{c.point(0===f||3===f?n:e,f>1?r:t)}while((f=(f+l+4)%4)!==s);else c.point(a[0],a[1])}function f(i,u){return n<=i&&i<=e&&t<=u&&u<=r}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,v&&v.push(y=[]),S=!0,w=!1,_=b=NaN}function p(){d&&(g(m,x),M&&w&&E.rejoin(),d.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){var e=f(n=Math.max(-za,Math.min(za,n)),t=Math.max(-za,Math.min(za,t)));if(v&&y.push([n,t]),S)m=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var d,v,y,m,x,M,_,b,w,S,k,N=a,E=Pt(),A=It(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,d=[],v=[],k=!0},polygonEnd:function(){a=N,d=to.merge(d);var t=l([n,r]),e=k&&t,i=d.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(d,u,t,c,a),a.polygonEnd()),d=v=y=null}};return C}}function Vt(n){var t=0,e=Lo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Lo/180,e=n[1]*Lo/180):[t/Lo*180,e/Lo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){qa+=i*n-r*t,r=n,i=t}var t,e,r,i;ja.point=function(u,o){ja.point=n,t=r=u,e=i=o},ja.lineEnd=function(){n(t,e)}}function Bt(n,t){nDa&&(Da=n),tPa&&(Pa=t)}function Wt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){xa+=n,Ma+=t,++_a}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);ba+=o*(t+n)/2,wa+=o*(e+r)/2,Sa+=o,Gt(t=n,e=r)}var t,e;Fa.point=function(r,i){Fa.point=n,Gt(t=r,e=i)}}function Qt(){Fa.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);ba+=o*(r+n)/2,wa+=o*(i+t)/2,Sa+=o,ka+=(o=i*n-r*t)*(r+n),Na+=o*(i+t),Ea+=3*o,Gt(r=n,i=t)}var t,e,r,i;Fa.point=function(u,o){Fa.point=n,Gt(t=r=u,e=i=o)},Fa.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,qo)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:_};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=NaN,S.point=u,t.lineStart()}function u(e,r){var u=vt([e,r]),o=n(e,r);i(x,M,m,_,b,w,x=o[0],M=o[1],m=e,_=u[0],b=u[1],w=u[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function l(){r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=x,g=M,d=_,v=b,y=w,S.point=u}function f(){i(x,M,m,_,b,w,p,g,s,d,v,y,a,t),S.lineEnd=o,o()}var s,h,p,g,d,v,y,m,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,d,v,y){var m=f-t,x=s-e,M=m*m+x*x;if(M>4*u&&v--){var _=a+p,b=l+g,w=c+d,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),N=so(so(w)-1)u||so((m*z+x*L)/M-.5)>.3||a*p+l*g+c*d0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Po,e*Po])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Do,n[1]*Do),[n[0]*h+l,c-n[1]*h]}function e(n){return(n=a.invert((n[0]-l)/h,(c-n[1])/h))&&[n[0]*Po,n[1]*Po]}function r(){a=Ct(o=se(y,x,M),u);var n=u(d,v);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,d=0,v=0,y=0,x=0,M=0,_=Ca,b=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(_(o,s(b(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(_=null==n?(w=n,Ca):Yt((w=+n)*Do),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,b=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(d=n[0]%360*Do,v=n[1]%360*Do,r()):[d*Po,v*Po]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Do,x=n[1]%360*Do,M=n.length>2?n[2]%360*Do:0,r()):[y*Po,x*Po,M*Po]},to.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Do,e*Do)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Lo?n-qo:n<-Lo?n+qo:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Lo?t-qo:t<-Lo?t+qo:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function de(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=ve(e,i),u=ve(e,u),(o>0?iu)&&(i+=o*qo)):(i=n+o*qo,u=n-.5*l);for(var c,f=i;o>0?f>u:f0?t<-Ro+Co&&(t=-Ro+Co):t>Ro-Co&&(t=Ro-Co);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Lo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Ro]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return so(i)1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function je(n){var t=Qa.pop()||new Pe;return t.site=n,t}function Ue(n){Be(n),Ja.remove(n),Qa.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];Ue(n);for(var l=u;l.circle&&so(e-l.circle.x)Co)a=a.L;else{if(!((i=u-Ye(a,o))>Co)){r>-Co?(t=a.P,e=a):i>-Co?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=je(n);if(Ja.insert(t,l),t||e){if(t===e)return Be(t),e=je(t.site),Ja.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(e){Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,d=g.x-f,v=g.y-s,y=2*(h*v-p*d),m=h*h+p*p,x=d*d+v*v,M={x:(v*m-p*x)/y+f,y:(h*x-d*m)/y+s};nr(e.edge,c,g,M),l.edge=Ke(c,n,null,M),e.edge=Ke(n,g,null,M),$e(t),$e(e)}else l.edge=Ke(t.site,l.site)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-1/0;var a=(e=o.site).x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ye(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ie(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],d=Wa,v=d.length;v--;)if((u=d[v])&&u.prepare())for(l=(a=u.edges).length,o=0;oCo||so(i-e)>Co)&&(a.splice(o,0,new tr(Qe(u.site,f,so(r-s)Co?{x:s,y:so(t-s)Co?{x:so(e-g)Co?{x:h,y:so(t-h)Co?{x:so(e-p)=-zo)){var h=l*l+c*c,p=f*f+v*v,g=(v*h-c*p)/s,d=(l*p-f*h)/s,v=d+a,y=nl.pop()||new Xe;y.arc=n,y.site=i,y.x=g+o,y.y=v+Math.sqrt(g*g+d*d),y.cy=v,n.circle=y;for(var m=null,x=Ka._;x;)if(y.y=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:v,y:l};e={x:v,y:c}}else{if(u){if(u.y1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu||s>o||h=_)<<1|t>=M,w=b+4;bu&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:vr(e,r)})),u=rl.lastIndex;return u=0&&!(e=to.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;e=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function br(n){return function(t){return.5*(t<.5?n(2*t):2-n(2-2*t))}}function wr(n){return n*n}function Sr(n){return n*n*n}function kr(n){if(n<=0)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function Nr(n){return function(t){return Math.pow(t,n)}}function Er(n){return 1-Math.cos(n*Ro)}function Ar(n){return Math.pow(2,10*(n-1))}function Cr(n){return 1-Math.sqrt(1-n*n)}function zr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/qo*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*qo/t)}}function Lr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function qr(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tr(n,t){n=to.hcl(n),t=to.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}}function Rr(n,t){n=to.hsl(n),t=to.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:u<-180&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}}function Dr(n,t){n=to.lab(n),t=to.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}}function Pr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fr(t),i=Ur(t,e),u=Fr(Hr(e,t,-i))||0;t[0]*e[1]180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Or(e)+"rotate(",null,")")-2,x:vr(n,t)})):t&&e.push(Or(e)+"rotate("+t+")")}function Zr(n,t,e,r){n!==t?r.push({i:e.push(Or(e)+"skewX(",null,")")-2,x:vr(n,t)}):t&&e.push(Or(e)+"skewX("+t+")")}function Vr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Or(e)+"scale(",null,",",null,")");r.push({i:i-4,x:vr(n[0],t[0])},{i:i-2,x:vr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Or(e)+"scale("+t+")")}function Xr(n,t){var e=[],r=[];return n=to.transform(n),t=to.transform(t),Yr(n.translate,t.translate,e,r),Ir(n.rotate,t.rotate,e,r),Zr(n.skew,t.skew,e,r),Vr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i=0;)e.push(i[r])}function ui(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++oi&&(r=e,i=t);return r}function vi(n){return n.reduce(yi,0)}function yi(n,t){return n+t[1]}function mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function Mi(n){return[to.min(n),to.max(n)]}function _i(n,t){return n.value-t.value}function bi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function wi(n,t){n._pack_next=t,t._pack_prev=n}function Si(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function ki(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-1/0,h=1/0,p=-1/0;if(e.forEach(Ni),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(Ci(r,i,u=e[2]),t(u),bi(r,u),r._pack_prev=u,bi(u,i),i=r._pack_next,o=3;o2?Yi:Fi,l=r?Br:$r;return o=i(n,t,l,e),a=i(t,n,l,mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Pr)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return $i(n,t)},u.tickFormat=function(t,e){return Bi(n,t,e)},u.nice=function(t){return Vi(n,t),i()},u.copy=function(){return Ii(n,t,e,r)},i()}function Zi(n,t){return to.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2])),Hi(n,Oi(Xi(n,t)[2])),n}function Xi(n,t){null==t&&(t=10);var e=ji(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return u<=.15?i*=10:u<=.35?i*=5:u<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function $i(n,t){return to.range.apply(to,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var i=ea.exec(e);if(i.shift(),"s"===i[8]){var u=to.formatPrefix(Math.max(so(r[0]),so(r[1])));return i[7]||(i[7]="."+Wi(u.scale(r[2]))),i[8]="f",e=to.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+Ji(i[8],r)),e=i.join("")}else e=",."+Wi(r[2])+"f";return to.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in dl?Math.abs(e-Wi(Math.max(so(t[0]),so(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function i(n){return(e?Math.log(n<0?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Hi(r.map(i),e?Math:yl);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=ji(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;c0;h--)o.push(u(c)*h);for(c=0;o[c]l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return vl;arguments.length<2?e=vl:"function"!=typeof e&&(e=to.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return o*t0?a[e-1]:n[0],e0?0:1}function hu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,d=(s+p)/2,v=h-f,y=p-s,m=v*v+y*y,x=e-r,M=f*p-h*s,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-M*M)),b=(M*y-v*_)/m,w=(-M*v-y*_)/m,S=(M*y+v*_)/m,k=(-M*v+y*_)/m,N=b-g,E=w-d,A=S-g,C=k-d;return N*N+E*E>A*A+C*C&&(b=S,w=k),[[b-l,w-c],[b*e/x,w*e/x]]}function pu(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s1?n.join("L"):n+"Z"}function du(n){return n.join("L")+"Z"}function vu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function yu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r);for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Tu(n){return n.length<3?gu(n):n[0]+bu(n,qu(n))}function Ru(n){for(var t,e,r,i=-1,u=n.length;++i0;)p[--a].call(n,o);if(u>=1)return d.event&&d.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),d=g[r];d||(l=i.time,f=qn(u,0,l),d=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function Bu(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wu(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Ju(n){return n.toISOString()}function Gu(n,t,e){function r(t){return n(t)}function i(n,e){var r=(n[1]-n[0])/e,i=to.bisect(Yl,r);return i==Yl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[r/Yl[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Ku(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ku(+t+1);return t}}:n))},r.ticks=function(n,t){var e=ji(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],Ku(+e[1]+1),t<1?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Gu(n.copy(),t,e)},Zi(r,n)}function Ku(n){return new Date(n)}function Qu(n){return JSON.parse(n.responseText)}function no(n){var t=io.createRange();return t.selectNode(io.body),t.createContextualFragment(n.responseText)}var to={version:"3.5.17"},eo=[].slice,ro=function(n){return eo.call(n)},io=this.document;if(io)try{ro(io.documentElement.childNodes)[0].nodeType}catch(n){ro=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),io)try{io.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var uo=this.Element.prototype,oo=uo.setAttribute,ao=uo.setAttributeNS,lo=this.CSSStyleDeclaration.prototype,co=lo.setProperty;uo.setAttribute=function(n,t){oo.call(this,n,t+"")},uo.setAttributeNS=function(n,t,e){ao.call(this,n,t,e+"")},lo.setProperty=function(n,t,e){co.call(this,n,t+"",e)}}to.ascending=e,to.descending=function(n,t){return tn?1:t>=n?0:NaN},to.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},to.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},to.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),i=r){e=i=r;break}for(;++ur&&(e=r),i1)return l/(f-1)},to.deviation=function(){var n=to.variance.apply(this,arguments);return n?Math.sqrt(n):n};var fo=u(e);to.bisectLeft=fo.left,to.bisect=to.bisectRight=fo.right,to.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},to.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,u<2&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},to.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},to.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t=0;)for(t=(r=n[i]).length;--t>=0;)e[--o]=r[t];return e};var so=Math.abs;to.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],u=a(so(e)),o=-1;if(n*=u,t*=u,(e*=u)<0)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,d=u[a++],v=new c;++p=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(to.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},to.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;e=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},to.event=null,to.requote=function(n){return n.replace(vo,"\\$&")};var vo=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,yo={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},mo=function(n,t){return t.querySelector(n)},xo=function(n,t){return t.querySelectorAll(n)},Mo=function(n,t){var e=n.matches||n[M(n,"matchesSelector")];return(Mo=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(mo=function(n,t){return Sizzle(n,t)[0]||null},xo=Sizzle,Mo=Sizzle.matchesSelector),to.selection=function(){return to.select(io.documentElement)};var _o=to.selection.prototype=[];_o.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),wo.hasOwnProperty(e)?{space:wo[e],local:n}:n}},_o.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=to.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},_o.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++i=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},_o.sort=function(n){n=Y.apply(this,arguments);for(var t=-1,e=this.length;++t0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){_&&_.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),w&&w.domain(b.range().map(function(n){return(n-k.y)/k.k}).map(b.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),v=null)}function s(){function n(){a=1,u(to.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=to.select(t(i)).on(q,n).on(T,r),h=e(to.mouse(i)),p=W(i);ql.call(i),l(o)}function h(){function n(){var n=to.touches(g);return p=k.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=e(n))}),n}function t(){var t=to.event.target;to.select(t).on(M,r).on(_,a),b.push(t);for(var e=to.event.changedTouches,i=0,u=e.length;i1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=to.touches(g);ql.call(g);for(var a=0,l=o.length;a=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ra=to.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=to.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ia=to.time={},ua=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){oa.setUTCDate.apply(this._,arguments)},setDay:function(){oa.setUTCDay.apply(this._,arguments)},setFullYear:function(){oa.setUTCFullYear.apply(this._,arguments)},setHours:function(){oa.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){oa.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){oa.setUTCMinutes.apply(this._,arguments)},setMonth:function(){oa.setUTCMonth.apply(this._,arguments)},setSeconds:function(){oa.setUTCSeconds.apply(this._,arguments)},setTime:function(){oa.setTime.apply(this._,arguments)}};var oa=Date.prototype;ia.year=On(function(n){return(n=ia.day(n)).setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ia.years=ia.year.range,ia.years.utc=ia.year.utc.range,ia.day=On(function(n){var t=new ua(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ia.days=ia.day.range,ia.days.utc=ia.day.utc.range,ia.dayOfYear=function(n){var t=ia.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ia[n]=On(function(n){return(n=ia.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ia.year(n).getDay();return Math.floor((ia.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ia[n+"s"]=e.range,ia[n+"s"].utc=e.utc.range,ia[n+"OfYear"]=function(n){var e=ia.year(n).getDay();return Math.floor((ia.dayOfYear(n)+(e+t)%7)/7)}}),ia.week=ia.sunday,ia.weeks=ia.sunday.range,ia.weeks.utc=ia.sunday.utc.range,ia.weekOfYear=ia.sundayOfYear;var aa={"-":"",_:" ",0:"0"},la=/^\s*\d+/,ca=/^%/;to.locale=function(n){return{numberFormat:Un(n),timeFormat:In(n)}};var fa=to.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});to.format=fa.numberFormat,to.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,sa),st(sa.s,this.s,this),this.s?this.t+=sa.t:this.s=sa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var sa=new ft;to.geo.stream=function(n,t){n&&ha.hasOwnProperty(n.type)?ha[n.type](n,t):ht(n,t)};var ha={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rp&&(p=t)}function t(t,e){var r=vt([t*Do,e*Do]);if(y){var i=mt(y,r),u=mt([i[1],-i[0],0],i);_t(u),u=bt(u);var o=t-g,l=o>0?1:-1,c=u[0]*Po*l,d=so(o)>180;if(d^(l*gp&&(p=v);else if(c=(c+360)%360-180,d^(l*gp&&(p=e);d?ta(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(th&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){_.point=t}function r(){M[0]=f,M[1]=h,_.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=so(r)>180?r+(r>0?360:-360):r}else d=n,v=e;va.point(n,e),t(n,e)}function u(){va.lineStart()}function o(){i(d,v),va.lineEnd(),so(m)>Co&&(f=-(h=180)),M[0]=f,M[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nCo?p=90:m<-Co&&(s=-90),M[0]=f,M[1]=h}};return function(n){p=h=-(f=s=1/0),x=[],to.geo.stream(n,_);var t=x.length;if(t){x.sort(l);for(var e=1,r=[g=x[0]];ea(g[0],g[1])&&(g[1]=u[1]),a(u[0],g[1])>a(g[0],g[1])&&(g[0]=u[0])):r.push(g=u);for(var i,u,o=-1/0,e=0,g=r[t=r.length-1];e<=t;g=u,++e)u=r[e],(i=a(g[1],u[0]))>o&&(o=i,f=u[0],h=g[1])}return x=M=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),to.geo.centroid=function(n){ya=ma=xa=Ma=_a=ba=wa=Sa=ka=Na=Ea=0,to.geo.stream(n,Aa);var t=ka,e=Na,r=Ea,i=t*t+e*e+r*r;return i=.12&&i<.234&&r>=-.425&&r<-.214?o:i>=.166&&i<.234&&r>=-.214&&r<-.115?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Co,s+.12*c+Co],[f-.214*c-Co,s+.234*c-Co]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Co,s+.166*c+Co],[f-.115*c-Co,s+.234*c-Co]]).stream(l).point,n},n.scale(1070)};var La,qa,Ta,Ra,Da,Pa,ja={point:_,lineStart:_,lineEnd:_,polygonStart:function(){qa=0,ja.lineStart=$t},polygonEnd:function(){ja.lineStart=ja.lineEnd=ja.point=_,La+=so(qa/2)}},Ua={point:Bt,lineStart:_,lineEnd:_,polygonStart:_,polygonEnd:_},Fa={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Fa.lineStart=ne},polygonEnd:function(){Fa.point=Gt,Fa.lineStart=Kt,Fa.lineEnd=Qt}};to.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),to.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return La=0,to.geo.stream(n,i(ja)),La},n.centroid=function(n){return xa=Ma=_a=ba=wa=Sa=ka=Na=Ea=0,to.geo.stream(n,i(Fa)),Ea?[ka/Ea,Na/Ea]:Sa?[ba/Sa,wa/Sa]:_a?[xa/_a,Ma/_a]:[NaN,NaN]},n.bounds=function(n){return Da=Pa=-(Ta=Ra=1/0),to.geo.stream(n,i(Ua)),[[Ta,Ra],[Da,Pa]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(to.geo.albersUsa()).context(null)},to.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},to.geo.projection=oe,to.geo.projectionMutator=ae,(to.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,to.geo.rotation=function(n){function t(t){return t=n(t[0]*Do,t[1]*Do),t[0]*=Po,t[1]*=Po,t}return n=se(n[0]%360*Do,n[1]*Do,n.length>2?n[2]*Do:0),t.invert=function(t){return t=n.invert(t[0]*Do,t[1]*Do),t[0]*=Po,t[1]*=Po,t},t},fe.invert=ce,to.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Do,-n[1]*Do,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Po,n[1]*=Po}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=de((t=+r)*Do,i*Do),n):t},n.precision=function(r){return arguments.length?(e=de(t*Do,(i=+r)*Do),n):i},n.angle(90)},to.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Do,i=n[1]*Do,u=t[1]*Do,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},to.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return to.range(Math.ceil(u/v)*v,i,v).map(h).concat(to.range(Math.ceil(c/y)*y,l,y).map(p)).concat(to.range(Math.ceil(r/g)*g,e,g).filter(function(n){return so(n%v)>Co}).map(f)).concat(to.range(Math.ceil(a/d)*d,o,d).filter(function(n){return so(n%y)>Co}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,d=g,v=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(v=+t[0],y=+t[1],n):[v,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],d=+t[1],n):[g,d]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Co],[180,90-Co]]).minorExtent([[-180,-80-Co],[180,80+Co]])},to.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=xe,i=Me;return n.distance=function(){return to.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},to.geo.interpolate=function(n,t){return _e(n[0]*Do,n[1]*Do,t[0]*Do,t[1]*Do)},to.geo.length=function(n){return Ha=0,to.geo.stream(n,Oa),Ha};var Ha,Oa={sphere:_,point:_,lineStart:be,lineEnd:_,polygonStart:_,polygonEnd:_},Ya=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(to.geo.azimuthalEqualArea=function(){return oe(Ya)}).raw=Ya;var Ia=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(to.geo.azimuthalEquidistant=function(){return oe(Ia)}).raw=Ia,(to.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(to.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var Za=we(function(n){return 1/n},Math.atan);(to.geo.gnomonic=function(){return oe(Za)}).raw=Za,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ro]},(to.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var Va=we(function(){return 1},Math.asin);(to.geo.orthographic=function(){return oe(Va)}).raw=Va;var Xa=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(to.geo.stereographic=function(){return oe(Xa)}).raw=Xa,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ro]},(to.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,to.geom={},to.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;t=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[]).point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Co)*Co,y:Math.round(o(n,t)/Co)*Co,i:t}})}var r=Ce,i=ze,u=r,o=i,a=tl;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u=e.site,o=e.edges.sort(Ve),a=-1,l=o.length,c=o[l-1].edge,f=c.l===u?c.r:c.l;++a=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]={leaf:!0,nodes:[],point:null,x:null,y:null}),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,d,v,y,m,x=En(a),M=En(l);if(null!=t)d=t,v=e,y=r,m=i;else if(y=m=-(d=v=1/0),s=[],h=[],g=n.length,o)for(p=0;py&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;py&&(y=_),b>m&&(m=b),s.push(_),h.push(b)}var w=y-d,S=m-v;w>S?m=v+w:y=d+S;var k={leaf:!0,nodes:[],point:null,x:null,y:null};if(k.add=function(n){u(k,n,+x(n,++p),+M(n,p),d,v,y,m)},k.visit=function(n){hr(n,k,d,v,y,m)},k.find=function(n){return pr(k,n[0],n[1],d,v,y,m)},p=-1,null==t){for(;++p=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=ul.get(e)||il,r=ol.get(r)||m,Mr(r(e.apply(null,eo.call(arguments,1))))},to.interpolateHcl=Tr,to.interpolateHsl=Rr,to.interpolateLab=Dr,to.interpolateRound=Pr,to.transform=function(n){var t=io.createElementNS(to.ns.prefix.svg,"g");return(to.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:al)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var al={a:1,b:0,c:0,d:1,e:0,f:0};to.interpolateTransform=Xr,to.layout={},to.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;l=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return ui(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=li,e=oi,r=ai;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ii(t,function(n){n.children&&(n.value=0)}),ui(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},to.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++ca&&(a=r),o.push(r)}for(e=0;e0)for(u=-1;++u=f[0]&&a<=f[1]&&((o=l[to.bisect(s,a,1,p)-1]).y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=Mi,i=mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},to.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ui(a,function(n){n.r=+f(n.value)}),ui(a,ki),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;ui(a,function(n){n.r+=s}),ui(a,ki),ui(a,function(n){n.r-=s})}return Ai(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=to.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ri(n,e)},to.layout.tree=function(){function n(n,r){var u=M.call(this,n,r),o=t(u[0]);return N=o,e(o,0),i(o),g(o,0),m(o),u}function t(n){var e={t:n,prelim:0,mod:0,shift:0,change:0,msel:0,mser:0};if(n.x=0,n.y=0,w)e.x_size=1,e.y_size=1;else if("object"==typeof S)e.x_size=S[0],e.y_size=S[1];else{var r=S(n);e.x_size=r[0],e.y_size=r[1]}k&&(n.x_size=e.x_size,n.y_size=e.y_size);for(var i=[],u=n.children?n.children.length:0,o=0;oe.lowY&&(e=e.nxt);var p=i+r.prelim-(o+u.prelim);null!=_?p+=_(r.t,u.t)*N.x_size:null!=b&&(p+=r.x_size/2+u.x_size/2+b(r.t,u.t)),p>0?(o+=p,a(n,t,e.index,p)):1===t&&0===o&&0===r.num_children&&u.num_children>1&&p<0&&(o+=p,a(n,t,e.index,p));var g=f(r),d=f(u);g<=d&&null!=(r=c(r))&&(i+=r.mod),g>=d&&null!=(u=l(u))&&(o+=u.mod)}null==r&&null!=u?s(n,t,u,o):null!=r&&null==u&&h(n,t,r,i)}function a(n,t,e,r){n.children[t].mod+=r,n.children[t].msel+=r,n.children[t].mser+=r,d(n,t,e,r)}function l(n){return 0==n.num_children?n.tl:n.children[0]}function c(n){return 0==n.num_children?n.tr:n.children[n.num_children-1]}function f(n){return n.t.y+n.y_size}function s(n,t,e,r){var i=n.children[0].el;i.tl=e;var u=r-e.mod-n.children[0].msel;i.mod+=u,i.prelim-=u,n.children[0].el=n.children[t].el,n.children[0].msel=n.children[t].msel}function h(n,t,e,r){var i=n.children[t].er;i.tr=e;var u=r-e.mod-n.children[t].mser;i.mod+=u,i.prelim-=u,n.children[t].er=n.children[t-1].er,n.children[t].mser=n.children[t-1].mser}function p(n){n.prelim=(n.children[0].prelim+n.children[0].mod-n.children[0].x_size/2+n.children[n.num_children-1].mod+n.children[n.num_children-1].prelim+n.children[n.num_children-1].x_size/2)/2}function g(n,t){t+=n.mod,n.t.x=n.prelim+t,v(n);for(var e=0;e=e.lowY;)e=e.nxt;return{lowY:n,index:t,nxt:e}}function m(n){if(null!=w){for(var t,e=n,r=n,i=n,u=[n];t=u.pop();)(f=t.t).xr.t.x&&(r=t),f.depth>i.t.depth&&(i=t),t.children&&(u=u.concat(t.children));var o=null==_?.5:_(e.t,r.t)/2,a=o-e.t.x,l=w[0]/(r.t.x+o+a),c=w[1]/(i.t.depth>0?i.t.depth:1);for(u=[n];t=u.pop();){var f=t.t;f.x=(f.x+a)*l,f.y=f.depth*c,k&&(f.x_size*=l,f.y_size*=c),t.children&&(u=u.concat(t.children))}}else x(n,-n.t.x)}function x(n,t){n.t.x+=t;for(var e=0;e0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,d))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,d,c,!1),d=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,d,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oi&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0;if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++u1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=to.random.normal.apply(to,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=to.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;es?0:1;if(c=To)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,d,v,y,m,x,M,_,b,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(v=u===bl?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(v/c*Math.sin(y))),n&&(N=tn(v/n*Math.sin(y)))),c){m=c*Math.cos(f+E),x=c*Math.sin(f+E),M=c*Math.cos(s-E),_=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Lo?0:1;if(E&&su(m,x,M,_)===p^C){var z=(f+s)/2;m=c*Math.cos(z),x=c*Math.sin(z),M=_=null}}else m=x=0;if(n){b=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Lo?0:1;if(N&&su(b,w,S,k)===1-p^L){var q=(f+s)/2;b=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else b=w=0;if(h>Co&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){d=nLo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=xe,o=Me,a=Pu,l=lu,c=cu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},to.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=xe,e=Me,r=ju;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},to.svg.diagonal.radial=function(){var n=to.svg.diagonal(),t=ju,e=n.projection;return n.projection=function(n){return arguments.length?e(Uu(t=n)):t},n},to.svg.symbol=function(){function n(n,r){return(El.get(t.call(this,n,r))||Ou)(e.call(this,n,r))}var t=Hu,e=Fu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var El=to.map({circle:Ou,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Cl)),e=t*Cl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Al),e=t*Al/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Al),e=t*Al/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});to.svg.symbolTypes=El.keys();var Al=Math.sqrt(3),Cl=Math.tan(30*Do);_o.transition=function(n){for(var t,e,r=zl||++Rl,i=Xu(n),u=[],o=Ll||{time:Date.now(),ease:kr,delay:0,duration:250},a=-1,l=this.length;++arect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==to.event.keyCode&&(C||(x=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function d(){32==to.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function v(){var n=to.mouse(_),t=!1;M&&(n[0]+=M[0],n[1]+=M[1]),C||(to.event.altKey?(x||(x=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]1)for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return u.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(t={onlyLeaves:!1,circularReference:"leaf",search:"dfsPreOrder",iterateOverObject:!0,skipIteration:function(){return!1}},void 0!==o.onlyLeaves&&(t.onlyLeaves=o.onlyLeaves),void 0!==o.circularReference&&(t.circularReference=o.circularReference),void 0!==o.iterateOverObject&&(t.iterateOverObject=o.iterateOverObject),void 0!==o.skipIteration&&(t.skipIteration=o.skipIteration),void 0===o.search){i.next=9;break}if(o.search in s){i.next=8;break}throw new Error("The search algorithm "+o.search+" is incorrect.");case 8:t.search=o.search;case 9:return r=new l.default(e,t),n=(0,d.default)(t.circularReference),i.delegateYield(s[t.search](r,t.onlyLeaves,n),"t0",12);case 12:case"end":return i.stop()}},_[0],this)}Object.defineProperty(r,"__esModule",{value:!0});var a=e("babel-runtime/regenerator"),u=o(a);r.default=i;var c=e("./search"),s=n(c),f=e("./root-node"),l=o(f),p=e("./seen"),d=o(p),_=[i].map(u.default.mark)},{"./root-node":5,"./search":6,"./seen":7,"babel-runtime/regenerator":115}],3:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t;return l.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=l.default.keys(e);case 1:if((r.t1=r.t0()).done){r.next=7;break}return t=r.t1.value,r.next=5,[t,e[t]];case 5:r.next=1;break;case 7:case"end":return r.stop()}},p[0],this)}function i(e){var t;return l.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:t=0;case 1:if(!(tf;)if(u=c[f++],u!=u)return!0}else for(;s>f;f++)if((e||f in c)&&c[f]===r)return e||f||0;return!e&&-1}}},{"./_to-index":88,"./_to-iobject":90,"./_to-length":91}],39:[function(e,t,r){var n=e("./_cof"),o=e("./_wks")("toStringTag"),i="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,r,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),o))?r:i?n(t):"Object"==(u=n(t))&&"function"==typeof t.callee?"Arguments":u}},{"./_cof":40,"./_wks":97}],40:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],41:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],42:[function(e,t,r){"use strict";var n=e("./_object-dp"),o=e("./_property-desc");t.exports=function(e,t,r){t in e?n.f(e,t,o(0,r)):e[t]=r}},{"./_object-dp":70,"./_property-desc":81}],43:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":35}],44:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],45:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":50}],46:[function(e,t,r){var n=e("./_is-object"),o=e("./_global").document,i=n(o)&&n(o.createElement);t.exports=function(e){return i?o.createElement(e):{}}},{"./_global":51,"./_is-object":59}],47:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],48:[function(e,t,r){var n=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie");t.exports=function(e){var t=n(e),r=o.f;if(r)for(var a,u=r(e),c=i.f,s=0;u.length>s;)c.call(e,a=u[s++])&&t.push(a);return t}},{"./_object-gops":75,"./_object-keys":78,"./_object-pie":79}],49:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_ctx"),a=e("./_hide"),u="prototype",c=function(e,t,r){var s,f,l,p=e&c.F,d=e&c.G,_=e&c.S,b=e&c.P,h=e&c.B,y=e&c.W,v=d?o:o[t]||(o[t]={}),m=v[u],g=d?n:_?n[t]:(n[t]||{})[u];d&&(r=t);for(s in r)f=!p&&g&&void 0!==g[s],f&&s in v||(l=f?g[s]:r[s],v[s]=d&&"function"!=typeof g[s]?r[s]:h&&f?i(l,n):y&&g[s]==l?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[u]=e[u],t}(l):b&&"function"==typeof l?i(Function.call,l):l,b&&((v.virtual||(v.virtual={}))[s]=l,e&c.R&&m&&!m[s]&&a(m,s,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},{"./_core":41,"./_ctx":43,"./_global":51,"./_hide":53}],50:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],51:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],52:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],53:[function(e,t,r){var n=e("./_object-dp"),o=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":45,"./_object-dp":70,"./_property-desc":81}],54:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":51}],55:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":45,"./_dom-create":46,"./_fails":50}],56:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":40}],57:[function(e,t,r){var n=e("./_iterators"),o=e("./_wks")("iterator"),i=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},{"./_iterators":65,"./_wks":97}],58:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":40}],59:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],60:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},{"./_an-object":37}],61:[function(e,t,r){"use strict";var n=e("./_object-create"),o=e("./_property-desc"),i=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:o(1,r)}),i(e,t+" Iterator")}},{"./_hide":53,"./_object-create":69,"./_property-desc":81,"./_set-to-string-tag":84,"./_wks":97}],62:[function(e,t,r){"use strict";var n=e("./_library"),o=e("./_export"),i=e("./_redefine"),a=e("./_hide"),u=e("./_has"),c=e("./_iterators"),s=e("./_iter-create"),f=e("./_set-to-string-tag"),l=e("./_object-gpo"),p=e("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),_="@@iterator",b="keys",h="values",y=function(){return this};t.exports=function(e,t,r,v,m,g,j){s(r,t,v);var w,x,k,O=function(e){if(!d&&e in M)return M[e];switch(e){case b:return function(){return new r(this,e)};case h:return function(){return new r(this,e)}}return function(){return new r(this,e)}},E=t+" Iterator",S=m==h,L=!1,M=e.prototype,A=M[p]||M[_]||m&&M[m],P=A||O(m),T=m?S?O("entries"):P:void 0,F="Array"==t?M.entries||A:A;if(F&&(k=l(F.call(new e)),k!==Object.prototype&&(f(k,E,!0),n||u(k,p)||a(k,p,y))),S&&A&&A.name!==h&&(L=!0,P=function(){return A.call(this)}),n&&!j||!d&&!L&&M[p]||a(M,p,P),c[t]=P,c[E]=y,m)if(w={values:S?P:O(h),keys:g?P:O(b),entries:T},j)for(x in w)x in M||i(M,x,w[x]);else o(o.P+o.F*(d||L),t,w);return w}},{"./_export":49,"./_has":52,"./_hide":53,"./_iter-create":61,"./_iterators":65,"./_library":67,"./_object-gpo":76,"./_redefine":82,"./_set-to-string-tag":84,"./_wks":97}],63:[function(e,t,r){var n=e("./_wks")("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},e(i)}catch(e){}return r}},{"./_wks":97}],64:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],65:[function(e,t,r){t.exports={}},{}],66:[function(e,t,r){var n=e("./_object-keys"),o=e("./_to-iobject");t.exports=function(e,t){for(var r,i=o(e),a=n(i),u=a.length,c=0;u>c;)if(i[r=a[c++]]===t)return r}},{"./_object-keys":78,"./_to-iobject":90}],67:[function(e,t,r){t.exports=!0},{}],68:[function(e,t,r){var n=e("./_uid")("meta"),o=e("./_is-object"),i=e("./_has"),a=e("./_object-dp").f,u=0,c=Object.isExtensible||function(){return!0},s=!e("./_fails")(function(){return c(Object.preventExtensions({}))}),f=function(e){a(e,n,{value:{i:"O"+ ++u,w:{}}})},l=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,n)){if(!c(e))return"F";if(!t)return"E";f(e)}return e[n].i},p=function(e,t){if(!i(e,n)){if(!c(e))return!0;if(!t)return!1;f(e)}return e[n].w},d=function(e){return s&&_.NEED&&c(e)&&!i(e,n)&&f(e),e},_=t.exports={KEY:n,NEED:!1,fastKey:l,getWeak:p,onFreeze:d}},{"./_fails":50,"./_has":52,"./_is-object":59,"./_object-dp":70,"./_uid":94}],69:[function(e,t,r){var n=e("./_an-object"),o=e("./_object-dps"),i=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),u=function(){},c="prototype",s=function(){var t,r=e("./_dom-create")("iframe"),n=i.length,o="<",a=">";for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",t=r.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),s=t.F;n--;)delete s[c][i[n]];return s()};t.exports=Object.create||function(e,t){var r;return null!==e?(u[c]=n(e),r=new u,u[c]=null,r[a]=e):r=s(),void 0===t?r:o(r,t)}},{"./_an-object":37,"./_dom-create":46,"./_enum-bug-keys":47,"./_html":54,"./_object-dps":71,"./_shared-key":85}],70:[function(e,t,r){var n=e("./_an-object"),o=e("./_ie8-dom-define"),i=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":37,"./_descriptors":45,"./_ie8-dom-define":55,"./_to-primitive":93}],71:[function(e,t,r){var n=e("./_object-dp"),o=e("./_an-object"),i=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){o(e);for(var r,a=i(t),u=a.length,c=0;u>c;)n.f(e,r=a[c++],t[r]);return e}},{"./_an-object":37,"./_descriptors":45,"./_object-dp":70,"./_object-keys":78}],72:[function(e,t,r){ +var n=e("./_object-pie"),o=e("./_property-desc"),i=e("./_to-iobject"),a=e("./_to-primitive"),u=e("./_has"),c=e("./_ie8-dom-define"),s=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?s:function(e,t){if(e=i(e),t=a(t,!0),c)try{return s(e,t)}catch(e){}if(u(e,t))return o(!n.f.call(e,t),e[t])}},{"./_descriptors":45,"./_has":52,"./_ie8-dom-define":55,"./_object-pie":79,"./_property-desc":81,"./_to-iobject":90,"./_to-primitive":93}],73:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_object-gopn").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return o(e)}catch(e){return a.slice()}};t.exports.f=function(e){return a&&"[object Window]"==i.call(e)?u(e):o(n(e))}},{"./_object-gopn":74,"./_to-iobject":90}],74:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},{"./_enum-bug-keys":47,"./_object-keys-internal":77}],75:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],76:[function(e,t,r){var n=e("./_has"),o=e("./_to-object"),i=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":52,"./_shared-key":85,"./_to-object":92}],77:[function(e,t,r){var n=e("./_has"),o=e("./_to-iobject"),i=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,u=o(e),c=0,s=[];for(r in u)r!=a&&n(u,r)&&s.push(r);for(;t.length>c;)n(u,r=t[c++])&&(~i(s,r)||s.push(r));return s}},{"./_array-includes":38,"./_has":52,"./_shared-key":85,"./_to-iobject":90}],78:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,o)}},{"./_enum-bug-keys":47,"./_object-keys-internal":77}],79:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],80:[function(e,t,r){var n=e("./_export"),o=e("./_core"),i=e("./_fails");t.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*i(function(){r(1)}),"Object",a)}},{"./_core":41,"./_export":49,"./_fails":50}],81:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],82:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":53}],83:[function(e,t,r){var n=e("./_is-object"),o=e("./_an-object"),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function(e,t){return i(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:i}},{"./_an-object":37,"./_ctx":43,"./_is-object":59,"./_object-gopd":72}],84:[function(e,t,r){var n=e("./_object-dp").f,o=e("./_has"),i=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},{"./_has":52,"./_object-dp":70,"./_wks":97}],85:[function(e,t,r){var n=e("./_shared")("keys"),o=e("./_uid");t.exports=function(e){return n[e]||(n[e]=o(e))}},{"./_shared":86,"./_uid":94}],86:[function(e,t,r){var n=e("./_global"),o="__core-js_shared__",i=n[o]||(n[o]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":51}],87:[function(e,t,r){var n=e("./_to-integer"),o=e("./_defined");t.exports=function(e){return function(t,r){var i,a,u=String(o(t)),c=n(r),s=u.length;return c<0||c>=s?e?"":void 0:(i=u.charCodeAt(c),i<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?e?u.charAt(c):i:e?u.slice(c,c+2):(i-55296<<10)+(a-56320)+65536)}}},{"./_defined":44,"./_to-integer":89}],88:[function(e,t,r){var n=e("./_to-integer"),o=Math.max,i=Math.min;t.exports=function(e,t){return e=n(e),e<0?o(e+t,0):i(e,t)}},{"./_to-integer":89}],89:[function(e,t,r){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},{}],90:[function(e,t,r){var n=e("./_iobject"),o=e("./_defined");t.exports=function(e){return n(o(e))}},{"./_defined":44,"./_iobject":56}],91:[function(e,t,r){var n=e("./_to-integer"),o=Math.min;t.exports=function(e){return e>0?o(n(e),9007199254740991):0}},{"./_to-integer":89}],92:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":44}],93:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":59}],94:[function(e,t,r){var n=0,o=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},{}],95:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_library"),a=e("./_wks-ext"),u=e("./_object-dp").f;t.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},{"./_core":41,"./_global":51,"./_library":67,"./_object-dp":70,"./_wks-ext":96}],96:[function(e,t,r){r.f=e("./_wks")},{"./_wks":97}],97:[function(e,t,r){var n=e("./_shared")("wks"),o=e("./_uid"),i=e("./_global").Symbol,a="function"==typeof i,u=t.exports=function(e){return n[e]||(n[e]=a&&i[e]||(a?i:o)("Symbol."+e))};u.store=n},{"./_global":51,"./_shared":86,"./_uid":94}],98:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[n(e)]}},{"./_classof":39,"./_core":41,"./_iterators":65,"./_wks":97}],99:[function(e,t,r){var n=e("./_an-object"),o=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":37,"./_core":41,"./core.get-iterator-method":98}],100:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(n(t))}},{"./_classof":39,"./_core":41,"./_iterators":65,"./_wks":97}],101:[function(e,t,r){"use strict";var n=e("./_ctx"),o=e("./_export"),i=e("./_to-object"),a=e("./_iter-call"),u=e("./_is-array-iter"),c=e("./_to-length"),s=e("./_create-property"),f=e("./core.get-iterator-method");o(o.S+o.F*!e("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,o,l,p=i(e),d="function"==typeof this?this:Array,_=arguments.length,b=_>1?arguments[1]:void 0,h=void 0!==b,y=0,v=f(p);if(h&&(b=n(b,_>2?arguments[2]:void 0,2)),void 0==v||d==Array&&u(v))for(t=c(p.length),r=new d(t);t>y;y++)s(r,y,h?b(p[y],y):p[y]);else for(l=v.call(p),r=new d;!(o=l.next()).done;y++)s(r,y,h?a(l,b,[o.value,y],!0):o.value);return r.length=y,r}})},{"./_create-property":42,"./_ctx":43,"./_export":49,"./_is-array-iter":57,"./_iter-call":60,"./_iter-detect":63,"./_to-length":91,"./_to-object":92,"./core.get-iterator-method":98}],102:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),o=e("./_iter-step"),i=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,r):"values"==t?o(0,e[r]):o(0,[r,e[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":36,"./_iter-define":62,"./_iter-step":64,"./_iterators":65,"./_to-iobject":90}],103:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":49,"./_object-create":69}],104:[function(e,t,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":45,"./_export":49,"./_object-dp":70}],105:[function(e,t,r){var n=e("./_to-object"),o=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",function(){return function(e){return o(n(e))}})},{"./_object-gpo":76,"./_object-sap":80,"./_to-object":92}],106:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":49,"./_set-proto":83}],107:[function(e,t,r){},{}],108:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":62,"./_string-at":87}],109:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_has"),i=e("./_descriptors"),a=e("./_export"),u=e("./_redefine"),c=e("./_meta").KEY,s=e("./_fails"),f=e("./_shared"),l=e("./_set-to-string-tag"),p=e("./_uid"),d=e("./_wks"),_=e("./_wks-ext"),b=e("./_wks-define"),h=e("./_keyof"),y=e("./_enum-keys"),v=e("./_is-array"),m=e("./_an-object"),g=e("./_to-iobject"),j=e("./_to-primitive"),w=e("./_property-desc"),x=e("./_object-create"),k=e("./_object-gopn-ext"),O=e("./_object-gopd"),E=e("./_object-dp"),S=e("./_object-keys"),L=O.f,M=E.f,A=k.f,P=n.Symbol,T=n.JSON,F=T&&T.stringify,I="prototype",C=d("_hidden"),N=d("toPrimitive"),R={}.propertyIsEnumerable,G=f("symbol-registry"),D=f("symbols"),U=f("op-symbols"),Y=Object[I],W="function"==typeof P,B=n.QObject,q=!B||!B[I]||!B[I].findChild,J=i&&s(function(){return 7!=x(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=L(Y,t);n&&delete Y[t],M(e,t,r),n&&e!==Y&&M(Y,t,n)}:M,K=function(e){var t=D[e]=x(P[I]);return t._k=e,t},z=W&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},Q=function(e,t,r){return e===Y&&Q(U,t,r),m(e),t=j(t,!0),m(r),o(D,t)?(r.enumerable?(o(e,C)&&e[C][t]&&(e[C][t]=!1),r=x(r,{enumerable:w(0,!1)})):(o(e,C)||M(e,C,w(1,{})),e[C][t]=!0),J(e,t,r)):M(e,t,r)},H=function(e,t){m(e);for(var r,n=y(t=g(t)),o=0,i=n.length;i>o;)Q(e,r=n[o++],t[r]);return e},V=function(e,t){return void 0===t?x(e):H(x(e),t)},X=function(e){var t=R.call(this,e=j(e,!0));return!(this===Y&&o(D,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(D,e)||o(this,C)&&this[C][e])||t)},Z=function(e,t){if(e=g(e),t=j(t,!0),e!==Y||!o(D,t)||o(U,t)){var r=L(e,t);return!r||!o(D,t)||o(e,C)&&e[C][t]||(r.enumerable=!0),r}},$=function(e){for(var t,r=A(g(e)),n=[],i=0;r.length>i;)o(D,t=r[i++])||t==C||t==c||n.push(t);return n},ee=function(e){for(var t,r=e===Y,n=A(r?U:g(e)),i=[],a=0;n.length>a;)!o(D,t=n[a++])||r&&!o(Y,t)||i.push(D[t]);return i};W||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(r){this===Y&&t.call(U,r),o(this,C)&&o(this[C],e)&&(this[C][e]=!1),J(this,e,w(1,r))};return i&&q&&J(Y,e,{configurable:!0,set:t}),K(e)},u(P[I],"toString",function(){return this._k}),O.f=Z,E.f=Q,e("./_object-gopn").f=k.f=$,e("./_object-pie").f=X,e("./_object-gops").f=ee,i&&!e("./_library")&&u(Y,"propertyIsEnumerable",X,!0),_.f=function(e){return K(d(e))}),a(a.G+a.W+a.F*!W,{Symbol:P});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;te.length>re;)d(te[re++]);for(var te=S(d.store),re=0;te.length>re;)b(te[re++]);a(a.S+a.F*!W,"Symbol",{for:function(e){return o(G,e+="")?G[e]:G[e]=P(e)},keyFor:function(e){if(z(e))return h(G,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!W,"Object",{create:V,defineProperty:Q,defineProperties:H,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:ee}),T&&a(a.S+a.F*(!W||s(function(){var e=P();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);return t=n[1],"function"==typeof t&&(r=t),!r&&v(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!z(t))return t}),n[1]=t,F.apply(T,n)}}}),P[I][N]||e("./_hide")(P[I],N,P[I].valueOf),l(P,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},{"./_an-object":37,"./_descriptors":45,"./_enum-keys":48,"./_export":49,"./_fails":50,"./_global":51,"./_has":52,"./_hide":53,"./_is-array":58,"./_keyof":66,"./_library":67,"./_meta":68,"./_object-create":69,"./_object-dp":70,"./_object-gopd":72,"./_object-gopn":74,"./_object-gopn-ext":73,"./_object-gops":75,"./_object-keys":78,"./_object-pie":79,"./_property-desc":81,"./_redefine":82,"./_set-to-string-tag":84,"./_shared":86,"./_to-iobject":90,"./_to-primitive":93,"./_uid":94,"./_wks":97,"./_wks-define":95,"./_wks-ext":96}],110:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":95}],111:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":95}],112:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),o=e("./_hide"),i=e("./_iterators"),a=e("./_wks")("toStringTag"),u=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var s=u[c],f=n[s],l=f&&f.prototype;l&&!l[a]&&o(l,a,s),i[s]=i.Array}},{"./_global":51,"./_hide":53,"./_iterators":65,"./_wks":97,"./es6.array.iterator":102}],113:[function(e,t,r){(function(r){var n="object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this,o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./runtime":114}],114:[function(e,t,r){(function(e,r){!function(r){"use strict";function n(e,t,r,n){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),u=new _(n||[]);return a._invoke=f(e,r,u),a}function o(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function a(){}function u(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function s(t){function r(e,n,i,a){var u=o(t[e],t,n);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&m.call(s,"__await")?Promise.resolve(s.__await).then(function(e){r("next",e,i,a)},function(e){r("throw",e,i,a)}):Promise.resolve(s).then(function(e){c.value=e,i(c)},a)}a(u.arg)}function n(e,t){function n(){return new Promise(function(n,o){r(e,t,n,o)})}return i=i?i.then(n,n):n()}"object"==typeof e&&e.domain&&(r=e.domain.bind(r));var i;this._invoke=n}function f(e,t,r){var n=O;return function(i,a){if(n===S)throw new Error("Generator is already running");if(n===L){if("throw"===i)throw a;return h()}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=l(u,r);if(c){if(c===M)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===O)throw n=L,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=S;var s=o(e,t,r);if("normal"===s.type){if(n=r.done?L:E,s.arg===M)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=L,r.method="throw",r.arg=s.arg)}}}function l(e,t){var r=e.iterator[t.method];if(r===y){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=y,l(e,t),"throw"===t.method))return M;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return M}var n=o(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,M;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=y),t.delegate=null,M):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,M)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function b(e){if(e){var t=e[j];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=m.call(o,"catchLoc"),u=m.call(o,"finallyLoc");if(a&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&m.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),d(r),M}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;d(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:b(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=y),M}}}("object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:1}],115:[function(e,t,r){t.exports=e("regenerator-runtime")},{"regenerator-runtime":113}]},{},[2])(2)}); diff --git a/documentation/js/libs/es6-shim.min.js b/documentation/js/libs/es6-shim.min.js new file mode 100644 index 0000000000..243e880fd8 --- /dev/null +++ b/documentation/js/libs/es6-shim.min.js @@ -0,0 +1,12 @@ +/*! + * https://github.com/paulmillr/es6-shim + * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com) + * and contributors, MIT License + * es6-shim: v0.35.4 + * see https://github.com/paulmillr/es6-shim/blob/0.35.3/LICENSE + * Details and documentation: + * https://github.com/paulmillr/es6-shim/ + */ +(function(e,t){if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){"use strict";var e=Function.call.bind(Function.apply);var t=Function.call.bind(Function.call);var r=Array.isArray;var n=Object.keys;var o=function notThunker(t){return function notThunk(){return!e(t,this,arguments)}};var i=function(e){try{e();return false}catch(t){return true}};var a=function valueOrFalseIfThrows(e){try{return e()}catch(t){return false}};var u=o(i);var f=function(){return!i(function(){return Object.defineProperty({},"x",{get:function(){}})})};var s=!!Object.defineProperty&&f();var c=function foo(){}.name==="foo";var l=Function.call.bind(Array.prototype.forEach);var p=Function.call.bind(Array.prototype.reduce);var v=Function.call.bind(Array.prototype.filter);var y=Function.call.bind(Array.prototype.some);var h=function(e,t,r,n){if(!n&&t in e){return}if(s){Object.defineProperty(e,t,{configurable:true,enumerable:false,writable:true,value:r})}else{e[t]=r}};var b=function(e,t,r){l(n(t),function(n){var o=t[n];h(e,n,o,!!r)})};var g=Function.call.bind(Object.prototype.toString);var d=typeof/abc/==="function"?function IsCallableSlow(e){return typeof e==="function"&&g(e)==="[object Function]"}:function IsCallableFast(e){return typeof e==="function"};var m={getter:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}Object.defineProperty(e,t,{configurable:true,enumerable:false,get:r})},proxy:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,{configurable:n.configurable,enumerable:n.enumerable,get:function getKey(){return e[t]},set:function setKey(r){e[t]=r}})},redefine:function(e,t,r){if(s){var n=Object.getOwnPropertyDescriptor(e,t);n.value=r;Object.defineProperty(e,t,n)}else{e[t]=r}},defineByDescriptor:function(e,t,r){if(s){Object.defineProperty(e,t,r)}else if("value"in r){e[t]=r.value}},preserveToString:function(e,t){if(t&&d(t.toString)){h(e,"toString",t.toString.bind(t),true)}}};var O=Object.create||function(e,t){var r=function Prototype(){};r.prototype=e;var o=new r;if(typeof t!=="undefined"){n(t).forEach(function(e){m.defineByDescriptor(o,e,t[e])})}return o};var w=function(e,t){if(!Object.setPrototypeOf){return false}return a(function(){var r=function Subclass(t){var r=new e(t);Object.setPrototypeOf(r,Subclass.prototype);return r};Object.setPrototypeOf(r,e);r.prototype=O(e.prototype,{constructor:{value:r}});return t(r)})};var j=function(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var S=j();var T=S.isFinite;var I=Function.call.bind(String.prototype.indexOf);var E=Function.apply.bind(Array.prototype.indexOf);var P=Function.call.bind(Array.prototype.concat);var C=Function.call.bind(String.prototype.slice);var M=Function.call.bind(Array.prototype.push);var x=Function.apply.bind(Array.prototype.push);var N=Function.call.bind(Array.prototype.join);var A=Function.call.bind(Array.prototype.shift);var _=Math.max;var R=Math.min;var k=Math.floor;var L=Math.abs;var F=Math.exp;var D=Math.log;var z=Math.sqrt;var q=Function.call.bind(Object.prototype.hasOwnProperty);var W;var G=function(){};var H=S.Map;var V=H&&H.prototype["delete"];var B=H&&H.prototype.get;var U=H&&H.prototype.has;var $=H&&H.prototype.set;var J=S.Symbol||{};var X=J.species||"@@species";var K=Number.isNaN||function isNaN(e){return e!==e};var Z=Number.isFinite||function isFinite(e){return typeof e==="number"&&T(e)};var Y=d(Math.sign)?Math.sign:function sign(e){var t=Number(e);if(t===0){return t}if(K(t)){return t}return t<0?-1:1};var Q=function log1p(e){var t=Number(e);if(t<-1||K(t)){return NaN}if(t===0||t===Infinity){return t}if(t===-1){return-Infinity}return 1+t-1===0?t:t*(D(1+t)/(1+t-1))};var ee=function isArguments(e){return g(e)==="[object Arguments]"};var te=function isArguments(e){return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&g(e)!=="[object Array]"&&g(e.callee)==="[object Function]"};var re=ee(arguments)?ee:te;var ne={primitive:function(e){return e===null||typeof e!=="function"&&typeof e!=="object"},string:function(e){return g(e)==="[object String]"},regex:function(e){return g(e)==="[object RegExp]"},symbol:function(e){return typeof S.Symbol==="function"&&typeof e==="symbol"}};var oe=function overrideNative(e,t,r){var n=e[t];h(e,t,r,true);m.preserveToString(e[t],n)};var ie=typeof J==="function"&&typeof J["for"]==="function"&&ne.symbol(J());var ae=ne.symbol(J.iterator)?J.iterator:"_es6-shim iterator_";if(S.Set&&typeof(new S.Set)["@@iterator"]==="function"){ae="@@iterator"}if(!S.Reflect){h(S,"Reflect",{},true)}var ue=S.Reflect;var fe=String;var se=typeof document==="undefined"||!document?null:document.all;var ce=se==null?function isNullOrUndefined(e){return e==null}:function isNullOrUndefinedAndNotDocumentAll(e){return e==null&&e!==se};var le={Call:function Call(t,r){var n=arguments.length>2?arguments[2]:[];if(!le.IsCallable(t)){throw new TypeError(t+" is not a function")}return e(t,r,n)},RequireObjectCoercible:function(e,t){if(ce(e)){throw new TypeError(t||"Cannot call method on "+e)}return e},TypeIsObject:function(e){if(e===void 0||e===null||e===true||e===false){return false}return typeof e==="function"||typeof e==="object"||e===se},ToObject:function(e,t){return Object(le.RequireObjectCoercible(e,t))},IsCallable:d,IsConstructor:function(e){return le.IsCallable(e)},ToInt32:function(e){return le.ToNumber(e)>>0},ToUint32:function(e){return le.ToNumber(e)>>>0},ToNumber:function(e){if(ie&&g(e)==="[object Symbol]"){throw new TypeError("Cannot convert a Symbol value to a number")}return+e},ToInteger:function(e){var t=le.ToNumber(e);if(K(t)){return 0}if(t===0||!Z(t)){return t}return(t>0?1:-1)*k(L(t))},ToLength:function(e){var t=le.ToInteger(e);if(t<=0){return 0}if(t>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return t},SameValue:function(e,t){if(e===t){if(e===0){return 1/e===1/t}return true}return K(e)&&K(t)},SameValueZero:function(e,t){return e===t||K(e)&&K(t)},GetIterator:function(e){if(re(e)){return new W(e,"value")}var t=le.GetMethod(e,ae);if(!le.IsCallable(t)){throw new TypeError("value is not an iterable")}var r=le.Call(t,e);if(!le.TypeIsObject(r)){throw new TypeError("bad iterator")}return r},GetMethod:function(e,t){var r=le.ToObject(e)[t];if(ce(r)){return void 0}if(!le.IsCallable(r)){throw new TypeError("Method not callable: "+t)}return r},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var r=le.GetMethod(e,"return");if(r===void 0){return}var n,o;try{n=le.Call(r,e)}catch(i){o=i}if(t){return}if(o){throw o}if(!le.TypeIsObject(n)){throw new TypeError("Iterator's return method returned a non-object.")}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!le.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},IteratorStep:function(e){var t=le.IteratorNext(e);var r=le.IteratorComplete(t);return r?false:t},Construct:function(e,t,r,n){var o=typeof r==="undefined"?e:r;if(!n&&ue.construct){return ue.construct(e,t,o)}var i=o.prototype;if(!le.TypeIsObject(i)){i=Object.prototype}var a=O(i);var u=le.Call(e,a,t);return le.TypeIsObject(u)?u:a},SpeciesConstructor:function(e,t){var r=e.constructor;if(r===void 0){return t}if(!le.TypeIsObject(r)){throw new TypeError("Bad constructor")}var n=r[X];if(ce(n)){return t}if(!le.IsConstructor(n)){throw new TypeError("Bad @@species")}return n},CreateHTML:function(e,t,r,n){var o=le.ToString(e);var i="<"+t;if(r!==""){var a=le.ToString(n);var u=a.replace(/"/g,""");i+=" "+r+'="'+u+'"'}var f=i+">";var s=f+o;return s+""},IsRegExp:function IsRegExp(e){if(!le.TypeIsObject(e)){return false}var t=e[J.match];if(typeof t!=="undefined"){return!!t}return ne.regex(e)},ToString:function ToString(e){if(ie&&g(e)==="[object Symbol]"){throw new TypeError("Cannot convert a Symbol value to a number")}return fe(e)}};if(s&&ie){var pe=function defineWellKnownSymbol(e){if(ne.symbol(J[e])){return J[e]}var t=J["for"]("Symbol."+e);Object.defineProperty(J,e,{configurable:false,enumerable:false,writable:false,value:t});return t};if(!ne.symbol(J.search)){var ve=pe("search");var ye=String.prototype.search;h(RegExp.prototype,ve,function search(e){return le.Call(ye,e,[this])});var he=function search(e){var t=le.RequireObjectCoercible(this);if(!ce(e)){var r=le.GetMethod(e,ve);if(typeof r!=="undefined"){return le.Call(r,e,[t])}}return le.Call(ye,t,[le.ToString(e)])};oe(String.prototype,"search",he)}if(!ne.symbol(J.replace)){var be=pe("replace");var ge=String.prototype.replace;h(RegExp.prototype,be,function replace(e,t){return le.Call(ge,e,[this,t])});var de=function replace(e,t){var r=le.RequireObjectCoercible(this);if(!ce(e)){var n=le.GetMethod(e,be);if(typeof n!=="undefined"){return le.Call(n,e,[r,t])}}return le.Call(ge,r,[le.ToString(e),t])};oe(String.prototype,"replace",de)}if(!ne.symbol(J.split)){var me=pe("split");var Oe=String.prototype.split;h(RegExp.prototype,me,function split(e,t){return le.Call(Oe,e,[this,t])});var we=function split(e,t){var r=le.RequireObjectCoercible(this);if(!ce(e)){var n=le.GetMethod(e,me);if(typeof n!=="undefined"){return le.Call(n,e,[r,t])}}return le.Call(Oe,r,[le.ToString(e),t])};oe(String.prototype,"split",we)}var je=ne.symbol(J.match);var Se=je&&function(){var e={};e[J.match]=function(){return 42};return"a".match(e)!==42}();if(!je||Se){var Te=pe("match");var Ie=String.prototype.match;h(RegExp.prototype,Te,function match(e){return le.Call(Ie,e,[this])});var Ee=function match(e){var t=le.RequireObjectCoercible(this);if(!ce(e)){var r=le.GetMethod(e,Te);if(typeof r!=="undefined"){return le.Call(r,e,[t])}}return le.Call(Ie,t,[le.ToString(e)])};oe(String.prototype,"match",Ee)}}var Pe=function wrapConstructor(e,t,r){m.preserveToString(t,e);if(Object.setPrototypeOf){Object.setPrototypeOf(e,t)}if(s){l(Object.getOwnPropertyNames(e),function(n){if(n in G||r[n]){return}m.proxy(e,n,t)})}else{l(Object.keys(e),function(n){if(n in G||r[n]){return}t[n]=e[n]})}t.prototype=e.prototype;m.redefine(e.prototype,"constructor",t)};var Ce=function(){return this};var Me=function(e){if(s&&!q(e,X)){m.getter(e,X,Ce)}};var xe=function(e,t){var r=t||function iterator(){return this};h(e,ae,r);if(!e[ae]&&ne.symbol(ae)){e[ae]=r}};var Ne=function createDataProperty(e,t,r){if(s){Object.defineProperty(e,t,{configurable:true,enumerable:true,writable:true,value:r})}else{e[t]=r}};var Ae=function createDataPropertyOrThrow(e,t,r){Ne(e,t,r);if(!le.SameValue(e[t],r)){throw new TypeError("property is nonconfigurable")}};var _e=function(e,t,r,n){if(!le.TypeIsObject(e)){throw new TypeError("Constructor requires `new`: "+t.name)}var o=t.prototype;if(!le.TypeIsObject(o)){o=r}var i=O(o);for(var a in n){if(q(n,a)){var u=n[a];h(i,a,u,true)}}return i};if(String.fromCodePoint&&String.fromCodePoint.length!==1){var Re=String.fromCodePoint;oe(String,"fromCodePoint",function fromCodePoint(e){return le.Call(Re,this,arguments)})}var ke={fromCodePoint:function fromCodePoint(e){var t=[];var r;for(var n=0,o=arguments.length;n1114111){throw new RangeError("Invalid code point "+r)}if(r<65536){M(t,String.fromCharCode(r))}else{r-=65536;M(t,String.fromCharCode((r>>10)+55296));M(t,String.fromCharCode(r%1024+56320))}}return N(t,"")},raw:function raw(e){var t=arguments.length-1;var r=le.ToObject(e,"bad template");var raw=le.ToObject(r.raw,"bad raw value");var n=raw.length;var o=le.ToLength(n);if(o<=0){return""}var i=[];var a=0;var u,f,s,c;while(a=o){break}f=a+1=Fe){throw new RangeError("repeat count must be less than infinity and not overflow maximum string size")}return Le(t,r)},startsWith:function startsWith(e){var t=le.ToString(le.RequireObjectCoercible(this));if(le.IsRegExp(e)){throw new TypeError('Cannot call method "startsWith" with a regex')}var r=le.ToString(e);var n;if(arguments.length>1){n=arguments[1]}var o=_(le.ToInteger(n),0);return C(t,o,o+r.length)===r},endsWith:function endsWith(e){var t=le.ToString(le.RequireObjectCoercible(this));if(le.IsRegExp(e)){throw new TypeError('Cannot call method "endsWith" with a regex')}var r=le.ToString(e);var n=t.length;var o;if(arguments.length>1){o=arguments[1]}var i=typeof o==="undefined"?n:le.ToInteger(o);var a=R(_(i,0),n);return C(t,a-r.length,a)===r},includes:function includes(e){if(le.IsRegExp(e)){throw new TypeError('"includes" does not accept a RegExp')}var t=le.ToString(e);var r;if(arguments.length>1){r=arguments[1]}return I(this,t,r)!==-1},codePointAt:function codePointAt(e){var t=le.ToString(le.RequireObjectCoercible(this));var r=le.ToInteger(e);var n=t.length;if(r>=0&&r56319||i){return o}var a=t.charCodeAt(r+1);if(a<56320||a>57343){return o}return(o-55296)*1024+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",Infinity)!==false){oe(String.prototype,"includes",De.includes)}if(String.prototype.startsWith&&String.prototype.endsWith){var ze=i(function(){return"/a/".startsWith(/a/)});var qe=a(function(){return"abc".startsWith("a",Infinity)===false});if(!ze||!qe){oe(String.prototype,"startsWith",De.startsWith);oe(String.prototype,"endsWith",De.endsWith)}}if(ie){var We=a(function(){var e=/a/;e[J.match]=false;return"/a/".startsWith(e)});if(!We){oe(String.prototype,"startsWith",De.startsWith)}var Ge=a(function(){var e=/a/;e[J.match]=false;return"/a/".endsWith(e)});if(!Ge){oe(String.prototype,"endsWith",De.endsWith)}var He=a(function(){var e=/a/;e[J.match]=false;return"/a/".includes(e)});if(!He){oe(String.prototype,"includes",De.includes)}}b(String.prototype,De);var Ve=["\t\n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003","\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028","\u2029\ufeff"].join("");var Be=new RegExp("(^["+Ve+"]+)|(["+Ve+"]+$)","g");var Ue=function trim(){return le.ToString(le.RequireObjectCoercible(this)).replace(Be,"")};var $e=["\x85","\u200b","\ufffe"].join("");var Je=new RegExp("["+$e+"]","g");var Xe=/^[-+]0x[0-9a-f]+$/i;var Ke=$e.trim().length!==$e.length;h(String.prototype,"trim",Ue,Ke);var Ze=function(e){return{value:e,done:arguments.length===0}};var Ye=function(e){le.RequireObjectCoercible(e);h(this,"_s",le.ToString(e));h(this,"_i",0)};Ye.prototype.next=function(){var e=this._s;var t=this._i;if(typeof e==="undefined"||t>=e.length){this._s=void 0;return Ze()}var r=e.charCodeAt(t);var n,o;if(r<55296||r>56319||t+1===e.length){o=1}else{n=e.charCodeAt(t+1);o=n<56320||n>57343?1:2}this._i=t+o;return Ze(e.substr(t,o))};xe(Ye.prototype);xe(String.prototype,function(){return new Ye(this)});var Qe={from:function from(e){var r=this;var n;if(arguments.length>1){n=arguments[1]}var o,i;if(typeof n==="undefined"){o=false}else{if(!le.IsCallable(n)){throw new TypeError("Array.from: when provided, the second argument must be a function")}if(arguments.length>2){i=arguments[2]}o=true}var a=typeof(re(e)||le.GetMethod(e,ae))!=="undefined";var u,f,s;if(a){f=le.IsConstructor(r)?Object(new r):[];var c=le.GetIterator(e);var l,p;s=0;while(true){l=le.IteratorStep(c);if(l===false){break}p=l.value;try{if(o){p=typeof i==="undefined"?n(p,s):t(n,i,p,s)}f[s]=p}catch(v){le.IteratorClose(c,true);throw v}s+=1}u=s}else{var y=le.ToObject(e);u=le.ToLength(y.length);f=le.IsConstructor(r)?Object(new r(u)):new Array(u);var h;for(s=0;s2){f=arguments[2]}var s=typeof f==="undefined"?n:le.ToInteger(f);var c=s<0?_(n+s,0):R(s,n);var l=R(c-u,n-a);var p=1;if(u0){if(u in r){r[a]=r[u]}else{delete r[a]}u+=p;a+=p;l-=1}return r},fill:function fill(e){var t;if(arguments.length>1){t=arguments[1]}var r;if(arguments.length>2){r=arguments[2]}var n=le.ToObject(this);var o=le.ToLength(n.length);t=le.ToInteger(typeof t==="undefined"?0:t);r=le.ToInteger(typeof r==="undefined"?o:r);var i=t<0?_(o+t,0):R(t,o);var a=r<0?o+r:r;for(var u=i;u1?arguments[1]:null;for(var i=0,a;i1?arguments[1]:null;for(var i=0;i1&&typeof arguments[1]!=="undefined"){return le.Call(ut,this,arguments)}return t(ut,this,e)})}var ft=-(Math.pow(2,32)-1);var st=function(e,r){var n={length:ft};n[r?(n.length>>>0)-1:0]=true;return a(function(){t(e,n,function(){throw new RangeError("should not reach here")},[]);return true})};if(!st(Array.prototype.forEach)){var ct=Array.prototype.forEach;oe(Array.prototype,"forEach",function forEach(e){return le.Call(ct,this.length>=0?this:[],arguments)})}if(!st(Array.prototype.map)){var lt=Array.prototype.map;oe(Array.prototype,"map",function map(e){return le.Call(lt,this.length>=0?this:[],arguments)})}if(!st(Array.prototype.filter)){var pt=Array.prototype.filter;oe(Array.prototype,"filter",function filter(e){return le.Call(pt,this.length>=0?this:[],arguments)})}if(!st(Array.prototype.some)){var vt=Array.prototype.some;oe(Array.prototype,"some",function some(e){return le.Call(vt,this.length>=0?this:[],arguments)})}if(!st(Array.prototype.every)){var yt=Array.prototype.every;oe(Array.prototype,"every",function every(e){return le.Call(yt,this.length>=0?this:[],arguments)})}if(!st(Array.prototype.reduce)){var ht=Array.prototype.reduce;oe(Array.prototype,"reduce",function reduce(e){return le.Call(ht,this.length>=0?this:[],arguments)})}if(!st(Array.prototype.reduceRight,true)){var bt=Array.prototype.reduceRight;oe(Array.prototype,"reduceRight",function reduceRight(e){return le.Call(bt,this.length>=0?this:[],arguments)})}var gt=Number("0o10")!==8;var dt=Number("0b10")!==2;var mt=y($e,function(e){return Number(e+0+e)===0});if(gt||dt||mt){var Ot=Number;var wt=/^0b[01]+$/i;var jt=/^0o[0-7]+$/i;var St=wt.test.bind(wt);var Tt=jt.test.bind(jt);var It=function(e,t){var r;if(typeof e.valueOf==="function"){r=e.valueOf();if(ne.primitive(r)){return r}}if(typeof e.toString==="function"){r=e.toString();if(ne.primitive(r)){return r}}throw new TypeError("No default value")};var Et=Je.test.bind(Je);var Pt=Xe.test.bind(Xe);var Ct=function(){var e=function Number(t){var r;if(arguments.length>0){r=ne.primitive(t)?t:It(t,"number")}else{r=0}if(typeof r==="string"){r=le.Call(Ue,r);if(St(r)){r=parseInt(C(r,2),2)}else if(Tt(r)){r=parseInt(C(r,2),8)}else if(Et(r)||Pt(r)){r=NaN}}var n=this;var o=a(function(){Ot.prototype.valueOf.call(n);return true});if(n instanceof e&&!o){return new Ot(r)}return Ot(r)};return e}();Pe(Ot,Ct,{});b(Ct,{NaN:Ot.NaN,MAX_VALUE:Ot.MAX_VALUE,MIN_VALUE:Ot.MIN_VALUE,NEGATIVE_INFINITY:Ot.NEGATIVE_INFINITY,POSITIVE_INFINITY:Ot.POSITIVE_INFINITY});Number=Ct;m.redefine(S,"Number",Ct)}var Mt=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Mt,MIN_SAFE_INTEGER:-Mt,EPSILON:2.220446049250313e-16,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:Z,isInteger:function isInteger(e){return Z(e)&&le.ToInteger(e)===e},isSafeInteger:function isSafeInteger(e){return Number.isInteger(e)&&L(e)<=Number.MAX_SAFE_INTEGER},isNaN:K});h(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt);if([,1].find(function(){return true})===1){oe(Array.prototype,"find",tt.find)}if([,1].findIndex(function(){return true})!==0){oe(Array.prototype,"findIndex",tt.findIndex)}var xt=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable);var Nt=function ensureEnumerable(e,t){if(s&&xt(e,t)){Object.defineProperty(e,t,{enumerable:false})}};var At=function sliceArgs(){var e=Number(this);var t=arguments.length;var r=t-e;var n=new Array(r<0?0:r);for(var o=e;o1){return NaN}var r=L(t);return Y(t)*Q(2*r/(1-r))/2},cbrt:function cbrt(e){var t=Number(e);if(t===0){return t}var r=t<0;var n;if(r){t=-t}if(t===Infinity){n=Infinity}else{n=F(D(t)/3);n=(t/(n*n)+2*n)/3}return r?-n:n},clz32:function clz32(e){var t=Number(e);var r=le.ToUint32(t);if(r===0){return 32}return Mr?le.Call(Mr,r):31-k(D(r+.5)*Pr)},cosh:function cosh(e){var t=Number(e);if(t===0){return 1}if(K(t)){return NaN}if(!T(t)){return Infinity}var r=F(L(t)-1);return(r+1/(r*Er*Er))*(Er/2)},expm1:function expm1(e){var t=Number(e);if(t===-Infinity){return-1}if(!T(t)||t===0){return t}if(L(t)>.5){return F(t)-1}var r=t;var n=0;var o=1;while(n+r!==n){n+=r;o+=1;r*=t/o}return n},hypot:function hypot(e,t){var r=0;var n=0;for(var o=0;o0?i/n*(i/n):i}}return n===Infinity?Infinity:n*z(r)},log2:function log2(e){return D(e)*Pr},log10:function log10(e){return D(e)*Cr},log1p:Q,sign:Y,sinh:function sinh(e){var t=Number(e);if(!T(t)||t===0){return t}var r=L(t);if(r<1){var n=Math.expm1(r);return Y(t)*n*(1+1/(n+1))/2}var o=F(r-1);return Y(t)*(o-1/(o*Er*Er))*(Er/2)},tanh:function tanh(e){var t=Number(e);if(K(t)||t===0){return t}if(t>=20){return 1}if(t<=-20){return-1}return(Math.expm1(t)-Math.expm1(-t))/(F(t)+F(-t))},trunc:function trunc(e){var t=Number(e);return t<0?-k(-t):k(t)},imul:function imul(e,t){var r=le.ToUint32(e);var n=le.ToUint32(t);var o=r>>>16&65535;var i=r&65535;var a=n>>>16&65535;var u=n&65535;return i*u+(o*u+i*a<<16>>>0)|0},fround:function fround(e){var t=Number(e);if(t===0||t===Infinity||t===-Infinity||K(t)){return t}var r=Y(t);var n=L(t);if(nTr||K(i)){return r*Infinity}return r*i}};var Nr=function withinULPDistance(e,t,r){return L(1-e/t)/Number.EPSILON<(r||8)};b(Math,xr);h(Math,"sinh",xr.sinh,Math.sinh(710)===Infinity);h(Math,"cosh",xr.cosh,Math.cosh(710)===Infinity);h(Math,"log1p",xr.log1p,Math.log1p(-1e-17)!==-1e-17);h(Math,"asinh",xr.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7)); +h(Math,"asinh",xr.asinh,Math.asinh(1e300)===Infinity);h(Math,"atanh",xr.atanh,Math.atanh(1e-300)===0);h(Math,"tanh",xr.tanh,Math.tanh(-2e-17)!==-2e-17);h(Math,"acosh",xr.acosh,Math.acosh(Number.MAX_VALUE)===Infinity);h(Math,"acosh",xr.acosh,!Nr(Math.acosh(1+Number.EPSILON),Math.sqrt(2*Number.EPSILON)));h(Math,"cbrt",xr.cbrt,!Nr(Math.cbrt(1e-300),1e-100));h(Math,"sinh",xr.sinh,Math.sinh(-2e-17)!==-2e-17);var Ar=Math.expm1(10);h(Math,"expm1",xr.expm1,Ar>22025.465794806718||Ar<22025.465794806718);h(Math,"hypot",xr.hypot,Math.hypot(Infinity,NaN)!==Infinity);var _r=Math.round;var Rr=Math.round(.5-Number.EPSILON/4)===0&&Math.round(-.5+Number.EPSILON/3.99)===1;var kr=wr+1;var Lr=2*wr-1;var Fr=[kr,Lr].every(function(e){return Math.round(e)===e});h(Math,"round",function round(e){var t=k(e);var r=t===-1?-0:t+1;return e-t<.5?t:r},!Rr||!Fr);m.preserveToString(Math.round,_r);var Dr=Math.imul;if(Math.imul(4294967295,5)!==-5){Math.imul=xr.imul;m.preserveToString(Math.imul,Dr)}if(Math.imul.length!==2){oe(Math,"imul",function imul(e,t){return le.Call(Dr,Math,arguments)})}var zr=function(){var e=S.setTimeout;if(typeof e!=="function"&&typeof e!=="object"){return}le.IsPromise=function(e){if(!le.TypeIsObject(e)){return false}if(typeof e._promise==="undefined"){return false}return true};var r=function(e){if(!le.IsConstructor(e)){throw new TypeError("Bad promise constructor")}var t=this;var r=function(e,r){if(t.resolve!==void 0||t.reject!==void 0){throw new TypeError("Bad Promise implementation!")}t.resolve=e;t.reject=r};t.resolve=void 0;t.reject=void 0;t.promise=new e(r);if(!(le.IsCallable(t.resolve)&&le.IsCallable(t.reject))){throw new TypeError("Bad promise constructor")}};var n;if(typeof window!=="undefined"&&le.IsCallable(window.postMessage)){n=function(){var e=[];var t="zero-timeout-message";var r=function(r){M(e,r);window.postMessage(t,"*")};var n=function(r){if(r.source===window&&r.data===t){r.stopPropagation();if(e.length===0){return}var n=A(e);n()}};window.addEventListener("message",n,true);return r}}var o=function(){var e=S.Promise;var t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}};var i=le.IsCallable(S.setImmediate)?S.setImmediate:typeof process==="object"&&process.nextTick?process.nextTick:o()||(le.IsCallable(n)?n():function(t){e(t,0)});var a=function(e){return e};var u=function(e){throw e};var f=0;var s=1;var c=2;var l=0;var p=1;var v=2;var y={};var h=function(e,t,r){i(function(){g(e,t,r)})};var g=function(e,t,r){var n,o;if(t===y){return e(r)}try{n=e(r);o=t.resolve}catch(i){n=i;o=t.reject}o(n)};var d=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.fulfillReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o0){h(r.rejectReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o2&&arguments[2]===y;if(b&&o===E){i=y}else{i=new r(o)}var g=le.IsCallable(e)?e:a;var d=le.IsCallable(t)?t:u;var m=n._promise;var O;if(m.state===f){if(m.reactionLength===0){m.fulfillReactionHandler0=g;m.rejectReactionHandler0=d;m.reactionCapability0=i}else{var w=3*(m.reactionLength-1);m[w+l]=g;m[w+p]=d;m[w+v]=i}m.reactionLength+=1}else if(m.state===s){O=m.result;h(g,i,O)}else if(m.state===c){O=m.result;h(d,i,O)}else{throw new TypeError("unexpected Promise state")}return i.promise}});y=new r(E);I=T.then;return E}();if(S.Promise){delete S.Promise.accept;delete S.Promise.defer;delete S.Promise.prototype.chain}if(typeof zr==="function"){b(S,{Promise:zr});var qr=w(S.Promise,function(e){return e.resolve(42).then(function(){})instanceof e});var Wr=!i(function(){return S.Promise.reject(42).then(null,5).then(null,G)});var Gr=i(function(){return S.Promise.call(3,G)});var Hr=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,G).then(null,G)}catch(n){return true}return t===r}(S.Promise);var Vr=s&&function(){var e=0;var t=Object.defineProperty({},"then",{get:function(){e+=1}});Promise.resolve(t);return e===1}();var Br=function BadResolverPromise(e){var t=new Promise(e);e(3,function(){});this.then=t.then;this.constructor=BadResolverPromise};Br.prototype=Promise.prototype;Br.all=Promise.all;var Ur=a(function(){return!!Br.all([1,2])});if(!qr||!Wr||!Gr||Hr||!Vr||Ur){Promise=zr;oe(S,"Promise",zr)}if(Promise.all.length!==1){var $r=Promise.all;oe(Promise,"all",function all(e){return le.Call($r,this,arguments)})}if(Promise.race.length!==1){var Jr=Promise.race;oe(Promise,"race",function race(e){return le.Call(Jr,this,arguments)})}if(Promise.resolve.length!==1){var Xr=Promise.resolve;oe(Promise,"resolve",function resolve(e){return le.Call(Xr,this,arguments)})}if(Promise.reject.length!==1){var Kr=Promise.reject;oe(Promise,"reject",function reject(e){return le.Call(Kr,this,arguments)})}Nt(Promise,"all");Nt(Promise,"race");Nt(Promise,"resolve");Nt(Promise,"reject");Me(Promise)}var Zr=function(e){var t=n(p(e,function(e,t){e[t]=true;return e},{}));return e.join(":")===t.join(":")};var Yr=Zr(["z","a","bb"]);var Qr=Zr(["z",1,"a","3",2]);if(s){var en=function fastkey(e,t){if(!t&&!Yr){return null}if(ce(e)){return"^"+le.ToString(e)}else if(typeof e==="string"){return"$"+e}else if(typeof e==="number"){if(!Qr){return"n"+e}return e}else if(typeof e==="boolean"){return"b"+e}return null};var tn=function emptyObject(){return Object.create?Object.create(null):{}};var rn=function addIterableToMap(e,n,o){if(r(o)||ne.string(o)){l(o,function(e){if(!le.TypeIsObject(e)){throw new TypeError("Iterator value "+e+" is not an entry object")}n.set(e[0],e[1])})}else if(o instanceof e){t(e.prototype.forEach,o,function(e,t){n.set(t,e)})}else{var i,a;if(!ce(o)){a=n.set;if(!le.IsCallable(a)){throw new TypeError("bad map")}i=le.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=le.IteratorStep(i);if(u===false){break}var f=u.value;try{if(!le.TypeIsObject(f)){throw new TypeError("Iterator value "+f+" is not an entry object")}t(a,n,f[0],f[1])}catch(s){le.IteratorClose(i,true);throw s}}}}};var nn=function addIterableToSet(e,n,o){if(r(o)||ne.string(o)){l(o,function(e){n.add(e)})}else if(o instanceof e){t(e.prototype.forEach,o,function(e){n.add(e)})}else{var i,a;if(!ce(o)){a=n.add;if(!le.IsCallable(a)){throw new TypeError("bad set")}i=le.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=le.IteratorStep(i);if(u===false){break}var f=u.value;try{t(a,n,f)}catch(s){le.IteratorClose(i,true);throw s}}}}};var on={Map:function(){var e={};var r=function MapEntry(e,t){this.key=e;this.value=t;this.next=null;this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map};var o=function requireMapSlot(e,t){if(!le.TypeIsObject(e)||!n(e)){throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+le.ToString(e))}};var i=function MapIterator(e,t){o(e,"[[MapIterator]]");h(this,"head",e._head);h(this,"i",this.head);h(this,"kind",t)};i.prototype={isMapIterator:true,next:function next(){if(!this.isMapIterator){throw new TypeError("Not a MapIterator")}var e=this.i;var t=this.kind;var r=this.head;if(typeof this.i==="undefined"){return Ze()}while(e.isRemoved()&&e!==r){e=e.prev}var n;while(e.next!==r){e=e.next;if(!e.isRemoved()){if(t==="key"){n=e.key}else if(t==="value"){n=e.value}else{n=[e.key,e.value]}this.i=e;return Ze(n)}}this.i=void 0;return Ze()}};xe(i.prototype);var a;var u=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}if(this&&this._es6map){throw new TypeError("Bad construction")}var e=_e(this,Map,a,{_es6map:true,_head:null,_map:H?new H:null,_size:0,_storage:tn()});var t=new r(null,null);t.next=t.prev=t;e._head=t;if(arguments.length>0){rn(Map,e,arguments[0])}return e};a=u.prototype;m.getter(a,"size",function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size});b(a,{get:function get(e){o(this,"get");var t;var r=en(e,true);if(r!==null){t=this._storage[r];if(t){return t.value}return}if(this._map){t=B.call(this._map,e);if(t){return t.value}return}var n=this._head;var i=n;while((i=i.next)!==n){if(le.SameValueZero(i.key,e)){return i.value}}},has:function has(e){o(this,"has");var t=en(e,true);if(t!==null){return typeof this._storage[t]!=="undefined"}if(this._map){return U.call(this._map,e)}var r=this._head;var n=r;while((n=n.next)!==r){if(le.SameValueZero(n.key,e)){return true}}return false},set:function set(e,t){o(this,"set");var n=this._head;var i=n;var a;var u=en(e,true);if(u!==null){if(typeof this._storage[u]!=="undefined"){this._storage[u].value=t;return this}a=this._storage[u]=new r(e,t);i=n.prev}else if(this._map){if(U.call(this._map,e)){B.call(this._map,e).value=t}else{a=new r(e,t);$.call(this._map,e,a);i=n.prev}}while((i=i.next)!==n){if(le.SameValueZero(i.key,e)){i.value=t;return this}}a=a||new r(e,t);if(le.SameValue(-0,e)){a.key=+0}a.next=this._head;a.prev=this._head.prev;a.prev.next=a;a.next.prev=a;this._size+=1;return this},"delete":function(t){o(this,"delete");var r=this._head;var n=r;var i=en(t,true);if(i!==null){if(typeof this._storage[i]==="undefined"){return false}n=this._storage[i].prev;delete this._storage[i]}else if(this._map){if(!U.call(this._map,t)){return false}n=B.call(this._map,t).prev;V.call(this._map,t)}while((n=n.next)!==r){if(le.SameValueZero(n.key,t)){n.key=e;n.value=e;n.prev.next=n.next;n.next.prev=n.prev;this._size-=1;return true}}return false},clear:function clear(){o(this,"clear");this._map=H?new H:null;this._size=0;this._storage=tn();var t=this._head;var r=t;var n=r.next;while((r=n)!==t){r.key=e;r.value=e;n=r.next;r.next=r.prev=t}t.next=t.prev=t},keys:function keys(){o(this,"keys");return new i(this,"key")},values:function values(){o(this,"values");return new i(this,"value")},entries:function entries(){o(this,"entries");return new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");var r=arguments.length>1?arguments[1]:null;var n=this.entries();for(var i=n.next();!i.done;i=n.next()){if(r){t(e,r,i.value[1],i.value[0],this)}else{e(i.value[1],i.value[0],this)}}}});xe(a,a.entries);return u}(),Set:function(){var e=function isSet(e){return e._es6set&&typeof e._storage!=="undefined"};var r=function requireSetSlot(t,r){if(!le.TypeIsObject(t)||!e(t)){throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+le.ToString(t))}};var o;var i=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}if(this&&this._es6set){throw new TypeError("Bad construction")}var e=_e(this,Set,o,{_es6set:true,"[[SetData]]":null,_storage:tn()});if(!e._es6set){throw new TypeError("bad set")}if(arguments.length>0){nn(Set,e,arguments[0])}return e};o=i.prototype;var a=function(e){var t=e;if(t==="^null"){return null}else if(t==="^undefined"){return void 0}var r=t.charAt(0);if(r==="$"){return C(t,1)}else if(r==="n"){return+C(t,1)}else if(r==="b"){return t==="btrue"}return+t};var u=function ensureMap(e){if(!e["[[SetData]]"]){var t=new on.Map;e["[[SetData]]"]=t;l(n(e._storage),function(e){var r=a(e);t.set(r,r)});e["[[SetData]]"]=t}e._storage=null};m.getter(i.prototype,"size",function(){r(this,"size");if(this._storage){return n(this._storage).length}u(this);return this["[[SetData]]"].size});b(i.prototype,{has:function has(e){r(this,"has");var t;if(this._storage&&(t=en(e))!==null){return!!this._storage[t]}u(this);return this["[[SetData]]"].has(e)},add:function add(e){r(this,"add");var t;if(this._storage&&(t=en(e))!==null){this._storage[t]=true;return this}u(this);this["[[SetData]]"].set(e,e);return this},"delete":function(e){r(this,"delete");var t;if(this._storage&&(t=en(e))!==null){var n=q(this._storage,t);return delete this._storage[t]&&n}u(this);return this["[[SetData]]"]["delete"](e)},clear:function clear(){r(this,"clear");if(this._storage){this._storage=tn()}if(this["[[SetData]]"]){this["[[SetData]]"].clear()}},values:function values(){r(this,"values");u(this);return new f(this["[[SetData]]"].values())},entries:function entries(){r(this,"entries");u(this);return new f(this["[[SetData]]"].entries())},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null;var o=this;u(o);this["[[SetData]]"].forEach(function(r,i){if(n){t(e,n,i,i,o)}else{e(i,i,o)}})}});h(i.prototype,"keys",i.prototype.values,true);xe(i.prototype,i.prototype.values);var f=function SetIterator(e){h(this,"it",e)};f.prototype={isSetIterator:true,next:function next(){if(!this.isSetIterator){throw new TypeError("Not a SetIterator")}return this.it.next()}};xe(f.prototype);return i}()};var an=S.Set&&!Set.prototype["delete"]&&Set.prototype.remove&&Set.prototype.items&&Set.prototype.map&&Array.isArray((new Set).keys);if(an){S.Set=on.Set}if(S.Map||S.Set){var un=a(function(){return new Map([[1,2]]).get(1)===2});if(!un){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new H;if(arguments.length>0){rn(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,S.Map.prototype);return e};S.Map.prototype=O(H.prototype);h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,H)}var fn=new Map;var sn=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);e.set(-0,e);return e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}();var cn=fn.set(1,2)===fn;if(!sn||!cn){oe(Map.prototype,"set",function set(e,r){t($,this,e===0?0:e,r);return this})}if(!sn){b(Map.prototype,{get:function get(e){return t(B,this,e===0?0:e)},has:function has(e){return t(U,this,e===0?0:e)}},true);m.preserveToString(Map.prototype.get,B);m.preserveToString(Map.prototype.has,U)}var ln=new Set;var pn=Set.prototype["delete"]&&Set.prototype.add&&Set.prototype.has&&function(e){e["delete"](0);e.add(-0);return!e.has(0)}(ln);var vn=ln.add(1)===ln;if(!pn||!vn){var yn=Set.prototype.add;Set.prototype.add=function add(e){t(yn,this,e===0?0:e);return this};m.preserveToString(Set.prototype.add,yn)}if(!pn){var hn=Set.prototype.has;Set.prototype.has=function has(e){return t(hn,this,e===0?0:e)};m.preserveToString(Set.prototype.has,hn);var bn=Set.prototype["delete"];Set.prototype["delete"]=function SetDelete(e){return t(bn,this,e===0?0:e)};m.preserveToString(Set.prototype["delete"],bn)}var gn=w(S.Map,function(e){var t=new e([]);t.set(42,42);return t instanceof e});var dn=Object.setPrototypeOf&&!gn;var mn=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();if(S.Map.length!==0||dn||!mn){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new H;if(arguments.length>0){rn(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Map.prototype);return e};S.Map.prototype=H.prototype;h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,H)}var On=w(S.Set,function(e){var t=new e([]);t.add(42,42);return t instanceof e});var wn=Object.setPrototypeOf&&!On;var jn=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(S.Set.length!==0||wn||!jn){var Sn=S.Set;S.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}var e=new Sn;if(arguments.length>0){nn(Set,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Set.prototype);return e};S.Set.prototype=Sn.prototype;h(S.Set.prototype,"constructor",S.Set,true);m.preserveToString(S.Set,Sn)}var Tn=new S.Map;var In=!a(function(){return Tn.keys().next().done});if(typeof S.Map.prototype.clear!=="function"||(new S.Set).size!==0||Tn.size!==0||typeof S.Map.prototype.keys!=="function"||typeof S.Set.prototype.keys!=="function"||typeof S.Map.prototype.forEach!=="function"||typeof S.Set.prototype.forEach!=="function"||u(S.Map)||u(S.Set)||typeof Tn.keys().next!=="function"||In||!gn){b(S,{Map:on.Map,Set:on.Set},true)}if(S.Set.prototype.keys!==S.Set.prototype.values){h(S.Set.prototype,"keys",S.Set.prototype.values,true)}xe(Object.getPrototypeOf((new S.Map).keys()));xe(Object.getPrototypeOf((new S.Set).keys()));if(c&&S.Set.prototype.has.name!=="has"){var En=S.Set.prototype.has;oe(S.Set.prototype,"has",function has(e){return t(En,this,e)})}}b(S,on);Me(S.Map);Me(S.Set)}var Pn=function throwUnlessTargetIsObject(e){if(!le.TypeIsObject(e)){throw new TypeError("target must be an object")}};var Cn={apply:function apply(){return le.Call(le.Call,null,arguments)},construct:function construct(e,t){if(!le.IsConstructor(e)){throw new TypeError("First argument must be a constructor.")}var r=arguments.length>2?arguments[2]:e;if(!le.IsConstructor(r)){throw new TypeError("new.target must be a constructor.")}return le.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){Pn(e);if(s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable){return false}}return delete e[t]},has:function has(e,t){Pn(e);return t in e}};if(Object.getOwnPropertyNames){Object.assign(Cn,{ownKeys:function ownKeys(e){Pn(e);var t=Object.getOwnPropertyNames(e);if(le.IsCallable(Object.getOwnPropertySymbols)){x(t,Object.getOwnPropertySymbols(e))}return t}})}var Mn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions){Object.assign(Cn,{isExtensible:function isExtensible(e){Pn(e);return Object.isExtensible(e)},preventExtensions:function preventExtensions(e){Pn(e);return Mn(function(){return Object.preventExtensions(e)})}})}if(s){var xn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(o===null){return void 0}return xn(o,t,r)}if("value"in n){return n.value}if(n.get){return le.Call(n.get,r)}return void 0};var Nn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r);if(!i){var a=Object.getPrototypeOf(e);if(a!==null){return Nn(a,r,n,o)}i={value:void 0,writable:true,enumerable:true,configurable:true}}if("value"in i){if(!i.writable){return false}if(!le.TypeIsObject(o)){return false}var u=Object.getOwnPropertyDescriptor(o,r);if(u){return ue.defineProperty(o,r,{value:n})}return ue.defineProperty(o,r,{value:n,writable:true,enumerable:true,configurable:true})}if(i.set){t(i.set,o,n);return true}return false};Object.assign(Cn,{defineProperty:function defineProperty(e,t,r){Pn(e);return Mn(function(){return Object.defineProperty(e,t,r)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){Pn(e);return Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){Pn(e);var r=arguments.length>2?arguments[2]:e;return xn(e,t,r)},set:function set(e,t,r){Pn(e);var n=arguments.length>3?arguments[3]:e;return Nn(e,t,r,n)}})}if(Object.getPrototypeOf){var An=Object.getPrototypeOf;Cn.getPrototypeOf=function getPrototypeOf(e){Pn(e);return An(e)}}if(Object.setPrototypeOf&&Cn.getPrototypeOf){var _n=function(e,t){var r=t;while(r){if(e===r){return true}r=Cn.getPrototypeOf(r)}return false};Object.assign(Cn,{setPrototypeOf:function setPrototypeOf(e,t){Pn(e);if(t!==null&&!le.TypeIsObject(t)){throw new TypeError("proto must be an object or null")}if(t===ue.getPrototypeOf(e)){return true}if(ue.isExtensible&&!ue.isExtensible(e)){return false}if(_n(e,t)){return false}Object.setPrototypeOf(e,t);return true}})}var Rn=function(e,t){if(!le.IsCallable(S.Reflect[e])){h(S.Reflect,e,t)}else{var r=a(function(){S.Reflect[e](1);S.Reflect[e](NaN);S.Reflect[e](true);return true});if(r){oe(S.Reflect,e,t)}}};Object.keys(Cn).forEach(function(e){Rn(e,Cn[e])});var kn=S.Reflect.getPrototypeOf;if(c&&kn&&kn.name!=="getPrototypeOf"){oe(S.Reflect,"getPrototypeOf",function getPrototypeOf(e){return t(kn,S.Reflect,e)})}if(S.Reflect.setPrototypeOf){if(a(function(){S.Reflect.setPrototypeOf(1,{});return true})){oe(S.Reflect,"setPrototypeOf",Cn.setPrototypeOf)}}if(S.Reflect.defineProperty){if(!a(function(){var e=!S.Reflect.defineProperty(1,"test",{value:1});var t=typeof Object.preventExtensions!=="function"||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t})){oe(S.Reflect,"defineProperty",Cn.defineProperty)}}if(S.Reflect.construct){if(!a(function(){var e=function F(){};return S.Reflect.construct(function(){},[],e)instanceof e})){oe(S.Reflect,"construct",Cn.construct)}}if(String(new Date(NaN))!=="Invalid Date"){var Ln=Date.prototype.toString;var Fn=function toString(){var e=+this;if(e!==e){return"Invalid Date"}return le.Call(Ln,this)};oe(Date.prototype,"toString",Fn)}var Dn={anchor:function anchor(e){return le.CreateHTML(this,"a","name",e)},big:function big(){return le.CreateHTML(this,"big","","")},blink:function blink(){return le.CreateHTML(this,"blink","","")},bold:function bold(){return le.CreateHTML(this,"b","","")},fixed:function fixed(){return le.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return le.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return le.CreateHTML(this,"font","size",e)},italics:function italics(){return le.CreateHTML(this,"i","","")},link:function link(e){return le.CreateHTML(this,"a","href",e)},small:function small(){return le.CreateHTML(this,"small","","")},strike:function strike(){return le.CreateHTML(this,"strike","","")},sub:function sub(){return le.CreateHTML(this,"sub","","")},sup:function sub(){return le.CreateHTML(this,"sup","","")}};l(Object.keys(Dn),function(e){var r=String.prototype[e];var n=false;if(le.IsCallable(r)){var o=t(r,"",' " ');var i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else{n=true}if(n){oe(String.prototype,e,Dn[e])}});var zn=function(){if(!ie){return false}var e=typeof JSON==="object"&&typeof JSON.stringify==="function"?JSON.stringify:null;if(!e){return false}if(typeof e(J())!=="undefined"){return true}if(e([J()])!=="[null]"){return true}var t={a:J()};t[J()]=true;if(e(t)!=="{}"){return true}return false}();var qn=a(function(){if(!ie){return true}return JSON.stringify(Object(J()))==="{}"&&JSON.stringify([Object(J())])==="[{}]"});if(zn||!qn){var Wn=JSON.stringify;oe(JSON,"stringify",function stringify(e){if(typeof e==="symbol"){return}var n;if(arguments.length>1){n=arguments[1]}var o=[e];if(!r(n)){var i=le.IsCallable(n)?n:null;var a=function(e,r){var n=i?t(i,this,e,r):r;if(typeof n!=="symbol"){if(ne.symbol(n)){return _t({})(n)}return n}};o.push(a)}else{o.push(n)}if(arguments.length>2){o.push(arguments[2])}return Wn.apply(this,o)})}return S}); +//# sourceMappingURL=es6-shim.map diff --git a/documentation/js/libs/htmlparser.js b/documentation/js/libs/htmlparser.js new file mode 100644 index 0000000000..522b39cae3 --- /dev/null +++ b/documentation/js/libs/htmlparser.js @@ -0,0 +1,23 @@ +/*********************************************** +Copyright 2010 - 2012 Chris Winberry . All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +***********************************************/ +/* v2.0.0 */ + +!function(){function t(t,e){var a=function(){};a.prototype=e.prototype,t.super_=e,t.prototype=new a,t.prototype.constructor=t}function e(t,e){this._options=e||{},this._validateBuilder(t);this._builder=t,this.reset()}function a(t,e){this.reset(),this._options=e||{},void 0===this._options.ignoreWhitespace&&(this._options.ignoreWhitespace=!1),void 0===this._options.includeLocation&&(this._options.includeLocation=!1),void 0===this._options.verbose&&(this._options.verbose=!0),void 0===this._options.enforceEmptyTags&&(this._options.enforceEmptyTags=!0),void 0===this._options.caseSensitiveTags&&(this._options.caseSensitiveTags=!1),void 0===this._options.caseSensitiveAttr&&(this._options.caseSensitiveAttr=!1),"function"==typeof t&&(this._callback=t)}function n(t){n.super_.call(this,t,{ignoreWhitespace:!0,verbose:!1,enforceEmptyTags:!1,caseSensitiveTags:!0})}var i;if("undefined"!=typeof module&&void 0!==module.exports)i=module.exports;else{if(i={},this.Tautologistics||(this.Tautologistics={}),this.Tautologistics.NodeHtmlParser)return;this.Tautologistics.NodeHtmlParser=i}var s={Text:"text",Tag:"tag",Attr:"attr",CData:"cdata",Doctype:"doctype",Comment:"comment"};"undefined"!=typeof module&&void 0!==module.exports&&(t(e,require("stream")),e.prototype.writable=!0,e.prototype.write=function(t){t instanceof Buffer&&(t=t.toString()),this.parseChunk(t)},e.prototype.end=function(t){arguments.length&&this.write(t),this.writable=!1,this.done()},e.prototype.destroy=function(){this.writable=!1}),e.prototype.reset=function(){this._state={mode:s.Text,pos:0,data:null,pendingText:null,pendingWrite:null,lastTag:null,isScript:!1,needData:!1,output:[],done:!1},this._builder.reset()},e.prototype.parseChunk=function(t){for(this._state.needData=!1,this._state.data=null!==this._state.data?this._state.data.substr(this.pos)+t:t;this._state.pos\/]+)(\s*)\??(>?)/g,e.prototype._parseTag=function(){var t=this._state;e.re_parseTag.lastIndex=t.pos;var a=e.re_parseTag.exec(t.data);if(a){if(!a[1]&&"!--"===a[2].substr(0,3))return t.mode=s.Comment,void(t.pos+=3);if(!a[1]&&"![CDATA["===a[2].substr(0,8))return t.mode=s.CData,void(t.pos+=8);if(!a[1]&&"!DOCTYPE"===a[2].substr(0,8))return t.mode=s.Doctype,void(t.pos+=8);if(!t.done&&t.pos+a[0].length===t.data.length)return void(t.needData=!0);var n;">"===a[4]?(t.mode=s.Text,n=a[0].substr(0,a[0].length-1)):(t.mode=s.Attr,n=a[0]),t.pos+=a[0].length;var i={type:s.Tag,name:a[1]+a[2],raw:n};t.mode===s.Attr&&(t.lastTag=i),"script"===i.name.toLowerCase()?t.isScript=!0:"/script"===i.name.toLowerCase()&&(t.isScript=!1),t.mode===s.Attr?this._writePending(i):this._write(i)}else t.needData=!0},e.re_parseAttr_findName=/\s*([^=<>\s'"\/]+)\s*/g,e.prototype._parseAttr_findName=function(){e.re_parseAttr_findName.lastIndex=this._state.pos;var t=e.re_parseAttr_findName.exec(this._state.data);return t?this._state.pos+t[0].length!==e.re_parseAttr_findName.lastIndex?null:{match:t[0],name:t[1]}:null},e.re_parseAttr_findValue=/\s*=\s*(?:'([^']*)'|"([^"]*)"|([^'"\s\/>]+))\s*/g,e.re_parseAttr_findValue_last=/\s*=\s*['"]?(.*)$/g,e.prototype._parseAttr_findValue=function(){var t=this._state;e.re_parseAttr_findValue.lastIndex=t.pos;var a=e.re_parseAttr_findValue.exec(t.data);return a?t.pos+a[0].length!==e.re_parseAttr_findValue.lastIndex?null:{match:a[0],value:a[1]||a[2]||a[3]}:t.done?(e.re_parseAttr_findValue_last.lastIndex=t.pos,a=e.re_parseAttr_findValue_last.exec(t.data),a?{match:a[0],value:""!==a[1]?a[1]:null}:null):null},e.re_parseAttr_splitValue=/\s*=\s*['"]?/g,e.re_parseAttr_selfClose=/(\s*\/\s*)(>?)/g,e.prototype._parseAttr=function(){var t=this._state,a=this._parseAttr_findName(t);if(a&&"?"!==a.name){if(!t.done&&t.pos+a.match.length===t.data.length)return t.needData=!0,null;t.pos+=a.match.length;var n=this._parseAttr_findValue(t);t.data.indexOf(" ",t.pos);if(n){if(!t.done&&t.pos+n.match.length===t.data.length)return t.needData=!0,void(t.pos-=a.match.length);t.pos+=n.match.length}else if(t.data.indexOf(" ",t.pos-1))n={match:"",value:a.name};else{if(e.re_parseAttr_splitValue.lastIndex=t.pos,e.re_parseAttr_splitValue.exec(t.data))return t.needData=!0,void(t.pos-=a.match.length);n={match:"",value:null}}t.lastTag.raw+=a.match+n.match,this._writePending({type:s.Attr,name:a.name,data:n.value})}else{e.re_parseAttr_selfClose.lastIndex=t.pos;var i=e.re_parseAttr_selfClose.exec(t.data);if(i&&i.index===t.pos){if(!t.done&&!i[2]&&t.pos+i[0].length===t.data.length)return void(t.needData=!0);t.lastTag.raw+=i[1],this._write({type:s.Tag,name:"/"+t.lastTag.name,raw:null}),t.pos+=i[1].length}var r=t.data.indexOf(">",t.pos);if(r<0){if(t.done)return t.lastTag.raw+=t.data.substr(t.pos),void(t.pos=t.data.length);t.needData=!0}else t.pos=r+1,t.mode=s.Text}},e.re_parseCData_findEnding=/\]{1,2}$/,e.prototype._parseCData=function(){var t=this._state,a=t.data.indexOf("]]>",t.pos);if(a<0&&t.done&&(a=t.data.length),a<0){if(e.re_parseCData_findEnding.lastIndex=t.pos,e.re_parseCData_findEnding.exec(t.data))return void(t.needData=!0);t.pendingText||(t.pendingText=[]),t.pendingText.push(t.data.substr(t.pos,t.data.length)),t.pos=t.data.length,t.needData=!0}else{var n;t.pendingText?(t.pendingText.push(t.data.substring(t.pos,a)),n=t.pendingText.join(""),t.pendingText=null):n=t.data.substring(t.pos,a),this._write({type:s.CData,data:n}),t.mode=s.Text,t.pos=a+3}},e.prototype._parseDoctype=function(){var t=this._state,a=t.data.indexOf(">",t.pos);if(a<0&&t.done&&(a=t.data.length),a<0)e.re_parseCData_findEnding.lastIndex=t.pos,t.pendingText||(t.pendingText=[]),t.pendingText.push(t.data.substr(t.pos,t.data.length)),t.pos=t.data.length,t.needData=!0;else{var n;t.pendingText?(t.pendingText.push(t.data.substring(t.pos,a)),n=t.pendingText.join(""),t.pendingText=null):n=t.data.substring(t.pos,a),this._write({type:s.Doctype,data:n}),t.mode=s.Text,t.pos=a+1}},e.re_parseComment_findEnding=/\-{1,2}$/,e.prototype._parseComment=function(){var t=this._state,a=t.data.indexOf("--\x3e",t.pos);if(a<0&&t.done&&(a=t.data.length),a<0){if(e.re_parseComment_findEnding.lastIndex=t.pos,e.re_parseComment_findEnding.exec(t.data))return void(t.needData=!0);t.pendingText||(t.pendingText=[]),t.pendingText.push(t.data.substr(t.pos,t.data.length)),t.pos=t.data.length,t.needData=!0}else{var n;t.pendingText?(t.pendingText.push(t.data.substring(t.pos,a)),n=t.pendingText.join(""),t.pendingText=null):n=t.data.substring(t.pos,a),this._write({type:s.Comment,data:n}),t.mode=s.Text,t.pos=a+3}},a._emptyTags={area:1,base:1,basefont:1,br:1,col:1,frame:1,hr:1,img:1,input:1,isindex:1,link:1,meta:1,param:1,embed:1,"?xml":1},a.reWhitespace=/^\s*$/,a.prototype.dom=null,a.prototype.reset=function(){this.dom=[],this._done=!1,this._tagStack=[],this._lastTag=null,this._tagStack.last=function(){return this.length?this[this.length-1]:null},this._line=1,this._col=1},a.prototype.done=function(){this._done=!0,this.handleCallback(null)},a.prototype.error=function(t){this.handleCallback(t)},a.prototype.handleCallback=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},a.prototype.isEmptyTag=function(t){var e=t.name.toLowerCase();return"?"==e.charAt(0)||("/"==e.charAt(0)&&(e=e.substring(1)),this._options.enforceEmptyTags&&!!a._emptyTags[e])},a.prototype._getLocation=function(){return{line:this._line,col:this._col}},a.prototype._updateLocation=function(t){var e=t.type===s.Tag?t.raw:t.data;if(null!==e){var a=e.split("\n");this._line+=a.length-1,a.length>1&&(this._col=1),this._col+=a[a.length-1].length,t.type===s.Tag?this._col+=2:t.type===s.Comment?this._col+=7:t.type===s.CData&&(this._col+=12)}},a.prototype._copyElement=function(t){var e={type:t.type};if(this._options.verbose&&void 0!==t.raw&&(e.raw=t.raw),void 0!==t.name)switch(t.type){case s.Tag:e.name=this._options.caseSensitiveTags?t.name:t.name.toLowerCase();break;case s.Attr:e.name=this._options.caseSensitiveAttr?t.name:t.name.toLowerCase();break;default:e.name=this._options.caseSensitiveTags?t.name:t.name.toLowerCase()}return void 0!==t.data&&(e.data=t.data),t.location&&(e.location={line:t.location.line,col:t.location.col}),e},a.prototype.write=function(t){if(this._done&&this.handleCallback(new Error("Writing to the builder after done() called is not allowed without a reset()")),this._options.includeLocation&&t.type!==s.Attr&&(t.location=this._getLocation(),this._updateLocation(t)),t.type!==s.Text||!this._options.ignoreWhitespace||!a.reWhitespace.test(t.data)){var e,n;if(this._tagStack.last())if(t.type===s.Tag)if("/"==t.name.charAt(0)){var i=this._options.caseSensitiveTags?t.name.substring(1):t.name.substring(1).toLowerCase();if(!this.isEmptyTag(t)){for(var r=this._tagStack.length-1;r>-1&&this._tagStack[r--].name!=i;);if(r>-1||this._tagStack[0].name==i)for(;r=0&&s.length>=n)return s;if(a&&e.children)i=e.children;else{if(!(e instanceof Array))return s;i=e}for(var d=0;d=0&&s.length>=n));d++);return s},getElementById:function(t,e,a){var n=r.getElements({id:t},e,a,1);return n.length?n[0]:null},getElementsByTagName:function(t,e,a,n){return r.getElements({tag_name:t},e,a,n)},getElementsByTagType:function(t,e,a,n){return r.getElements({tag_type:t},e,a,n)}};i.Parser=e,i.HtmlBuilder=a,i.RssBuilder=n,i.ElementType=s,i.DomUtils=r}(); diff --git a/documentation/js/libs/innersvg.js b/documentation/js/libs/innersvg.js new file mode 100644 index 0000000000..b1099deb2a --- /dev/null +++ b/documentation/js/libs/innersvg.js @@ -0,0 +1,9 @@ +/** + * innerHTML property for SVGElement + * Copyright(c) 2010, Jeff Schiller + * + * Licensed under the Apache License, Version 2 + * + * Minor modifications by Chris Price to only polyfill when required. + */ +!function(e){if(e&&!("innerHTML"in e.prototype)){var t=function(e,r){var i=e.nodeType;if(3==i)r.push(e.textContent.replace(/&/,"&").replace(/",">"));else if(1==i){if(r.push("<",e.tagName),e.hasAttributes())for(var n=e.attributes,s=0,o=n.length;s");for(var h=e.childNodes,s=0,o=h.length;s")}else r.push("/>")}else{if(8!=i)throw"Error serializing XML. Unhandled node of type: "+i;r.push("\x3c!--",e.nodeValue,"--\x3e")}};Object.defineProperty(e.prototype,"innerHTML",{get:function(){for(var e=[],r=this.firstChild;r;)t(r,e),r=r.nextSibling;return e.join("")},set:function(e){for(;this.firstChild;)this.removeChild(this.firstChild);try{var t=new DOMParser;t.async=!1,sXML=""+e+"";for(var r=t.parseFromString(sXML,"text/xml").documentElement.firstChild;r;)this.appendChild(this.ownerDocument.importNode(r,!0)),r=r.nextSibling}catch(e){throw new Error("Error parsing XML string")}}})}}((0,eval)("this").SVGElement); \ No newline at end of file diff --git a/documentation/js/libs/lit-html.js b/documentation/js/libs/lit-html.js new file mode 100644 index 0000000000..743deea173 --- /dev/null +++ b/documentation/js/libs/lit-html.js @@ -0,0 +1 @@ +"use strict";function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _get(target,property,receiver){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(receiver)}return desc.value}}return _get(target,property,receiver||target)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var n=e;for(;n!==s;){var _e=n.nextSibling;t.insertBefore(n,i),n=_e}},o=function o(t,e){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=e;for(;i!==s;){var _e2=i.nextSibling;t.removeChild(i),i=_e2}},r={},a={},l="{{lit-".concat(String(Math.random()).slice(2),"}}"),h="\x3c!--".concat(l,"--\x3e"),d=new RegExp("".concat(l,"|").concat(h)),c="$lit$";var u=function u(t,e){var _this=this;_classCallCheck(this,u);this.parts=[],this.element=e;var s=-1,i=0;var n=[],o=function o(e){var r=e.content,a=document.createTreeWalker(r,133,null,!1);var h=0;for(;a.nextNode();){s++;var _e3=a.currentNode;if(1===_e3.nodeType){if(_e3.hasAttributes()){var _n=_e3.attributes;var _o=0;for(var _t=0;_t<_n.length;_t++){_n[_t].value.indexOf(l)>=0&&_o++}for(;_o-- >0;){var _n2=t.strings[i],_o2=g.exec(_n2)[2],_r=_o2.toLowerCase()+c,_a=_e3.getAttribute(_r).split(d);_this.parts.push({type:"attribute",index:s,name:_o2,strings:_a}),_e3.removeAttribute(_r),i+=_a.length-1}}"TEMPLATE"===_e3.tagName&&o(_e3)}else if(3===_e3.nodeType){var _t2=_e3.data;if(_t2.indexOf(l)>=0){var _o3=_e3.parentNode,_r2=_t2.split(d),_a2=_r2.length-1;for(var _t3=0;_t3<_a2;_t3++){_o3.insertBefore(""===_r2[_t3]?m():document.createTextNode(_r2[_t3]),_e3),_this.parts.push({type:"node",index:++s})}""===_r2[_a2]?(_o3.insertBefore(m(),_e3),n.push(_e3)):_e3.data=_r2[_a2],i+=_a2}}else if(8===_e3.nodeType)if(_e3.data===l){var _t4=_e3.parentNode;null!==_e3.previousSibling&&s!==h||(s++,_t4.insertBefore(m(),_e3)),h=s,_this.parts.push({type:"node",index:s}),null===_e3.nextSibling?_e3.data="":(n.push(_e3),s--),i++}else{var _t5=-1;for(;-1!==(_t5=_e3.data.indexOf(l,_t5+1));){_this.parts.push({type:"node",index:-1})}}}};o(e);for(var _i=0;_i=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var v=function(){function v(t,e,s){_classCallCheck(this,v);this._parts=[],this.template=t,this.processor=e,this.options=s}_createClass(v,[{key:"update",value:function update(t){var e=0;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=this._parts[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _s=_step.value;void 0!==_s&&_s.setValue(t[e]),e++}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=this._parts[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var _t7=_step2.value;void 0!==_t7&&_t7.commit()}}catch(err){_didIteratorError2=true;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return!=null){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}}},{key:"_clone",value:function _clone(){var _this2=this;var t=i?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=this.template.parts;var s=0,n=0;var o=function o(t){var i=document.createTreeWalker(t,133,null,!1);var r=i.nextNode();for(;s".concat(_get(_getPrototypeOf(x.prototype),"getHTML",this).call(this),"")}},{key:"getTemplateElement",value:function getTemplateElement(){var t=_get(_getPrototypeOf(x.prototype),"getTemplateElement",this).call(this),e=t.content,s=e.firstChild;return e.removeChild(s),n(e,s.firstChild),t}}]);return x}(f);var _=function _(t){return null===t||!("object"==_typeof(t)||"function"==typeof t)};var y=function(){function y(t,e,s){_classCallCheck(this,y);this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(var _t11=0;_t110&&arguments[0]!==undefined?arguments[0]:this.startNode;o(this.startNode.parentNode,t.nextSibling,this.endNode)}}]);return V}();var b=function(){function b(t,e,s){_classCallCheck(this,b);if(this.value=void 0,this._pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}_createClass(b,[{key:"setValue",value:function setValue(t){this._pendingValue=t}},{key:"commit",value:function commit(){for(;s(this._pendingValue);){var _t15=this._pendingValue;this._pendingValue=r,_t15(this)}if(this._pendingValue===r)return;var t=!!this._pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=t,this._pendingValue=r}}]);return b}();var w=function(_y){_inherits(w,_y);function w(t,e,s){var _this3;_classCallCheck(this,w);_this3=_possibleConstructorReturn(this,_getPrototypeOf(w).call(this,t,e,s)),_this3.single=2===s.length&&""===s[0]&&""===s[1];return _this3}_createClass(w,[{key:"_createPart",value:function _createPart(){return new T(this)}},{key:"_getValue",value:function _getValue(){return this.single?this.parts[0].value:_get(_getPrototypeOf(w.prototype),"_getValue",this).call(this)}},{key:"commit",value:function commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]);return w}(y);var T=function(_N){_inherits(T,_N);function T(){_classCallCheck(this,T);return _possibleConstructorReturn(this,_getPrototypeOf(T).apply(this,arguments))}return T}(N);var E=!1;try{var _t16={get capture(){return E=!0,!1}};window.addEventListener("test",_t16,_t16),window.removeEventListener("test",_t16,_t16)}catch(t){}var A=function(){function A(t,e,s){var _this4=this;_classCallCheck(this,A);this.value=void 0,this._pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this._boundHandleEvent=function(t){return _this4.handleEvent(t)}}_createClass(A,[{key:"setValue",value:function setValue(t){this._pendingValue=t}},{key:"commit",value:function commit(){for(;s(this._pendingValue);){var _t17=this._pendingValue;this._pendingValue=r,_t17(this)}if(this._pendingValue===r)return;var t=this._pendingValue,e=this.value,i=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),n=null!=t&&(null==e||i);i&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),n&&(this._options=P(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=r}},{key:"handleEvent",value:function handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}]);return A}();var P=function P(t){return t&&(E?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)};var S=function(){function S(){_classCallCheck(this,S)}_createClass(S,[{key:"handleAttributeExpressions",value:function handleAttributeExpressions(t,e,s,i){var n=e[0];if("."===n){return new w(t,e.slice(1),s).parts}return"@"===n?[new A(t,e.slice(1),i.eventContext)]:"?"===n?[new b(t,e.slice(1),s)]:new y(t,e,s).parts}},{key:"handleTextExpression",value:function handleTextExpression(t){return new V(t)}}]);return S}();var C=new S;function M(t){var e=L.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},L.set(t.type,e));var s=e.stringsArray.get(t.strings);if(void 0!==s)return s;var i=t.strings.join(l);return void 0===(s=e.keyString.get(i))&&(s=new u(t,t.getTemplateElement()),e.keyString.set(i,s)),e.stringsArray.set(t.strings,s),s}var L=new Map,k=new WeakMap;(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");t.html=function(t){for(var _len=arguments.length,e=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){e[_key-1]=arguments[_key]}return new f(t,e,"html",C)},t.svg=function(t){for(var _len2=arguments.length,e=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){e[_key2-1]=arguments[_key2]}return new x(t,e,"svg",C)},t.DefaultTemplateProcessor=S,t.defaultTemplateProcessor=C,t.directive=function(t){return function(){var i=t.apply(void 0,arguments);return e.set(i,!0),i}},t.isDirective=s,t.removeNodes=o,t.reparentNodes=n,t.noChange=r,t.nothing=a,t.AttributeCommitter=y,t.AttributePart=N,t.BooleanAttributePart=b,t.EventPart=A,t.isPrimitive=_,t.NodePart=V,t.PropertyCommitter=w,t.PropertyPart=T,t.parts=k,t.render=function(t,e,s){var i=k.get(e);void 0===i&&(o(e,e.firstChild),k.set(e,i=new V(Object.assign({templateFactory:M},s))),i.appendInto(e)),i.setValue(t),i.commit()},t.templateCaches=L,t.templateFactory=M,t.TemplateInstance=v,t.SVGTemplateResult=x,t.TemplateResult=f,t.createMarker=m,t.isTemplatePartActive=p,t.Template=u,Object.defineProperty(t,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/documentation/js/libs/prism.js b/documentation/js/libs/prism.js new file mode 100644 index 0000000000..92675911ce --- /dev/null +++ b/documentation/js/libs/prism.js @@ -0,0 +1,46 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html?#themes=prism&languages=markup+css+clike+javascript+apacheconf+aspnet+bash+c+csharp+cpp+coffeescript+dart+docker+elm+git+go+graphql+handlebars+haskell+http+ignore+java+json+kotlin+less+markdown+markup-templating+nginx+php+powershell+ruby+rust+sass+scss+sql+swift+typescript+wasm+yaml&plugins=line-highlight+line-numbers+toolbar+copy-to-clipboard */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; +Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; +!function(e){function n(e,n){return e.replace(/<<(\d+)>>/g,(function(e,s){return"(?:"+n[+s]+")"}))}function s(e,s,a){return RegExp(n(e,s),a||"")}function a(e,n){for(var s=0;s>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var t="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(t+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(t+" "+r+" "+o),g=a("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=a("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=n("<<0>>(?:\\s*<<1>>)?",[h,g]),m=n("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=n("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=n("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k]),v=n("\\(<<0>>+(?:,<<0>>+)+\\)",[w]),x=n("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[v,m,k]),$={keyword:p,punctuation:/[<>()?,.:[\]]/},_="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",B='"(?:\\\\.|[^\\\\"\r\n])*"';e.languages.csharp=e.languages.extend("clike",{string:[{pattern:s("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:s("(^|[^@$\\\\])<<0>>",[B]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:s("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,x]),lookbehind:!0,inside:$},{pattern:s("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:s("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:$},{pattern:s("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:$},{pattern:s("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:s("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:$},{pattern:s("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[x,u,h]),inside:$}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:s("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:s("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:s("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:$},"return-type":{pattern:s("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[x,m]),inside:$,alias:"class-name"},"constructor-invocation":{pattern:s("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[x]),lookbehind:!0,inside:$,alias:"class-name"},"generic-method":{pattern:s("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:s("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:$}}},"type-list":{pattern:s("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,x,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:s("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:p,"class-name":{pattern:RegExp(x),greedy:!0,inside:$},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var E=B+"|"+_,R=n("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[E]),z=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),S="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",j=n("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,z]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:s("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[S,j]),lookbehind:!0,greedy:!0,inside:{target:{pattern:s("^<<0>>(?=\\s*:)",[S]),alias:"keyword"},"attribute-arguments":{pattern:s("\\(<<0>>*\\)",[z]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var A=":[^}\r\n]+",F=a(n("[^\"'/()]|<<0>>|\\(<>*\\)",[R]),2),P=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[F,A]),U=a(n("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[E]),2),Z=n("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[U,A]);function q(n,a){return{interpolation:{pattern:s("((?:^|[^{])(?:\\{\\{)*)<<0>>",[n]),lookbehind:!0,inside:{"format-string":{pattern:s("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[a,A]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:s('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[P]),lookbehind:!0,greedy:!0,inside:q(P,F)},{pattern:s('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[Z]),lookbehind:!0,greedy:!0,inside:q(Z,U)}],char:{pattern:RegExp(_),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism); +Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:Prism.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,Prism.languages.insertBefore("inside","punctuation",{directive:Prism.languages.aspnet.directive},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp-script":{pattern:/(]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:Prism.languages.csharp||{}}}); +!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean; +!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); +!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(Prism); +!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[s,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); +!function(e){var n="(?:[ \t]+(?![ \t])(?:)?|)".replace(//g,(function(){return"\\\\[\r\n](?:\\s|\\\\[\r\n]|#.*(?!.))*(?![\\s#]|\\\\[\r\n])"})),r="\"(?:[^\"\\\\\r\n]|\\\\(?:\r\n|[^]))*\"|'(?:[^'\\\\\r\n]|\\\\(?:\r\n|[^]))*'",t="--[\\w-]+=(?:|(?![\"'])(?:[^\\s\\\\]|\\\\.)+)".replace(//g,(function(){return r})),o={pattern:RegExp(r),greedy:!0},i={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(e,r){return e=e.replace(//g,(function(){return t})).replace(//g,(function(){return n})),RegExp(e,r)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a("(^(?:ONBUILD)?\\w+)(?:)*","i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a("(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\\b","i"),lookbehind:!0,greedy:!0},{pattern:a("(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\\\]+)AS","i"),lookbehind:!0,greedy:!0},{pattern:a("(^ONBUILD)\\w+","i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:i,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:i},e.languages.dockerfile=e.languages.docker}(Prism); +Prism.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; +Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}; +Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]; +Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(n){if("graphql"===n.language)for(var t=n.tokens.filter((function(n){return"string"!=typeof n&&"comment"!==n.type&&"scalar"!==n.type})),e=0;e0)){var s=f(/^\{$/,/^\}$/);if(-1===s)continue;for(var u=e;u=0&&b(p,"variable-input")}}}}function l(n){return t[e+n]}function c(n,t){t=t||0;for(var e=0;e=o.length);u++){var g=i[u];if("string"==typeof g||g.content&&"string"==typeof g.content){var l=o[r],s=t.tokenStack[l],f="string"==typeof g?g:g.content,p=n(a,l),k=f.indexOf(p);if(k>-1){++r;var m=f.substring(0,k),d=new e.Token(a,e.tokenize(s,t.grammar),"language-"+a,s),h=f.substring(k+p.length),v=[];m&&v.push.apply(v,c([m])),v.push(d),h&&v.push.apply(v,c([h])),"string"==typeof g?i.splice.apply(i,[u,1].concat(v)):g.content=v}}else g.content&&c(g.content)}return i}(t.tokens)}}}})}(Prism); +!function(a){a.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},a.hooks.add("before-tokenize",(function(e){a.languages["markup-templating"].buildPlaceholders(e,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),a.hooks.add("after-tokenize",(function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"handlebars")})),a.languages.hbs=a.languages.handlebars,a.languages.mustache=a.languages.handlebars}(Prism); +Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import|qualified)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},Prism.languages.hs=Prism.languages.haskell; +!function(t){function a(t){return RegExp("(^(?:"+t+"):[ \t]*(?![ \t]))[^]+","i")}t.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:a("Content-Security-Policy"),lookbehind:!0,alias:["csp","languages-csp"],inside:t.languages.csp},{pattern:a("Public-Key-Pins(?:-Report-Only)?"),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:t.languages.hpkp},{pattern:a("Strict-Transport-Security"),lookbehind:!0,alias:["hsts","languages-hsts"],inside:t.languages.hsts},{pattern:a("[^:]+"),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var e,n=t.languages,s={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css,"text/plain":n.plain},i={"application/json":!0,"application/xml":!0};function r(t){var a=t.replace(/^[a-z]+\//,"");return"(?:"+t+"|\\w+/(?:[\\w.-]+\\+)+"+a+"(?![+\\w.-]))"}for(var p in s)if(s[p]){e=e||{};var l=i[p]?r(p):p;e[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+l+"(?:(?:\r\n?|\n)[\\w-].*)*(?:\r(?:\n|(?!\n))|\n))[^ \t\\w-][^]*","i"),lookbehind:!0,inside:s[p]}}e&&t.languages.insertBefore("http","header",e)}(Prism); +!function(n){n.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},n.languages.gitignore=n.languages.ignore,n.languages.hgignore=n.languages.ignore,n.languages.npmignore=n.languages.ignore}(Prism); +!function(e){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t="(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp("(^|[^\\w.])"+t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp("(^|[^\\w.])"+t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)"),lookbehind:!0,inside:s.inside},{pattern:RegExp("(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)"+t+"[A-Z]\\w*\\b"),lookbehind:!0,inside:s.inside}],keyword:n,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp("(\\bimport\\s+)"+t+"(?:[A-Z]\\w*|\\*)(?=\\s*;)"),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp("(\\bimport\\s+static\\s+)"+t+"(?:\\w+|\\*)(?=\\s*;)"),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,(function(){return n.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism); +Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; +!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism); +Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}); +!function(n){function e(n){return n=n.replace(//g,(function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?![\r\n]))"})),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var t="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",a="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,(function(){return t})),i="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(t),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(t),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:e("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:e("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:e("(~~?)(?:(?!~))+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:e('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(t){e!==t&&(n.languages.markdown[e].inside.content.inside[t]=n.languages.markdown[t])}))})),n.hooks.add("after-tokenize",(function(n){"markdown"!==n.language&&"md"!==n.language||function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t",quot:'"'},l=String.fromCodePoint||String.fromCharCode;n.languages.md=n.languages.markdown}(Prism); +!function(e){var n=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;e.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:n}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:n}},punctuation:/[{};]/}}(Prism); +!function(e){var a=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:a,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:a,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(a){/<\?/.test(a.code)&&e.languages["markup-templating"].buildPlaceholders(a,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")}))}(Prism); +!function(e){var i=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};i.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:i},boolean:i.boolean,variable:i.variable}}(Prism); +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var t="(?:"+["([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)","\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]","<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>"].join("|")+")",i='(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)';e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp("%r"+t+"[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+i),lookbehind:!0,greedy:!0},{pattern:RegExp("([\r\n{(,][ \t]*)"+i+"(?=:(?!:))"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+t),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp("%x"+t),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism); +!function(e){for(var a="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|)*\\*/",t=0;t<2;t++)a=a.replace(//g,(function(){return a}));a=a.replace(//g,(function(){return"[^\\s\\S]"})),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); +!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var r=/\$[-\w]+|#\{\$[-\w]+\}/,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:r,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:r,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(Prism); +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; +Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})); +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); +Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}; +!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,(function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"})),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<>/g,(function(){return t})).replace(/<>/g,(function(){return e}));return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,(function(){return t}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,(function(){return t})).replace(/<>/g,(function(){return"(?:"+a+"|"+d+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism); +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var e,t="line-numbers",i="linkable-line-numbers",n=/\n(?!$)/g,r=!0;Prism.plugins.lineHighlight={highlightLines:function(o,u,c){var h=(u="string"==typeof u?u:o.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+o.getAttribute("data-line-offset")||0,f=(function(){if(void 0===e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding="0",t.style.border="0",t.innerHTML=" 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}()?parseInt:parseFloat)(getComputedStyle(o).lineHeight),p=Prism.util.isActive(o,t),g=o.querySelector("code"),m=p?o:g||o,v=[],y=g.textContent.match(n),b=y?y.length+1:1,A=g&&m!=g?function(e,t){var i=getComputedStyle(e),n=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(n.borderTopWidth)+r(n.paddingTop)-r(i.paddingTop)}(o,g):0;h.forEach((function(e){var t=e.split("-"),i=+t[0],n=+t[1]||i;if(!((n=Math.min(b+d,n))i&&r.setAttribute("data-end",String(n)),r.style.top=(i-d-1)*f+A+"px",r.textContent=new Array(n-i+2).join(" \n")}));v.push((function(){r.style.width=o.scrollWidth+"px"})),v.push((function(){m.appendChild(r)}))}}));var P=o.id;if(p&&Prism.util.isActive(o,i)&&P){l(o,i)||v.push((function(){o.classList.add(i)}));var E=parseInt(o.getAttribute("data-start")||"1");s(".line-numbers-rows > span",o).forEach((function(e,t){var i=t+E;e.onclick=function(){var e=P+"."+i;r=!1,location.hash=e,setTimeout((function(){r=!0}),1)}}))}return function(){v.forEach(a)}}};var o=0;Prism.hooks.add("before-sanity-check",(function(e){var t=e.element.parentElement;if(u(t)){var i=0;s(".line-highlight",t).forEach((function(e){i+=e.textContent.length,e.parentNode.removeChild(e)})),i&&/^(?: \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}})),Prism.hooks.add("complete",(function e(i){var n=i.element.parentElement;if(u(n)){clearTimeout(o);var r=Prism.plugins.lineNumbers,s=i.plugins&&i.plugins.lineNumbers;l(n,t)&&r&&!s?Prism.hooks.add("line-numbers",e):(Prism.plugins.lineHighlight.highlightLines(n)(),o=setTimeout(c,1))}})),window.addEventListener("hashchange",c),window.addEventListener("resize",(function(){s("pre").filter(u).map((function(e){return Prism.plugins.lineHighlight.highlightLines(e)})).forEach(a)}))}function s(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function l(e,t){return e.classList.contains(t)}function a(e){e()}function u(e){return!!(e&&/pre/i.test(e.nodeName)&&(e.hasAttribute("data-line")||e.id&&Prism.util.isActive(e,i)))}function c(){var e=location.hash.slice(1);s(".temporary.line-highlight").forEach((function(e){e.parentNode.removeChild(e)}));var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var i=e.slice(0,e.lastIndexOf(".")),n=document.getElementById(i);n&&(n.hasAttribute("data-line")||n.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(n,t,"temporary ")(),r&&document.querySelector(".temporary.line-highlight").scrollIntoView())}}}(); +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);ts&&(t=s);var l=t-r;return i.children[l]}}},resize:function(e){r([e])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(t){if(t.code){var i=t.element,s=i.parentNode;if(s&&/pre/i.test(s.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,e)){i.classList.remove(e),s.classList.add(e);var l,o=t.code.match(n),a=o?o.length+1:1,u=new Array(a+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),t.element.appendChild(l),r([s]),Prism.hooks.run("line-numbers",t)}}})),Prism.hooks.add("line-numbers",(function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}function r(e){if(0!=(e=e.filter((function(e){var n,t=(n=e,n?window.getComputedStyle?getComputedStyle(n):n.currentStyle||null:null)["white-space"];return"pre-wrap"===t||"pre-line"===t}))).length){var t=e.map((function(e){var t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i){var r=e.querySelector(".line-numbers-sizer"),s=t.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",t.appendChild(r)),r.innerHTML="0",r.style.display="block";var l=r.getBoundingClientRect().height;return r.innerHTML="",{element:e,lines:s,lineHeights:[],oneLinerHeight:l,sizer:r}}})).filter(Boolean);t.forEach((function(e){var n=e.sizer,t=e.lines,i=e.lineHeights,r=e.oneLinerHeight;i[t.length-1]=void 0,t.forEach((function(e,t){if(e&&e.length>1){var s=n.appendChild(document.createElement("span"));s.style.display="block",s.textContent=e}else i[t]=r}))})),t.forEach((function(e){for(var n=e.sizer,t=e.lineHeights,i=0,r=0;r + * Licensed under the New BSD License. + * https://github.com/stackp/promisejs + */ +(function(a){function b(){this._callbacks=[];}b.prototype.then=function(a,c){var d;if(this._isdone)d=a.apply(c,this.result);else{d=new b();this._callbacks.push(function(){var b=a.apply(c,arguments);if(b&&typeof b.then==='function')b.then(d.done,d);});}return d;};b.prototype.done=function(){this.result=arguments;this._isdone=true;for(var a=0;a=300)&&j.status!==304);h.done(a,j.responseText,j);}};j.send(k);return h;}function h(a){return function(b,c,d){return g(a,b,c,d);};}var i={Promise:b,join:c,chain:d,ajax:g,get:h('GET'),post:h('POST'),put:h('PUT'),del:h('DELETE'),ENOXHR:1,ETIMEOUT:2,ajaxTimeout:0};if(typeof define==='function'&&define.amd)define(function(){return i;});else a.promise=i;})(this); \ No newline at end of file diff --git a/documentation/js/libs/svg-pan-zoom.min.js b/documentation/js/libs/svg-pan-zoom.min.js new file mode 100644 index 0000000000..4904d12d3f --- /dev/null +++ b/documentation/js/libs/svg-pan-zoom.min.js @@ -0,0 +1,3 @@ +// svg-pan-zoom v3.6.1 +// https://github.com/ariutta/svg-pan-zoom +!function s(r,a,l){function u(e,t){if(!a[e]){if(!r[e]){var o="function"==typeof require&&require;if(!t&&o)return o(e,!0);if(h)return h(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[e]={exports:{}};r[e][0].call(i.exports,function(t){return u(r[e][1][t]||t)},i,i.exports,s,r,a,l)}return a[e].exports}for(var h="function"==typeof require&&require,t=0;tthis.options.maxZoom*n.zoom&&(t=this.options.maxZoom*n.zoom/this.getZoom());var i=this.viewport.getCTM(),s=e.matrixTransform(i.inverse()),r=this.svg.createSVGMatrix().translate(s.x,s.y).scale(t).translate(-s.x,-s.y),a=i.multiply(r);a.a!==i.a&&this.viewport.setCTM(a)},i.prototype.zoom=function(t,e){this.zoomAtPoint(t,a.getSvgCenterPoint(this.svg,this.width,this.height),e)},i.prototype.publicZoom=function(t,e){e&&(t=this.computeFromRelativeZoom(t)),this.zoom(t,e)},i.prototype.publicZoomAtPoint=function(t,e,o){if(o&&(t=this.computeFromRelativeZoom(t)),"SVGPoint"!==r.getType(e)){if(!("x"in e&&"y"in e))throw new Error("Given point is invalid");e=a.createSVGPoint(this.svg,e.x,e.y)}this.zoomAtPoint(t,e,o)},i.prototype.getZoom=function(){return this.viewport.getZoom()},i.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},i.prototype.computeFromRelativeZoom=function(t){return t*this.viewport.getOriginalState().zoom},i.prototype.resetZoom=function(){var t=this.viewport.getOriginalState();this.zoom(t.zoom,!0)},i.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},i.prototype.reset=function(){this.resetZoom(),this.resetPan()},i.prototype.handleDblClick=function(t){var e;if((this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.options.controlIconsEnabled)&&-1<(t.target.getAttribute("class")||"").indexOf("svg-pan-zoom-control"))return!1;e=t.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var o=a.getEventPoint(t,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(e,o)},i.prototype.handleMouseDown=function(t,e){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),r.mouseAndTouchNormalize(t,this.svg),this.options.dblClickZoomEnabled&&r.isDblClick(t,e)?this.handleDblClick(t):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=a.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()))},i.prototype.handleMouseMove=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var e=a.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()),o=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(o)}},i.prototype.handleMouseUp=function(t){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&(this.state="none")},i.prototype.fit=function(){var t=this.viewport.getViewBox(),e=Math.min(this.width/t.width,this.height/t.height);this.zoom(e,!0)},i.prototype.contain=function(){var t=this.viewport.getViewBox(),e=Math.max(this.width/t.width,this.height/t.height);this.zoom(e,!0)},i.prototype.center=function(){var t=this.viewport.getViewBox(),e=.5*(this.width-(t.width+2*t.x)*this.getZoom()),o=.5*(this.height-(t.height+2*t.y)*this.getZoom());this.getPublicInstance().pan({x:e,y:o})},i.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},i.prototype.pan=function(t){var e=this.viewport.getCTM();e.e=t.x,e.f=t.y,this.viewport.setCTM(e)},i.prototype.panBy=function(t){var e=this.viewport.getCTM();e.e+=t.x,e.f+=t.y,this.viewport.setCTM(e)},i.prototype.getPan=function(){var t=this.viewport.getState();return{x:t.x,y:t.y}},i.prototype.resize=function(){var t=a.getBoundingClientRectNormalized(this.svg);this.width=t.width,this.height=t.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},i.prototype.destroy=function(){var e=this;for(var t in this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,(this.onUpdatedCTM=null)!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()}),this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(t,this.eventListeners[t],!this.options.preventMouseEventsDefault&&h);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),c=c.filter(function(t){return t.svg!==e.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},i.prototype.getPublicInstance=function(){var o=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return o.options.panEnabled=!0,o.pi},disablePan:function(){return o.options.panEnabled=!1,o.pi},isPanEnabled:function(){return!!o.options.panEnabled},pan:function(t){return o.pan(t),o.pi},panBy:function(t){return o.panBy(t),o.pi},getPan:function(){return o.getPan()},setBeforePan:function(t){return o.options.beforePan=null===t?null:r.proxy(t,o.publicInstance),o.pi},setOnPan:function(t){return o.options.onPan=null===t?null:r.proxy(t,o.publicInstance),o.pi},enableZoom:function(){return o.options.zoomEnabled=!0,o.pi},disableZoom:function(){return o.options.zoomEnabled=!1,o.pi},isZoomEnabled:function(){return!!o.options.zoomEnabled},enableControlIcons:function(){return o.options.controlIconsEnabled||(o.options.controlIconsEnabled=!0,s.enable(o)),o.pi},disableControlIcons:function(){return o.options.controlIconsEnabled&&(o.options.controlIconsEnabled=!1,s.disable(o)),o.pi},isControlIconsEnabled:function(){return!!o.options.controlIconsEnabled},enableDblClickZoom:function(){return o.options.dblClickZoomEnabled=!0,o.pi},disableDblClickZoom:function(){return o.options.dblClickZoomEnabled=!1,o.pi},isDblClickZoomEnabled:function(){return!!o.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return o.enableMouseWheelZoom(),o.pi},disableMouseWheelZoom:function(){return o.disableMouseWheelZoom(),o.pi},isMouseWheelZoomEnabled:function(){return!!o.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(t){return o.options.zoomScaleSensitivity=t,o.pi},setMinZoom:function(t){return o.options.minZoom=t,o.pi},setMaxZoom:function(t){return o.options.maxZoom=t,o.pi},setBeforeZoom:function(t){return o.options.beforeZoom=null===t?null:r.proxy(t,o.publicInstance),o.pi},setOnZoom:function(t){return o.options.onZoom=null===t?null:r.proxy(t,o.publicInstance),o.pi},zoom:function(t){return o.publicZoom(t,!0),o.pi},zoomBy:function(t){return o.publicZoom(t,!1),o.pi},zoomAtPoint:function(t,e){return o.publicZoomAtPoint(t,e,!0),o.pi},zoomAtPointBy:function(t,e){return o.publicZoomAtPoint(t,e,!1),o.pi},zoomIn:function(){return this.zoomBy(1+o.options.zoomScaleSensitivity),o.pi},zoomOut:function(){return this.zoomBy(1/(1+o.options.zoomScaleSensitivity)),o.pi},getZoom:function(){return o.getRelativeZoom()},setOnUpdatedCTM:function(t){return o.options.onUpdatedCTM=null===t?null:r.proxy(t,o.publicInstance),o.pi},resetZoom:function(){return o.resetZoom(),o.pi},resetPan:function(){return o.resetPan(),o.pi},reset:function(){return o.reset(),o.pi},fit:function(){return o.fit(),o.pi},contain:function(){return o.contain(),o.pi},center:function(){return o.center(),o.pi},updateBBox:function(){return o.updateBBox(),o.pi},resize:function(){return o.resize(),o.pi},getSizes:function(){return{width:o.width,height:o.height,realZoom:o.getZoom(),viewBox:o.viewport.getViewBox()}},destroy:function(){return o.destroy(),o.pi}}),this.publicInstance};var c=[];e.exports=function(t,e){var o=r.getSvg(t);if(null===o)return null;for(var n=c.length-1;0<=n;n--)if(c[n].svg===o)return c[n].instance.getPublicInstance();return c.push({svg:o,instance:new i(o,e)}),c[c.length-1].instance.getPublicInstance()}},{"./control-icons":1,"./shadow-viewport":2,"./svg-utilities":5,"./uniwheel":6,"./utilities":7}],5:[function(t,e,o){var l=t("./utilities"),s="unknown";document.documentMode&&(s="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(t){if(t.clientWidth&&t.clientHeight)return{width:t.clientWidth,height:t.clientHeight};if(t.getBoundingClientRect())return t.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(t,e){var o=null;if(!(o=l.isElement(e)?e:t.querySelector(e))){var n=Array.prototype.slice.call(t.childNodes||t.children).filter(function(t){return"defs"!==t.nodeName&&"#text"!==t.nodeName});1===n.length&&"g"===n[0].nodeName&&null===n[0].getAttribute("transform")&&(o=n[0])}if(!o){var i="viewport-"+(new Date).toISOString().replace(/\D/g,"");(o=document.createElementNS(this.svgNS,"g")).setAttribute("id",i);var s=t.childNodes||t.children;if(s&&00)if(a.tHead&&a.tHead.rows.length>0){for(e=0;e0&&n.push(m),o++;if(!n)return}for(o=0;o2&&void 0!==arguments[2]&&arguments[2];for(var s in t)void 0!==i[s]&&(null===i[s]||"object"!==(0,c.default)(i[s])?n(t,i,s,o):"object"===(0,c.default)(t[s])&&e.fillIfDefined(t[s],i[s],o))},e.extend=function(t,e){for(var i=1;i3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var r=0;r3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var r in o)if(o.hasOwnProperty(r)&&-1===t.indexOf(r))if(o[r]&&o[r].constructor===Object)void 0===i[r]&&(i[r]={}),i[r].constructor===Object?e.deepExtend(i[r],o[r]):n(i,o,r,s);else if(Array.isArray(o[r])){i[r]=[];for(var a=0;a2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var r in i)if(i.hasOwnProperty(r)||!0===o)if(i[r]&&i[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r].constructor===Object?e.deepExtend(t[r],i[r],o):n(t,i,r,s);else if(Array.isArray(i[r])){t[r]=[];for(var a=0;a=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){var o;return-1!=t.indexOf("rgba")?t:-1!=t.indexOf("rgb")?(o=t.substr(t.indexOf("(")+1).replace(")","").split(","),"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"):(o=e.hexToRGB(t),null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")")},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(!0===e.isString(t)){if(!0===e.isValidRGB(t)){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(!0===e.isValidHex(t)){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t;return{h:60*((t==o?3:i==o?1:5)-s/(n-o))/360,s:(n-o)/n,v:n}};var v={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return(0,l.default)(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=v.split(t.style.cssText),n=v.split(i),s=e.extend(o,n);t.style.cssText=v.join(s)},e.removeCssText=function(t,e){var i=v.split(t.style.cssText),o=v.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=v.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},e.isValidRGB=function(t){return t=t.replace(" ",""),/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t)},e.isValidRGBA=function(t){return t=t.replace(" ",""),/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t)},e.selectiveBridgeObject=function(t,i){if(null!==i&&"object"===(void 0===i?"undefined":(0,c.default)(i))){for(var o=(0,h.default)(i),n=0;n0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=function(t){return null!==t&&void 0!==t},s=function(t){return null!==t&&"object"===(void 0===t?"undefined":(0,c.default)(t))};if(!s(t))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(i))throw new Error("Parameter option must have a value");if(!s(o))throw new Error("Parameter globalOptions must be an object");var r=e[i],a=s(o)&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(o),d=a?o[i]:void 0,l=d?d.enabled:void 0;if(void 0!==r){if("boolean"==typeof r)return s(t[i])||(t[i]={}),void(t[i].enabled=r);if(null===r&&!s(t[i])){if(!n(d))return;t[i]=(0,h.default)(d)}if(s(r)){var u=!0;void 0!==r.enabled?u=r.enabled:void 0!==l&&(u=d.enabled),function(t,e,i){s(t[i])||(t[i]={});var o=e[i],n=t[i];for(var r in o)o.hasOwnProperty(r)&&(n[r]=o[r])}(t,e,i),t[i].enabled=u}}},e.binarySearchCustom=function(t,e,i,o){for(var n=0,s=0,r=t.length-1;s<=r&&n<1e4;){var a=Math.floor((s+r)/2),h=t[a],d=void 0===o?h[i]:h[i][o],l=e(d);if(0==l)return a;-1==l?s=a+1:r=a-1,n++}return-1},e.binarySearchValue=function(t,e,i,o,n){var s,r,a,h,d=0,l=0,u=t.length-1;for(n=void 0!=n?n:function(t,e){return t==e?0:t0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?l=h+1:u=h-1,d++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),i-o},e.topMost=function(t,e){var i=void 0;Array.isArray(e)||(e=[e]);var o=!0,n=!1,s=void 0;try{for(var a,h=(0,r.default)(t);!(o=(a=h.next()).done);o=!0){var d=a.value;if(d){i=d[e[0]];for(var l=1;ln?1:or)&&(s=h,r=d)}return s},n.prototype.min=function(t){var e,i,o=this._data,n=(0,l.default)(o),s=null,r=null;for(e=0,i=n.length;e0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){n<0&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.printStyle=void 0;var n=i(19),s=o(n),r=i(6),a=o(r),h=i(8),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=!1,v=void 0,g="background: #FFeeee; color: #dd0000",y=function(){function t(){(0,u.default)(this,t)}return(0,p.default)(t,null,[{key:"validate",value:function(e,i,o){m=!1,v=i;var n=i;return void 0!==o&&(n=i[o]),t.parse(e,n,[]),m}},{key:"parse",value:function(e,i,o){for(var n in e)e.hasOwnProperty(n)&&t.check(n,e,i,o)}},{key:"check",value:function(e,i,o,n){if(void 0===o[e]&&void 0===o.__any__)return void t.getSuggestion(e,o,n);var s=e,r=!0;void 0===o[e]&&void 0!==o.__any__&&(s="__any__",r="object"===t.getType(i[e]));var a=o[s];r&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,o,s,a,n)}},{key:"checkFields",value:function(e,i,o,n,s,r){var a=function(i){console.log("%c"+i+t.printLocation(r,e),g)},h=t.getType(i[e]),l=s[h];void 0!==l?"array"===t.getType(l)&&-1===l.indexOf(i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(l)+' not "'+i[e]+'". '),m=!0):"object"===h&&"__any__"!==n&&(r=f.copyAndExtendArray(r,e),t.parse(i[e],o[n],r)):void 0===s.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print((0,d.default)(s))+". Received ["+h+'] "'+i[e]+'"'),m=!0)}},{key:"getType",value:function(t){var e=void 0===t?"undefined":(0,a.default)(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(e,i,o){var n=t.findInOptions(e,i,o,!1),s=t.findInOptions(e,v,[],!0),r=void 0 +;r=void 0!==n.indexMatch?" in "+t.printLocation(n.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':s.distance<=4&&n.distance>s.distance?" in "+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e):". Did you mean one of these: "+t.print((0,d.default)(i))+t.printLocation(o,e),console.log('%cUnknown option detected: "'+e+'"'+r,g),m=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[],h=e.toLowerCase(),d=void 0;for(var l in i){var u=void 0;if(void 0!==i[l].__type__&&!0===n){var c=t.findInOptions(e,i[l],f.copyAndExtendArray(o,l));s>c.distance&&(r=c.closestMatch,a=c.path,s=c.distance,d=c.indexMatch)}else-1!==l.toLowerCase().indexOf(h)&&(d=l),u=t.levenshteinDistance(e,l),s>u&&(r=l,a=f.copyArray(o),s=u)}return{closestMatch:r,path:a,distance:s,indexMatch:d}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",o="\n\n"+i+"options = {\n",n=0;n0&&(this.enableBorderDashes(t,e),t.stroke(),this.disableBorderDashes(t,e)),t.restore()}},{key:"performFill",value:function(t,e){this.enableShadow(t,e),t.fill(),this.disableShadow(t,e),this.performStroke(t,e)}},{key:"_addBoundingBoxMargin",value:function(t){this.boundingBox.left-=t,this.boundingBox.top-=t,this.boundingBox.bottom+=t,this.boundingBox.right+=t}},{key:"_updateBoundingBox",value:function(t,e,i,o,n){void 0!==i&&this.resize(i,o,n),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(t,e,i,o,n){this._updateBoundingBox(t,e,i,o,n)}},{key:"getDimensionsFromLabel",value:function(t,e,i){this.textSize=this.labelModule.getTextSize(t,e,i);var o=this.textSize.width,n=this.textSize.height;return 0===o&&(o=14,n=14),{width:o,height:n}}}]),t}();e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};if(this.needsRefresh(e,i)){this.labelModule.getTextSize(t,e,i);var n=2*o.size;this.width=n,this.height=n,this.radius=.5*this.width}}},{key:"_drawShape",value:function(t,e,i,o,n,s,r,a){if(this.resize(t,s,r,a),this.left=o-this.width/2,this.top=n-this.height/2,this.initContextForDraw(t,a),t[e](o,n,a.size),this.performFill(t,a),void 0!==this.options.label){this.labelModule.calculateLabelSize(t,s,r,o,n,"hanging");var h=n+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(t,o,h,s,r,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(m.default);e.default=v},function(t,e,i){var o=i(78),n=i(51);t.exports=function(t){return o(n(t))}},function(t,e,i){var o=i(20),n=i(39);t.exports=i(21)?function(t,e,i){return o.f(t,e,n(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var o=i(32);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){t.exports={default:i(138),__esModule:!0}},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var n=i(188),s=o(n),r=i(77),a=o(r);e.default=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,h=(0,a.default)(t);!(o=(r=h.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&h.return&&h.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if((0,s.default)(Object(e)))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e){t.exports={}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var o=i(84),n=i(58);t.exports=Object.keys||function(t){return o(t,n)}},function(t,e,i){function o(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}o.subtract=function(t,e){var i=new o;return i.x=t.x-e.x,i.y=t.y-e.y,i.z=t.z-e.z,i},o.add=function(t,e){var i=new o;return i.x=t.x+e.x,i.y=t.y+e.y,i.z=t.z+e.z,i},o.avg=function(t,e){return new o((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},o.crossProduct=function(t,e){var i=new o;return i.x=t.y*e.z-t.z*e.y,i.y=t.z*e.x-t.x*e.z,i.z=t.x*e.y-t.y*e.x,i},o.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=o},function(t,e,i){var o,n,s;!function(i,r){n=[],o=r,void 0!==(s="function"==typeof o?o.apply(e,n):o)&&(t.exports=s)}(0,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,n={},s={keydown:{},keyup:{}},r={};for(e=97;e<=122;e++)r[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)r[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r.delete={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;n=4*a){var c=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(c=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-c,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),m=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(m),l.day(m),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(c=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(c,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(c=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(c,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;d=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(o=0;o=r&&nt.range.end){var h={start:t.range.start,end:i};return i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,h,i),n=t.range.conversion(o,r),(i.valueOf()-n.offset)*n.scale}return i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,t.range,i),n=t.range.conversion(o,r),(i.valueOf()-n.offset)*n.scale},e.toTime=function(t,i,o){if(0==t.body.hiddenDates.length){var n=t.range.conversion(o);return new Date(i/n.scale+n.offset)}var s=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),r=t.range.end-t.range.start-s,a=r*i/o,h=e.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,a);return new Date(h+a+t.range.start)},e.getHiddenDurationBetween=function(t,e,i){for(var o=0,n=0;n=e&&r=e&&r<=i&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?o<0?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&t0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=(0,h.default)(this.data)}for(var i=0;ithis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},o.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=o},function(t,e){function i(t){if(t)return o(t)}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;n=.4*v}if(this.options.showMinorLabels&&m){var k=this._repaintMinorText(c,y,t,b);k.style.width=_+"px"}f&&this.options.showMajorLabels?(c>0&&(void 0==w&&(w=c),k=this._repaintMajorText(c,s.getLabelMajor(),t,b)),g=this._repaintMajorLine(c,_,t,b)):m?g=this._repaintMinorLine(c,_,t,b):g&&(g.style.width=parseInt(g.style.width)+_+"px")}if(1e3!==x||u||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to 1000 lines."),u=!0),this.options.showMajorLabels){var S=this.body.util.toTime(0),D=s.getLabelMajor(S),M=D.length*(this.props.majorCharWidth||10)+10;(void 0==w||Mt.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"updateGroupOptions",value:function(t,e,i){if(void 0!==i){var o=t.group;if(void 0!==e&&void 0!==e.group&&o!==e.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof o||"string"==typeof o&&""!=o){var n=i.get(o);h.selectiveNotDeepExtend(["font"],t,n),t.color=h.parseColor(t.color)}}}},{key:"parseOptions",value:function(e,i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments[4],r=["color","fixed","shadow"];if(h.selectiveNotDeepExtend(r,e,i,o),t.checkMass(i),h.mergeOptions(e,i,"shadow",n),void 0!==i.color&&null!==i.color){var a=h.parseColor(i.color);h.fillIfDefined(e.color,a)}else!0===o&&null===i.color&&(e.color=h.bridgeObject(n.color));void 0!==i.fixed&&null!==i.fixed&&("boolean"==typeof i.fixed?(e.fixed.x=i.fixed,e.fixed.y=i.fixed):(void 0!==i.fixed.x&&"boolean"==typeof i.fixed.x&&(e.fixed.x=i.fixed.x),void 0!==i.fixed.y&&"boolean"==typeof i.fixed.y&&(e.fixed.y=i.fixed.y))),!0===o&&null===i.font&&(e.font=h.bridgeObject(n.font)),t.updateGroupOptions(e,i,s),void 0!==i.scaling&&h.mergeOptions(e.scaling,i.scaling,"label",n.scaling)}},{key:"checkMass",value:function(t,e){if(void 0!==t.mass&&t.mass<=0){var i="";void 0!==e&&(i=" in node id: "+e),console.log("%cNegative or zero mass disallowed"+i+", setting mass to 1.",C),t.mass=1}}}]),t}();e.default=O},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(6),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(2),u=function(){function t(){(0,a.default)(this,t)}return(0,d.default)(t,null,[{key:"choosify",value:function(t,e){var i=["node","edge","label"],o=!0,n=l.topMost(e,"chosen");if("boolean"==typeof n)o=n;else if("object"===(void 0===n?"undefined":(0,s.default)(n))){if(-1===i.indexOf(t))throw new Error("choosify: subOption '"+t+"' should be one of '"+i.join("', '")+"'");var r=l.topMost(e,["chosen",t]);"boolean"!=typeof r&&"function"!=typeof r||(o=r)}return o}},{key:"pointInRect",value:function(t,e,i){if(t.width<=0||t.height<=0)return!1;if(void 0!==i){var o={x:e.x-i.x,y:e.y-i.y};if(0!==i.angle){var n=-i.angle;e={x:Math.cos(n)*o.x-Math.sin(n)*o.y,y:Math.sin(n)*o.x+Math.cos(n)*o.y}}else e=o}var s=t.x+t.width,r=t.y+t.width;return t.lefte.x&&t.tope.y}},{key:"isValidLabel",value:function(t){return"string"==typeof t&&""!==t}}]),t}();e.default=u},function(t,e,i){i(125);for(var o=i(18),n=i(26),s=i(31),r=i(13)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),h=0;hdocument.F=Object<\/script>"),t.close(),h=t.F;o--;)delete h.prototype[s[o]];return h()};t.exports=Object.create||function(t,e){var i;return null!==t?(a.prototype=o(t),i=new a,a.prototype=null,i[r]=t):i=h(),void 0===e?i:n(i,e)}},function(t,e){var i=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:i)(t)}},function(t,e,i){var o=i(57)("keys"),n=i(40);t.exports=function(t){return o[t]||(o[t]=n(t))}},function(t,e,i){var o=i(18),n=o["__core-js_shared__"]||(o["__core-js_shared__"]={});t.exports=function(t){return n[t]||(n[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var o=i(20).f,n=i(22),s=i(13)("toStringTag");t.exports=function(t,e,i){t&&!n(t=i?t:t.prototype,s)&&o(t,s,{configurable:!0,value:e})}},function(t,e,i){var o=i(135)(!0);i(79)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=o(e,i),this._i+=t.length,{value:t,done:!1})})},function(t,e,i){e.f=i(13)},function(t,e,i){var o=i(18),n=i(7),s=i(52),r=i(61),a=i(20).f;t.exports=function(t){var e=n.Symbol||(n.Symbol=s?{}:o.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:r.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i=p().hours(0).minutes(0).seconds(0).milliseconds(0),o=i.clone().add(-3,"days").valueOf(),n=i.clone().add(3,"days").valueOf();this.millisecondsPerPixelCache=void 0,void 0===e?(this.start=o,this.end=n):(this.start=e.start||o,this.end=e.end||n),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:p,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=c.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",this._onDragStart.bind(this)),this.body.emitter.on("panmove",this._onDrag.bind(this)),this.body.emitter.on("panend",this._onDragEnd.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.body.dom.rollingModeBtn.addEventListener("click",this.startRolling.bind(this)),this.setOptions(e)}function s(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'+t+'". Choose "horizontal" or "vertical".')}var r=i(8),a=o(r),h=i(19),d=o(h),l=i(6),u=o(l),c=i(2),p=i(9),f=i(16),m=i(36);n.prototype=new f,n.prototype.setOptions=function(t){if(t){var e=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","rtl","showCurrentTime","rollingMode","horizontalScroll"];c.selectiveExtend(e,this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}},n.prototype.startRolling=function(){function t(){e.stopRolling(),e.rolling=!0;var i=e.end-e.start,o=c.convert(new Date,"Date").valueOf(),n=o-i*e.options.rollingMode.offset,s=o+i*(1-e.options.rollingMode.offset),r={animation:!1};e.setRange(n,s,r),i=1/e.conversion(e.body.domProps.center.width).scale/10,i<30&&(i=30),i>1e3&&(i=1e3),e.body.dom.rollingModeBtn.style.visibility="hidden",e.currentTimeTimer=setTimeout(t,i)}var e=this;t()},n.prototype.stopRolling=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")},n.prototype.setRange=function(t,e,i,o,n){i||(i={}),!0!==i.byUser&&(i.byUser=!1);var s=this,r=void 0!=t?c.convert(t,"Date").valueOf():null,h=void 0!=e?c.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){var l=this.start,p=this.end,f="object"===(0,u.default)(i.animation)&&"duration"in i.animation?i.animation.duration:500,v="object"===(0,u.default)(i.animation)&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",g=c.easingFunctions[v];if(!g)throw new Error("Unknown easing function "+(0,d.default)(v)+". Choose from: "+(0,a.default)(c.easingFunctions).join(", "));var y=(new Date).valueOf(),b=!1;return function t(){if(!s.props.touch.dragging){var e=(new Date).valueOf(),a=e-y,d=g(a/f),u=a>f,c=u||null===r?r:l+(r-l)*d,v=u||null===h?h:p+(h-p)*d;_=s._applyRange(c,v),m.updateHiddenDates(s.options.moment,s.body,s.options.hiddenDates),b=b||_;var w={start:new Date(s.start),end:new Date(s.end),byUser:i.byUser,event:i.event};if(n&&n(d,_,u),_&&s.body.emitter.emit("rangechange",w),u){if(b&&(s.body.emitter.emit("rangechanged",w),o))return o()}else s.animationTimer=setTimeout(t,20)}}()}var _=this._applyRange(r,h);if(m.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),_){var w={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",w),clearTimeout(s.timeoutID),s.timeoutID=setTimeout(function(){s.body.emitter.emit("rangechanged",w)},200),o)return o()}},n.prototype.getMillisecondsPerPixel=function(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache},n.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},n.prototype._applyRange=function(t,e){var i,o=null!=t?c.convert(t,"Date").valueOf():this.start,n=null!=e?c.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?c.convert(this.options.max,"Date").valueOf():null,r=null!=this.options.min?c.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(ns&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=r&&o=this.start-.5&&n<=this.end?(o=this.start,n=this.end):(i=a-(n-o),o-=i/2,n+=i/2)}}if(null!==this.options.zoomMax){var h=parseFloat(this.options.zoomMax);h<0&&(h=0),n-o>h&&(this.end-this.start===h&&othis.end?(o=this.start,n=this.end):(i=n-o-h,o+=i/2,n-=i/2))}var d=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,d},n.prototype.getRange=function(){return{start:this.start,end:this.end}},n.prototype.conversion=function(t,e){return n.conversion(this.start,this.end,t,e)},n.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},n.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},n.prototype._onDrag=function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;s(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start;o-=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);var n,r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;n=this.options.rtl?i/r*o:-i/r*o;var a=this.props.touch.start+n,h=this.props.touch.end+n,d=m.snapAwayFromHidden(this.body.hiddenDates,a,this.previousDelta-i,!0),l=m.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0);if(d!=a||l!=h)return this.deltaDifference+=i,this.props.touch.start=d,this.props.touch.end=l,void this._onDrag(t);this.previousDelta=i,this._applyRange(a,h);var u=new Date(this.start),c=new Date(this.end);this.body.emitter.emit("rangechange",{start:u,end:c,byUser:!0,event:t}),this.body.emitter.emit("panmove")}},n.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))},n.prototype._onMouseWheel=function(t){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var i;i=e<0?1-e/5:1/(1+e/5);var o;if(this.rolling)o=this.start+(this.end-this.start)*this.options.rollingMode.offset;else{var n=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);o=this._pointerToDate(n)}this.zoom(i,o,e,t),t.preventDefault()}},n.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0,c.preventDefault(t)},n.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){c.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center)),this.stopRolling();var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=m.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),s=o-n,r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var h=m.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),d=m.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&d==a||(this.props.touch.start=h,this.props.touch.end=d,this.scaleOffset=1-t.scale,r=h,a=d);var l={animation:!1,byUser:!0,event:t};this.setRange(r,a,l),this.startToFront=!1,this.endToFront=!0}},n.prototype._isInsideRange=function(t){var e,i=t.center?t.center.x:t.clientX;e=this.options.rtl?i-c.getAbsoluteLeft(this.body.dom.centerContainer):c.getAbsoluteRight(this.body.dom.centerContainer)-i;var o=this.body.util.toTime(e);return o>=this.start&&o<=this.end},n.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(s(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},n.prototype.getPointer=function(t,e){return this.options.rtl?{x:c.getAbsoluteRight(e)-t.x,y:t.y-c.getAbsoluteTop(e)}:{x:t.x-c.getAbsoluteLeft(e),y:t.y-c.getAbsoluteTop(e)}},n.prototype.zoom=function(t,e,i,o){null==e&&(e=(this.start+this.end)/2);var n=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),s=m.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),r=n-s,a=e-s+(this.start-(e-s))*t,h=e+r+(this.end-(e+r))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0) +;var d=m.snapAwayFromHidden(this.body.hiddenDates,a,i,!0),l=m.snapAwayFromHidden(this.body.hiddenDates,h,-i,!0);d==a&&l==h||(a=d,h=l);var u={animation:!1,byUser:!0,event:o};this.setRange(a,h,u),this.startToFront=!1,this.endToFront=!0},n.prototype.move=function(t){var e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o},n.prototype.moveTo=function(t){var e=(this.start+this.end)/2,i=e-t,o=this.start-i,n=this.end-i,s={animation:!1,byUser:!0,event:null};this.setRange(o,n,s)},t.exports=n},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(){}var s=i(19),r=o(s),a=i(6),h=o(a),d=i(44),l=i(10),u=i(37),c=i(2),p=i(45),f=i(97),m=i(36),v=i(46);d(n.prototype),n.prototype._create=function(t){function e(t){this.isActive()&&this.emit("mousewheel",t);var e=0,i=0;if("detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=-1*i,i=0),"deltaY"in t&&(i=-1*t.deltaY),"deltaX"in t&&(e=t.deltaX),this.options.zoomKey&&!t[this.options.zoomKey])if(t.preventDefault(),this.options.verticalScroll&&Math.abs(i)>=Math.abs(e)){var o=this.props.scrollTop,n=o+i;this.isActive()&&(this._setScrollTop(n),this._redraw(),this.emit("scroll",t))}else if(this.options.horizontalScroll){var s=Math.abs(e)>=Math.abs(i)?e:i,r=s/120*(this.range.end-this.range.start)/20,a=this.range.start+r,h=this.range.end+r,d={animation:!1,byUser:!0,event:t};this.range.setRange(a,h,d)}}function i(t){if(s.options.verticalScroll&&(t.preventDefault(),s.isActive())){var e=-t.target.scrollTop;s._setScrollTop(e),s._redraw(),s.emit("scrollSide",t)}}function o(t){if(t.preventDefault&&t.preventDefault(),!(!t.target.className.indexOf("vis")>-1||a))return t.dataTransfer.dropEffect="move",a=!0,!1}function n(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return a=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?s.itemSet._onAddItem(t):s.itemSet._onDropObjectOnItem(t),s.emit("drop",s.getEventProperties(t)),!1}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",function(){!0===this.initialDrawDone&&this._redraw()}.bind(this)),this.on("rangechanged",function(){this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("panmove",this._onDrag.bind(this));var s=this;this._origRedraw=this._redraw.bind(this),this._redraw=c.throttle(this._origRedraw),this.on("_change",function(t){s.itemSet&&s.itemSet.initialItemSetDrawn&&t&&1==t.queue?s._redraw():s._origRedraw()}),this.hammer=new l(this.dom.root);var r=this.hammer.get("pinch").set({enable:!0});u.disablePreventDefaultVertically(r),this.hammer.get("pan").set({threshold:5,direction:l.DIRECTION_HORIZONTAL}),this.listeners={},["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(function(t){var e=function(e){s.isActive()&&s.emit(t,e)};s.hammer.on(t,e),s.listeners[t]=e}),u.onTouch(this.hammer,function(t){s.emit("touch",t)}.bind(this)),u.onRelease(this.hammer,function(t){s.emit("release",t)}.bind(this)),this.dom.centerContainer.addEventListener?(this.dom.centerContainer.addEventListener("mousewheel",e.bind(this),!1),this.dom.centerContainer.addEventListener("DOMMouseScroll",e.bind(this),!1)):this.dom.centerContainer.attachEvent("onmousewheel",e.bind(this)),this.dom.left.parentNode.addEventListener("scroll",i.bind(this)),this.dom.right.parentNode.addEventListener("scroll",i.bind(this));var a=!1;if(this.dom.center.addEventListener("dragover",o.bind(this),!1),this.dom.center.addEventListener("drop",n.bind(this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},n.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","rtl","zoomKey","horizontalScroll","verticalScroll"];if(c.selectiveExtend(e,this.options,t),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!==(0,h.default)(this.options.orientation)&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"===(0,h.default)(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new p(this.body);i.setOptions=function(t){var e=t?c.extend({},t):{};e.orientation="top",p.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var o=this.components.indexOf(this.timeAxis2);-1!==o&&this.components.splice(o,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&m.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new f(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var n=c.deepExtend({},this.options);this.components.forEach(function(t){c.deepExtend(n,t.options)}),this.configurator.setModuleOptions({global:n})}this._redraw()},n.prototype.isActive=function(){return!this.activator||this.activator.active},n.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},n.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+(0,r.default)(e));i.length>0&&i[0].setCustomTime(t)},n.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+(0,r.default)(t));return e[0].getCustomTime()},n.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+(0,r.default)(e));if(i.length>0)return i[0].setCustomTitle(t)},n.prototype.getEventProperties=function(t){return{event:t}},n.prototype.addCustomTime=function(t,e){var i=void 0!==t?c.convert(t,"Date").valueOf():new Date;if(this.customTimes.some(function(t){return t.options.id===e}))throw new Error("A custom time with id "+(0,r.default)(e)+" already exists");var o=new v(this.body,c.extend({},this.options,{time:i,id:e}));return this.customTimes.push(o),this.components.push(o),this._redraw(),e},n.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+(0,r.default)(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},n.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},n.prototype.fit=function(t,e){var i=this.getDataRange();if(null!==i.min||null!==i.max){var o=i.max-i.min,n=new Date(i.min.valueOf()-.01*o),s=new Date(i.max.valueOf()+.01*o),r=!t||void 0===t.animation||t.animation;this.range.setRange(n,s,{animation:r},e)}},n.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},n.prototype.setWindow=function(t,e,i,o){"function"==typeof arguments[2]&&(o=arguments[2],i={});var n,s;1==arguments.length?(s=arguments[0],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n})):2==arguments.length&&"function"==typeof arguments[1]?(s=arguments[0],o=arguments[1],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n},o)):(n=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:n},o))},n.prototype.moveTo=function(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});var o=this.range.end-this.range.start,n=c.convert(t,"Date").valueOf(),s=n-o/2,r=n+o/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)},n.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},n.prototype.zoomIn=function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=r/(1+t),h=(r-a)/2,d=n+h,l=s-h;this.setWindow(d,l,e,i)}},n.prototype.zoomOut=function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=n-r*t/2,h=s+r*t/2;this.setWindow(a,h,e,i)}},n.prototype.redraw=function(){this._redraw()},n.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.root.offsetWidth){m.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(c.addClassName(o.root,"vis-top"),c.removeClassName(o.root,"vis-bottom")):(c.removeClassName(o.root,"vis-top"),c.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=c.option.asSize(e.maxHeight,""),o.root.style.minHeight=c.option.asSize(e.minHeight,""),o.root.style.width=c.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top,i.borderRootHeight=o.root.offsetHeight-o.root.clientHeight,i.borderRootWidth=o.root.offsetWidth-o.root.clientWidth,0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(i.borderRootWidth=i.borderRootHeight),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var n=Math.max(i.left.height,i.center.height,i.right.height),s=i.top.height+n+i.bottom.height+i.borderRootHeight+i.border.top+i.border.bottom;o.root.style.height=c.option.asSize(e.height,s+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-i.borderRootHeight;var r=i.root.height-i.top.height-i.bottom.height-i.borderRootHeight;i.centerContainer.height=r,i.leftContainer.height=r,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-i.borderRootWidth,this.initialDrawDone||(i.scrollbarWidth=c.getScrollBarWidth()),e.verticalScroll?e.rtl?(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth+i.scrollbarWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth+i.scrollbarWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right),this._setDOM();var a=this._updateScrollTop();"top"!=e.orientation.item&&(a+=Math.max(i.centerContainer.height-i.center.height-i.border.top-i.border.bottom,0)),o.center.style.top=a+"px";var h=0==i.scrollTop?"hidden":"",d=i.scrollTop==i.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=h,o.shadowBottom.style.visibility=d,o.shadowTopLeft.style.visibility=h,o.shadowBottomLeft.style.visibility=d,o.shadowTopRight.style.visibility=h,o.shadowBottomRight.style.visibility=d,e.verticalScroll&&(o.rightContainer.className="vis-panel vis-right vis-vertical-scroll",o.leftContainer.className="vis-panel vis-left vis-vertical-scroll",o.shadowTopRight.style.visibility="hidden",o.shadowBottomRight.style.visibility="hidden",o.shadowTopLeft.style.visibility="hidden",o.shadowBottomLeft.style.visibility="hidden",o.left.style.top="0px",o.right.style.top="0px"),(!e.verticalScroll||i.center.heighti.centerContainer.height;this.hammer.get("pan").set({direction:u?l.DIRECTION_ALL:l.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});if(t){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}},n.prototype._setDOM=function(){var t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;var i=t.root.width-t.left.width-t.right.width-t.borderRootWidth;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height=t.background.height+"px",e.backgroundVertical.style.height=t.background.height+"px",e.backgroundHorizontal.style.height=t.centerContainer.height+"px",e.centerContainer.style.height=t.centerContainer.height+"px",e.leftContainer.style.height=t.leftContainer.height+"px",e.rightContainer.style.height=t.rightContainer.height+"px",e.background.style.width=t.background.width+"px",e.backgroundVertical.style.width=t.centerContainer.width+"px",e.backgroundHorizontal.style.width=t.background.width+"px",e.centerContainer.style.width=t.center.width+"px",e.top.style.width=t.top.width+"px",e.bottom.style.width=t.bottom.width+"px",e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left=t.left.width+t.border.left+"px",e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top=t.top.height+"px",e.centerContainer.style.left=t.left.width+"px",e.centerContainer.style.top=t.top.height+"px",e.leftContainer.style.left="0",e.leftContainer.style.top=t.top.height+"px",e.rightContainer.style.left=t.left.width+t.center.width+"px",e.rightContainer.style.top=t.top.height+"px",e.top.style.left=t.left.width+"px",e.top.style.top="0",e.bottom.style.left=t.left.width+"px",e.bottom.style.top=t.top.height+t.centerContainer.height+"px",e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"},n.prototype.repaint=function(){throw new Error("Function repaint is deprecated. Use redraw instead.")},n.prototype.setCurrentTime=function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)},n.prototype.getCurrentTime=function(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()},n.prototype._toTime=function(t){return m.toTime(this,t,this.props.center.width)},n.prototype._toGlobalTime=function(t){return m.toTime(this,t,this.props.root.width)},n.prototype._toScreen=function(t){return m.toScreen(this,t,this.props.center.width)},n.prototype._toGlobalScreen=function(t){return m.toScreen(this,t,this.props.root.width)},n.prototype._initAutoResize=function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()},n.prototype._startAutoResize=function(){var t=this;this._stopAutoResize(),this._onResize=function(){if(1!=t.options.autoResize)return void t._stopAutoResize();t.dom.root&&(t.dom.root.offsetWidth==t.props.lastWidth&&t.dom.root.offsetHeight==t.props.lastHeight||(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight,t.props.scrollbarWidth=c.getScrollBarWidth(),t.body.emitter.emit("_change")))},c.addEventListener(window,"resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=setInterval(this._onResize,1e3)},n.prototype._stopAutoResize=function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(c.removeEventListener(window,"resize",this._onResize),this._onResize=null)},n.prototype._onTouch=function(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop},n.prototype._onPinch=function(t){this.touch.allowDragging=!1},n.prototype._onDrag=function(t){if(t&&this.touch.allowDragging){var e=t.deltaY,i=this._getScrollTop(),o=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),o!=i&&this.emit("verticalDrag")}},n.prototype._setScrollTop=function(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop},n.prototype._updateScrollTop=function(){var t=Math.min(this.props.centerContainer.height-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop0&&this.current.milliseconds()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){31104e9>t&&(this.scale="year",this.step=1e3),15552e9>t&&(this.scale="year",this.step=500),31104e8>t&&(this.scale="year",this.step=100),15552e8>t&&(this.scale="year",this.step=50),31104e7>t&&(this.scale="year",this.step=10),15552e7>t&&(this.scale="year",this.step=5),31104e6>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),2592e6>t&&(this.scale="month",this.step=1),432e6>t&&(this.scale="day",this.step=5),1728e5>t&&(this.scale="day",this.step=2),864e5>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),36e5>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),6e4>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),1e3>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("week"==e)o.weekday()>2?(o.weekday(0),o.add(1,"week")):o.weekday(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":case"week":return 1==t.date();case"month":return 0==t.month();case"year":default:return!1}},o.prototype.getLabelMinor=function(t){if(void 0==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];switch(this.scale){case"week":if(this.isMajor()&&0!==t.weekday())return"";default:return e&&e.length>0?this.moment(t).format(e):""}},o.prototype.getLabelMajor=function(t){if(void 0==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/a%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(n().add(1,"day"),"day")?" vis-tomorrow":t.isSame(n().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}var n=this.moment,s=this.moment(this.current),r=s.locale?s.locale("en"):s.lang("en"),a=this.step,h=[];switch(this.scale){case"millisecond":h.push(e(r)),h.push(t(r.milliseconds()));break;case"second":h.push(e(r)),h.push(t(r.seconds()));break;case"minute":h.push(e(r)),h.push(t(r.minutes()));break;case"hour":h.push("vis-h"+r.hours()+(4==this.step?"-h"+(r.hours()+4):"")),h.push(e(r)),h.push(t(r.hours()));break;case"weekday":h.push("vis-"+r.format("dddd").toLowerCase()),h.push(e(r)),h.push(i(r)),h.push(t(r.date()));break;case"day":h.push("vis-day"+r.date()),h.push("vis-"+r.format("MMMM").toLowerCase()),h.push(e(r)),h.push(o(r)),h.push(this.step<=2?e(r):""),h.push(this.step<=2?"vis-"+r.format("dddd").toLowerCase():""), +h.push(t(r.date()-1));break;case"week":h.push("vis-week"+r.format("w")),h.push(i(r)),h.push(t(r.week()));break;case"month":h.push("vis-"+r.format("MMMM").toLowerCase()),h.push(o(r)),h.push(t(r.month()));break;case"year":h.push("vis-year"+r.year()),h.push(function(t){return t.isSame(new Date,"year")?" vis-current-year":""}(r)),h.push(t(r.year()))}return h.filter(String).join(" ")},t.exports=o},function(t,e,i){function o(t,e){this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,moment:r,locales:a,locale:"en"},this.options=n.extend({},this.defaultOptions),this.offset=0,this._create(),this.setOptions(e)}var n=i(2),s=i(16),r=i(9),a=i(98);o.prototype=new s,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t},o.prototype.destroy=function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null},o.prototype.setOptions=function(t){t&&n.selectiveExtend(["rtl","showCurrentTime","moment","locale","locales"],this.options,t)},o.prototype.redraw=function(){if(this.options.showCurrentTime){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());var e=this.options.moment((new Date).valueOf()+this.offset),i=this.body.util.toScreen(e),o=this.options.locales[this.options.locale];o||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),o=this.options.locales.en);var n=o.current+" "+o.time+": "+e.format("dddd, MMMM Do YYYY, H:mm:ss");n=n.charAt(0).toUpperCase()+n.substring(1),this.options.rtl?this.bar.style.right=i+"px":this.bar.style.left=i+"px",this.bar.title=n}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1},o.prototype.start=function(){function t(){e.stop();var i=e.body.range.conversion(e.body.domProps.center.width).scale,o=1/i/10;o<30&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.doInnerStack=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.stackDirty=!0,e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(var o in e.subgroupStack)this.subgroupStack[o]=e.subgroupStack[o],this.doInnerStack=this.doInnerStack||e.subgroupStack[o];this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var n=this;this.itemSet.body.emitter.on("checkRangedItems",function(){n.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(8),s=function(t){return t&&t.__esModule?t:{default:t}}(n),r=i(2),a=i(100);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e,i;if(this.itemSet.options&&this.itemSet.options.groupTemplate?(i=this.itemSet.options.groupTemplate.bind(this),e=i(t,this.dom.inner)):e=t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object?i(t,this.dom.inner):this.dom.inner.innerHTML=void 0!==e&&null!==e?e:this.groupId||"";if(this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?r.removeClassName(this.dom.inner,"vis-hidden"):r.addClassName(this.dom.inner,"vis-hidden"),t&&t.nestedGroups){this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups),void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0),r.addClassName(this.dom.label,"vis-nesting-group");var o=this.itemSet.options.rtl?"collapsed-rtl":"collapsed";this.showNested?(r.removeClassName(this.dom.label,o),r.addClassName(this.dom.label,"expanded")):(r.removeClassName(this.dom.label,"expanded"),r.addClassName(this.dom.label,o))}else this.nestedGroups&&(this.nestedGroups=null,o=this.itemSet.options.rtl?"collapsed-rtl":"collapsed",r.removeClassName(this.dom.label,o),r.removeClassName(this.dom.label,"expanded"),r.removeClassName(this.dom.label,"vis-nesting-group"));t&&t.nestedInGroup&&(r.addClassName(this.dom.label,"vis-nested-group"),this.itemSet.options&&this.itemSet.options.rtl?this.dom.inner.style.paddingRight="30px":this.dom.inner.style.paddingLeft="30px");var n=t&&t.className||null;n!=this.className&&(this.className&&(r.removeClassName(this.dom.label,this.className),r.removeClassName(this.dom.foreground,this.className),r.removeClassName(this.dom.background,this.className),r.removeClassName(this.dom.axis,this.className)),r.addClassName(this.dom.label,n),r.addClassName(this.dom.foreground,n),r.addClassName(this.dom.background,n),r.addClassName(this.dom.axis,n),this.className=n),this.style&&(r.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(r.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype._didMarkerHeightChange=function(){var t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;var e={},i=0;r.forEach(this.items,function(t,o){if(t.dirty=!0,t.displayed){e[o]=t.redraw(!0),i=e[o].length}});if(i>0)for(var o=0;o0)for(var u=0;u0){var e=this;this.resetSubgroups(),r.forEach(this.visibleItems,function(i){void 0!==i.data.subgroup&&(e.subgroups[i.data.subgroup].height=Math.max(e.subgroups[i.data.subgroup].height,i.height+t.item.vertical),e.subgroups[i.data.subgroup].visible=!0)})}},o.prototype._isGroupVisible=function(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,n=i[0].top+i[0].height;if(r.forEach(i,function(t){o=Math.min(o,t.top),n=Math.max(n,t.top+t.height)}),o>t.axis){var s=o-t.axis;n-=s,r.forEach(i,function(t){t.top-=s})}e=n+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype._addToSubgroup=function(t,e){e=e||t.data.subgroup,void 0!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)},o.prototype._updateSubgroupsSizes=function(){var t=this;if(t.subgroups)for(var e in t.subgroups){var i=t.subgroups[e].items[0].data.end||t.subgroups[e].items[0].data.start,o=t.subgroups[e].items[0].data.start,n=i-1;t.subgroups[e].items.forEach(function(t){new Date(t.data.start)new Date(n)&&(n=e)}),t.subgroups[e].start=o,t.subgroups[e].end=new Date(n-1)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t,e=[];if("string"==typeof this.subgroupOrderer){for(t in this.subgroups)e.push({subgroup:t,sortField:this.subgroups[t].items[0].data[this.subgroupOrderer]});e.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(t in this.subgroups)e.push(this.subgroups[t].items[0].data);e.sort(this.subgroupOrderer)}if(e.length>0)for(var i=0;i=0&&(i.items.splice(o,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e])}}},o.prototype.removeFromDataSet=function(t){this.itemSet.removeItem(t.id)},o.prototype.order=function(){for(var t=r.toArray(this.items),e=[],i=[],o=0;o0)for(var l=0;lh}),1==this.checkRangedItems)for(this.checkRangedItems=!1,l=0;lh})}var p={},f=0;for(l=0;l0)for(var v=0;v=0&&(r=e[s],!n(r));s--)void 0===o[r.id]&&(o[r.id]=!0,i.push(r));for(s=t+1;st.start},o.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dom.box["timeline-item"]=this,this.dirty=!0)},o.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0},o.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}},o.prototype._getDomComponentsSizes=function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}},o.prototype._updateDomComponentsSizes=function(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1},o.prototype._repaintDomAdditionals=function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.redraw=function(t){var e,i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes.bind(this)())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];if(t)return i;var o;return i.forEach(function(t){o=t()}),o},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end),r=void 0===this.data.align?this.options.align:this.data.align;!1===this.data.limitSize||void 0!==t&&!0!==t||(n<-o&&(n=-o),s>2*o&&(s=2*o));var a=Math.max(s-n+.5,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=a+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=a,i=Math.min(s-n,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=a+"px",r){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(a-i,0)+"px":this.dom.content.style.left=Math.max(a-i,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((a-i)/2,0)+"px":this.dom.content.style.left=Math.max((a-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:n<0?-n:0,this.options.rtl?this.dom.content.style.right=e+"px":(this.dom.content.style.left=e+"px",this.dom.content.style.width="calc(100% - "+e+"px)")}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;e.style.top="top"==t?this.top+"px":this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19),s=o(n),r=i(6),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(2),p=i(179).default,f=function(){function t(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;(0,d.default)(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},c.extend(this.options,this.defaultOptions),this.configureOptions=o,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new p(n),this.wrapper=void 0}return(0,u.default)(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;"string"==typeof t?this.options.filter=t:t instanceof Array?this.options.filter=t.join():"object"===(void 0===t?"undefined":(0,a.default)(t))?(void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)):"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0),!1===this.options.filter&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){var t=this;this._clean(),this.changedOptions=[];var e=this.options.filter,i=0,o=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,o=!1,"function"==typeof e?(o=e(n,[]),o=o||this._handleObject(this.configureOptions[n],[n],!0)):!0!==e&&-1===e.indexOf(n)||(o=!0),!1!==o&&(this.allowCreation=!0,i>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);if(!0===this.options.showButton){var s=document.createElement("div");s.className="vis-configuration vis-config-button",s.innerHTML="generate options",s.onclick=function(){t._printOptions()},s.onmouseover=function(){s.className="vis-configuration vis-config-button hover"},s.onmouseout=function(){s.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(s)}this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?i-1:0),n=1;n2&&void 0!==arguments[2]&&arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,o.innerHTML=!0===i?""+t+":":t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;ss&&1!==s&&(a.max=Math.ceil(1.2*e),d=a.max,h="range increased"),a.value=e}else a.value=o;var l=document.createElement("input");l.className="vis-configuration vis-config-rangeinput",l.value=a.value;var u=this;a.onchange=function(){l.value=this.value,u._update(Number(this.value),i)},a.oninput=function(){l.value=this.value};var c=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,c,a,l);""!==h&&this.popupHistory[p]!==d&&(this.popupHistory[p]=d,this._setupPopup(h,p))}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,n=this.options.filter,s=!1;for(var r in t)if(t.hasOwnProperty(r)){o=!0;var a=t[r],h=c.copyAndExtendArray(e,r);if("function"==typeof n&&!1===(o=n(r,e))&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=!1===i),!1!==o){s=!0;var d=this._getValue(h);if(a instanceof Array)this._handleArray(a,d,h);else if("string"==typeof a)this._makeTextInput(a,d,h);else if("boolean"==typeof a)this._makeCheckbox(a,d,h);else if(a instanceof Object){var l=!0;if(-1!==e.indexOf("physics")&&this.moduleOptions.physics.solver!==r&&(l=!1),!0===l)if(void 0!==a.enabled){var u=c.copyAndExtendArray(h,"enabled"),p=this._getValue(u);if(!0===p){var f=this._makeLabel(r,h,!0);this._makeItem(h,f),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,p,h)}else{var m=this._makeLabel(r,h,!0);this._makeItem(h,m),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;t="true"===t||t,t="false"!==t&&t;for(var n=0;nvar options = "+(0,s.default)(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;ethis.imageObj.height?i=this.imageObj.width/this.imageObj.height:o=this.imageObj.height/this.imageObj.width),t=2*this.options.size*i,e=2*this.options.size*o}else t=this.imageObj.width,e=this.imageObj.height;this.width=t,this.height=e,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(t,e,i,o){this.initContextForDraw(t,o),t.circle(e,i,o.size),this.performFill(t,o)}},{key:"_drawImageAtPosition",value:function(t,e){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t,e);var i=1;!0===this.options.shapeProperties.interpolation&&(i=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(t,i,this.left,this.top,this.width,this.height),this.disableShadow(t,e)}}},{key:"_drawImageLabel",value:function(t,e,i,o,n){var s,r=0;if(void 0!==this.height){r=.5*this.height;var a=this.labelModule.getTextSize(t,o,n);a.lineCount>=1&&(r+=a.height/2)}s=i+r,this.options.label&&(this.labelOffset=r),this.labelModule.draw(t,e,s,o,n,"hanging")}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19),s=o(n),r=i(6),a=o(r),h=i(29),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=i(117).default,v=i(48).default,g=i(215).default,y=i(217).default,b=i(218).default,_=i(219).default,w=function(){function t(e,i,o,n){if((0,u.default)(this,t),void 0===i)throw new Error("No body provided");this.options=f.bridgeObject(o),this.globalOptions=o,this.defaultOptions=n,this.body=i,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new m(this.body,this.options,!0),this.setOptions(e)}return(0,p.default)(t,[{key:"setOptions",value:function(e){if(e){t.parseOptions(this.options,e,!0,this.globalOptions),void 0!==e.id&&(this.id=e.id),void 0!==e.from&&(this.fromId=e.from),void 0!==e.to&&(this.toId=e.to),void 0!==e.title&&(this.title=e.title),void 0!==e.value&&(e.value=parseFloat(e.value));var i=[e,this.options,this.defaultOptions];this.chooser=v.choosify("edge",i),this.updateLabelModule(e);var o=this.updateEdgeType();return this._setInteractionWidths(),this.connect(),void 0===e.hidden&&void 0===e.physics||(o=!0),o}}},{key:"getFormattingValues",value:function(){var t=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,e=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,i=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,o=this.options.color.inherit,n={toArrow:t,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,fromArrow:e,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,arrowStrikethrough:this.options.arrowStrikethrough,color:o?void 0:this.options.color.color,inheritsColor:o,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width};if(this.selected||this.hover)if(!0===this.chooser){if(this.selected){var s=this.options.selectionWidth;"function"==typeof s?n.width=s(n.width):"number"==typeof s&&(n.width+=s),n.width=Math.max(n.width,.3/this.body.view.scale),n.color=this.options.color.highlight,n.shadow=this.options.shadow.enabled}else if(this.hover){var r=this.options.hoverWidth;"function"==typeof r?n.width=r(n.width):"number"==typeof r&&(n.width+=r),n.width=Math.max(n.width,.3/this.body.view.scale),n.color=this.options.color.hover,n.shadow=this.options.shadow.enabled}}else"function"==typeof this.chooser&&(this.chooser(n,this.options.id,this.selected,this.hover),void 0!==n.color&&(n.inheritsColor=!1),!1===n.shadow&&(n.shadowColor===this.options.shadow.color&&n.shadowSize===this.options.shadow.size&&n.shadowX===this.options.shadow.x&&n.shadowY===this.options.shadow.y||(n.shadow=!0)));else n.shadow=this.options.shadow.enabled,n.width=Math.max(n.width,.3/this.body.view.scale);return n}},{key:"updateLabelModule",value:function(t){var e=[t,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var t=this.options.smooth,e=!1,i=!0;return void 0!==this.edgeType&&((this.edgeType instanceof y&&!0===t.enabled&&"dynamic"===t.type||this.edgeType instanceof g&&!0===t.enabled&&"cubicBezier"===t.type||this.edgeType instanceof b&&!0===t.enabled&&"dynamic"!==t.type&&"cubicBezier"!==t.type||this.edgeType instanceof _&&!1===t.type.enabled)&&(i=!1),!0===i&&(e=this.cleanup())),!0===i?!0===t.enabled?"dynamic"===t.type?(e=!0,this.edgeType=new y(this.options,this.body,this.labelModule)):"cubicBezier"===t.type?this.edgeType=new g(this.options,this.body,this.labelModule):this.edgeType=new b(this.options,this.body,this.labelModule):this.edgeType=new _(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),e}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(t,e,i){if(void 0!==this.options.value){var o=this.options.scaling.customScalingFunction(t,e,i,this.options.value),n=this.options.scaling.max-this.options.scaling.min;if(!0===this.options.scaling.label.enabled){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+o*s}this.options.width=this.options.scaling.min+o*n}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(t){var e=this.getFormattingValues();if(!e.hidden){var i=this.edgeType.getViaNode(),o={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,e.fromArrow&&(o.from=this.edgeType.getArrowData(t,"from",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.fromPoint=o.from.core)),e.toArrow&&(o.to=this.edgeType.getArrowData(t,"to",i,this.selected,this.hover,e),!1===e.arrowStrikethrough&&(this.edgeType.toPoint=o.to.core)),e.middleArrow&&(o.middle=this.edgeType.getArrowData(t,"middle",i,this.selected,this.hover,e)),this.edgeType.drawLine(t,e,this.selected,this.hover,i),this.drawArrows(t,o,e),this.drawLabel(t,i)}}},{key:"drawArrows",value:function(t,e,i){i.fromArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.from),i.middleArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.middle),i.toArrow&&this.edgeType.drawArrowHead(t,i,this.selected,this.hover,e.to)}},{key:"drawLabel",value:function(t,e){if(void 0!==this.options.label){var i=this.from,o=this.to;if(this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(t,this.selected,this.hover),i.id!=o.id){this.labelModule.pointToSelf=!1;var n=this.edgeType.getPoint(.5,e);t.save();var s=this._getRotation(t);0!=s.angle&&(t.translate(s.x,s.y),t.rotate(s.angle)),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover),t.restore()}else{this.labelModule.pointToSelf=!0;var r,a,h=this.options.selfReferenceSize;i.shape.width>i.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),n=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,n.x,n.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(t){var e=[];if(this.labelModule.visible()){var i=this._getRotation();v.pointInRect(this.labelModule.getSize(),t,i)&&e.push({edgeId:this.id,labelId:0})}var o={left:t.x,top:t.y};return this.isOverlappingWith(o)&&e.push({edgeId:this.id}),e}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=this.from.x,i=this.from.y,o=this.to.x,n=this.to.y,s=t.left,r=t.top;return this.edgeType.getDistanceToEdge(e,i,o,n,s,r)<10}return!1}},{key:"_getRotation",value:function(t){var e=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,e);void 0!==t&&this.labelModule.calculateLabelSize(t,this.selected,this.hover,i.x,i.y);var o={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return o;if("horizontal"===this.options.font.align)return o;var n=this.from.y-this.to.y,s=this.from.x-this.to.x,r=Math.atan2(n,s);return(r<-1&&s<0||r>0&&s<0)&&(r+=Math.PI),o.angle=r,o}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=["arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width","font","chosen","widthConstraint"];if(f.selectiveDeepExtend(r,t,e,i),v.isValidLabel(e.label)?t.label=e.label:t.label=void 0,f.mergeOptions(t,e,"smooth",o),f.mergeOptions(t,e,"shadow",o),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:!0===i&&null===e.dashes&&(t.dashes=(0,d.default)(o.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),f.mergeOptions(t.scaling,e.scaling,"label",o.scaling)):!0===i&&null===e.scaling&&(t.scaling=(0,d.default)(o.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var h=e.arrows.toLowerCase();t.arrows.to.enabled=-1!=h.indexOf("to"),t.arrows.middle.enabled=-1!=h.indexOf("middle"),t.arrows.from.enabled=-1!=h.indexOf("from")}else{if("object"!==(0,a.default)(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+(0,s.default)(e.arrows));f.mergeOptions(t.arrows,e.arrows,"to",o.arrows),f.mergeOptions(t.arrows,e.arrows,"middle",o.arrows),f.mergeOptions(t.arrows,e.arrows,"from",o.arrows)}else!0===i&&null===e.arrows&&(t.arrows=(0,d.default)(o.arrows));if(void 0!==e.color&&null!==e.color){var l=e.color,u=t.color;if(n)f.deepExtend(u,o.color,!1,i);else for(var c in u)u.hasOwnProperty(c)&&delete u[c];if(f.isString(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,void 0===l.opacity&&(u.opacity=1);else{var p=!1;void 0!==l.color&&(u.color=l.color,p=!0),void 0!==l.highlight&&(u.highlight=l.highlight,p=!0),void 0!==l.hover&&(u.hover=l.hover,p=!0),void 0!==l.inherit&&(u.inherit=l.inherit),void 0!==l.opacity&&(u.opacity=Math.min(1,Math.max(0,l.opacity))),!0===p?u.inherit=!1:void 0===u.inherit&&(u.inherit="from")}}else!0===i&&null===e.color&&(t.color=f.bridgeObject(o.color));!0===i&&null===e.font&&(t.font=f.bridgeObject(o.font))}}]),t}();e.default=w},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(118),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_findBorderPositionBezier",value:function(t,e){var i,o,n,s,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),h=0,d=0,l=1,u=this.to,c=!1;for(t.id===this.from.id&&(u=this.from,c=!0);d<=l&&h<10;){var p=.5*(d+l);if(i=this.getPoint(p,a),o=Math.atan2(u.y-i.y,u.x-i.x),n=u.distanceToBorder(e,o),s=Math.sqrt(Math.pow(i.x-u.x,2)+Math.pow(i.y-u.y,2)),r=n-s,Math.abs(r)<.2)break;r<0?!1===c?d=p:l=p:!1===c?l=p:d=p,h++}return i.t=p,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=t,f=e;for(d=1;d<10;d++)l=.1*d,u=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,c=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(p,f,u,c,n,s),a=h1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;ae.shape.boundingBox.left&&(s=e.shape.boundingBox.left),re.shape.boundingBox.top&&(o=e.shape.boundingBox.top),n1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;ae.x&&(s=e.x),re.y&&(o=e.y),nh;)o(a,i=e[h++])&&(~s(d,i)||d.push(i));return d}},function(t,e,i){var o=i(22),n=i(41),s=i(56)("IE_PROTO"),r=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=n(t),o(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?r:null}},function(t,e,i){var o=i(50),n=i(13)("toStringTag"),s="Arguments"==o(function(){return arguments}()),r=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,i,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=r(e=Object(t),n))?i:s?o(e):"Object"==(a=o(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,i){var o=i(17),n=i(7),s=i(28);t.exports=function(t,e){var i=(n.Object||{})[t]||Object[t],r={};r[t]=e(i),o(o.S+o.F*s(function(){i(1)}),"Object",r)}},function(t,e,i){var o=i(84),n=i(58).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,n)}},function(t,e,i){var o=i(42),n=i(39),s=i(25),r=i(53),a=i(22),h=i(81),d=Object.getOwnPropertyDescriptor;e.f=i(21)?d:function(t,e){if(t=s(t),e=r(e,!0),h)try{return d(t,e)}catch(t){}if(a(t,e))return n(!o.f.call(t,e),t[e])}},function(t,e,i){t.exports={default:i(162),__esModule:!0}},function(t,e,i){function o(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=o},function(t,e,i){function o(t,e){if(void 0===t)throw new Error("No container element defined");if(this.container=t,this.visible=!e||void 0==e.visible||e.visible,this.visible){this.frame=document.createElement("DIV"),this.frame.style.width="100%",this.frame.style.position="relative",this.container.appendChild(this.frame),this.frame.prev=document.createElement("INPUT"),this.frame.prev.type="BUTTON",this.frame.prev.value="Prev",this.frame.appendChild(this.frame.prev),this.frame.play=document.createElement("INPUT"),this.frame.play.type="BUTTON",this.frame.play.value="Play",this.frame.appendChild(this.frame.play),this.frame.next=document.createElement("INPUT"),this.frame.next.type="BUTTON",this.frame.next.value="Next",this.frame.appendChild(this.frame.next),this.frame.bar=document.createElement("INPUT"),this.frame.bar.type="BUTTON",this.frame.bar.style.position="absolute",this.frame.bar.style.border="1px solid red",this.frame.bar.style.width="100px",this.frame.bar.style.height="6px",this.frame.bar.style.borderRadius="2px",this.frame.bar.style.MozBorderRadius="2px",this.frame.bar.style.border="1px solid #7F7F7F",this.frame.bar.style.backgroundColor="#E5E5E5",this.frame.appendChild(this.frame.bar),this.frame.slide=document.createElement("INPUT"),this.frame.slide.type="BUTTON",this.frame.slide.style.margin="0px",this.frame.slide.value=" ",this.frame.slide.style.position="relative",this.frame.slide.style.left="-100px",this.frame.appendChild(this.frame.slide);var i=this;this.frame.slide.onmousedown=function(t){i._onMouseDown(t)},this.frame.prev.onclick=function(t){i.prev(t)},this.frame.play.onclick=function(t){i.togglePlay(t)},this.frame.next.onclick=function(t){i.next(t)}}this.onChangeCallback=void 0,this.values=[],this.index=void 0,this.playTimeout=void 0,this.playInterval=1e3,this.playLoop=!0}var n=i(2);o.prototype.prev=function(){var t=this.getIndex();t>0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(tthis.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10;return t/(this.values.length-1)*e+3},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e,i){function o(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}o.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.prototype.setRange=function(t,e,i,o){if(!this.isNumeric(t))throw new Error("Parameter 'start' is not numeric; value: "+t);if(!this.isNumeric(e))throw new Error("Parameter 'end' is not numeric; value: "+t);if(!this.isNumeric(i))throw new Error("Parameter 'step' is not numeric; value: "+t);this._start=t||0,this._end=e||0,this.setStep(i,o)},o.prototype.setStep=function(t,e){void 0===t||t<=0||(void 0!==e&&(this.prettyStep=e),!0===this.prettyStep?this._step=o.calculatePrettyStep(t):this._step=t)},o.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),s<=0&&(s=1),s},o.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},o.prototype.getStep=function(){return this._step},o.prototype.start=function(t){void 0===t&&(t=!1),this._current=this._start-this._start%this._step,t&&this.getCurrent()this._end},t.exports=o},function(t,e,i){function o(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function n(t){return void 0===t||""===t||"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function s(t,e){return void 0===t||""===t?e:t+n(e)}function r(t,e,i,o){for(var n,r,a=0;ar&&(t=o(t)*r),i(e)>r&&(e=o(e)*r),this.cameraOffset.x=t,this.cameraOffset.y=e,this.calculateCameraOrientation()},o.prototype.getOffset=function(){return this.cameraOffset},o.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},o.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.setOffset(this.cameraOffset.x,this.cameraOffset.y),this.calculateCameraOrientation())}, +o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal;var t=this.cameraRotation.x,e=this.cameraRotation.z,i=this.cameraOffset.x,o=this.cameraOffset.y,n=Math.sin,s=Math.cos;this.cameraLocation.x=this.cameraLocation.x+i*s(e)+o*-n(e)*s(t),this.cameraLocation.y=this.cameraLocation.y+i*n(e)+o*s(e)*s(t),this.cameraLocation.z=this.cameraLocation.z+o*n(t)},t.exports=o},function(t,e,i){function o(t,e,i){this.dataGroup=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=t.getDistinctValues(this.column),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(12);o.prototype.isLoaded=function(){return this.loaded},o.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},o.prototype.getLabel=function(){return this.graph.filterLabel},o.prototype.getColumn=function(){return this.column},o.prototype.getSelectedValue=function(){if(void 0!==this.index)return this.values[this.index]},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");return this.values[t]},o.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];var e;if(this.dataPoints[t])e=this.dataPoints[t];else{var i={};i.column=this.column,i.value=this.values[t];var o=new n(this.dataGroup.getDataSet(),{filter:function(t){return t[i.column]==i.value}}).get();e=this.dataGroup._getDataPoints(o),this.dataPoints[t]=e}return e},o.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},o.prototype.selectValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");this.index=t,this.value=this.values[t]},o.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0){var n=i.groupsData.getDataSet();n.get().forEach(function(t){if(t.nestedGroups){0!=t.showNested&&(t.showNested=!0);var e=[];t.nestedGroups.forEach(function(i){var o=n.get(i);o&&(o.nestedInGroup=t.id,0==t.showNested&&(o.visible=!1),e=e.concat(o))}),n.update(e,o)}})}},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.touchParams={},this.groupTouchParams={},this._create(),this.setOptions(e)}var s=i(29),r=o(s),a=i(6),h=o(a),d=i(10),l=i(2),u=i(11),c=i(12),p=i(66),f=i(16),m=i(68),v=i(69),g=i(101),y=i(102),b=i(70),_=i(103),w=i(104).default,x="__ungrouped__",k="__background__";n.prototype=new f,n.types={background:_,box:g,range:b,point:y},n.prototype._create=function(){var t=document.createElement("div");t.className="vis-itemset",t["timeline-itemset"]=this,this.dom.frame=t;var e=document.createElement("div");e.className="vis-background",t.appendChild(e),this.dom.background=e;var i=document.createElement("div");i.className="vis-foreground",t.appendChild(i),this.dom.foreground=i;var o=document.createElement("div");o.className="vis-axis",this.dom.axis=o;var n=document.createElement("div");n.className="vis-labelset",this.dom.labelSet=n,this._updateUngrouped();var s=new v(k,null,this);s.show(),this.groups[k]=s,this.hammer=new d(this.body.dom.centerContainer),this.hammer.on("hammer.input",function(t){t.isFirst&&this._onTouch(t)}.bind(this)),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:d.DIRECTION_HORIZONTAL}),this.hammer.on("tap",this._onSelectItem.bind(this)),this.hammer.on("press",this._onMultiSelectItem.bind(this)),this.hammer.on("doubletap",this._onAddItem.bind(this)),this.options.rtl?this.groupHammer=new d(this.body.dom.rightContainer):this.groupHammer=new d(this.body.dom.leftContainer),this.groupHammer.on("tap",this._onGroupClick.bind(this)),this.groupHammer.on("panstart",this._onGroupDragStart.bind(this)),this.groupHammer.on("panmove",this._onGroupDrag.bind(this)),this.groupHammer.on("panend",this._onGroupDragEnd.bind(this)),this.groupHammer.get("pan").set({threshold:5,direction:d.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",this._onMouseOver.bind(this)),this.body.dom.centerContainer.addEventListener("mouseout",this._onMouseOut.bind(this)),this.body.dom.centerContainer.addEventListener("mousemove",this._onMouseMove.bind(this)),this.body.dom.centerContainer.addEventListener("contextmenu",this._onDragEnd.bind(this)),this.body.dom.centerContainer.addEventListener("mousewheel",this._onMouseWheel.bind(this)),this.show()},n.prototype.setOptions=function(t){if(t){var e=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","multiselectPerGroup","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime"];l.selectiveExtend(e,this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"===(0,h.default)(t.itemsAlwaysDraggable)&&(l.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,t.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"===(0,h.default)(t.orientation)&&"item"in t.orientation&&(this.options.orientation.item=t.orientation.item)),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin,this.options.margin.item.vertical=t.margin):"object"===(0,h.default)(t.margin)&&(l.selectiveExtend(["axis"],this.options.margin,t.margin),"item"in t.margin&&("number"==typeof t.margin.item?(this.options.margin.item.horizontal=t.margin.item,this.options.margin.item.vertical=t.margin.item):"object"===(0,h.default)(t.margin.item)&&l.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),"editable"in t&&("boolean"==typeof t.editable?(this.options.editable.updateTime=t.editable,this.options.editable.updateGroup=t.editable,this.options.editable.add=t.editable,this.options.editable.remove=t.editable,this.options.editable.overrideItems=!1):"object"===(0,h.default)(t.editable)&&l.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,t.editable)),"groupEditable"in t&&("boolean"==typeof t.groupEditable?(this.options.groupEditable.order=t.groupEditable,this.options.groupEditable.add=t.groupEditable,this.options.groupEditable.remove=t.groupEditable):"object"===(0,h.default)(t.groupEditable)&&l.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"].forEach(function(e){var i=t[e];if(i){if(!(i instanceof Function))throw new Error("option "+e+" must be a function "+e+"(item, callback)");this.options[e]=i}}.bind(this)),this.markDirty()}},n.prototype.markDirty=function(t){this.groupIds=[],t&&t.refreshItems&&l.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()})},n.prototype.destroy=function(){this.hide(),this.setItems(null),this.setGroups(null),this.hammer=null,this.body=null,this.conversion=null},n.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)},n.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))},n.prototype.setSelection=function(t){var e,i,o,n;for(void 0==t&&(t=[]),Array.isArray(t)||(t=[t]),e=0,i=this.selection.length;et&&o.push(h.id):h.lefte&&o.push(h.id)}return o},n.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;i0){for(var w={},x=0;x<_;x++)l.forEach(b,function(t,e){w[e]=t[x]()});l.forEach(this.groups,function(t,e){if(e!==k){var i=w[e];s=i||s,g+=t.height}}),g=Math.max(g,y)}return g=Math.max(g,y),r.style.height=i(g),this.props.width=r.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",this.initialItemSetDrawn=!0,s=this._isResized()||s},n.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[x]||null},n.prototype._updateUngrouped=function(){var t,e,i=this.groups[x];if(this.groupsData){if(i){i.hide(),delete this.groups[x];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){i=new m(null,null,this),this.groups[x]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},n.prototype.getLabelSet=function(){return this.dom.labelSet},n.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof u||t instanceof c))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(l.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;l.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},n.prototype.getItems=function(){return this.itemsData},n.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(l.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof u||t instanceof c))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.groupsData;this.groupsData instanceof c&&(o=this.groupsData.getDataSet()),o.get().forEach(function(t){t.nestedGroups&&t.nestedGroups.forEach(function(e){var i=o.get(e);i.nestedInGroup=t.id,0==t.showNested&&(i.visible=!1),o.update(i)})});var n=this.id;l.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,n)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},n.prototype.getGroups=function(){return this.groupsData},n.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},n.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},n.prototype._getGroupId=function(t){return"background"==this._getType(t)&&void 0==t.group?k:this.groupsData?t.group:x},n.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,o=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=o?e._getType(o):null,a=n.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,o):(i=s.selected,e._removeItem(s),s=null)),!s&&o){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(o,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.body.emitter.emit("_change",{queue:!0})},n.prototype._onAdd=n.prototype._onUpdate,n.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))},n.prototype._order=function(){l.forEach(this.groups,function(t){t.order()})},n.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},n.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==x||t==k)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=(0,r.default)(e.options);l.extend(n,{height:null}),o=new m(t,i,e),e.groups[t]=o;for(var s in e.items)if(e.items.hasOwnProperty(s)){var a=e.items[s];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})},n.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},n.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);var e=!l.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},n.prototype._orderNestedGroups=function(t){var e=[];return t.forEach(function(t){var i=this.groupsData.get(t);if(i.nestedInGroup||e.push(t),i.nestedGroups){var o=this.groupsData.get({filter:function(e){return e.nestedInGroup==t},order:this.options.groupOrder}),n=o.map(function(t){return t.id});e=e.concat(n)}},this),e},n.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)},n.prototype._updateItem=function(t,e){t.setData(e);var i=this._getGroupId(t.data),o=this.groups[i];o?o&&o.data&&o.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1},n.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},n.prototype._constructByEndArray=function(t){for(var e=[],i=0;in)return}}if(i&&i!=this.groupTouchParams.group){var a=e.get(i.groupId),h=e.get(this.groupTouchParams.group.groupId);h&&a&&(this.options.groupOrderSwap(h,a,e),e.update(h),e.update(a));var d=e.getIds({order:this.options.groupOrder});if(!l.equalArray(d,this.groupTouchParams.originalOrder))for(var u=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(u.length,d.length),m=0,v=0,g=0;m=f)break;if(d[m+v]==p)v=1;else if(u[m+g]==p)g=1;else{var y=d.indexOf(u[m+g]),b=e.get(d[m+v]),_=e.get(u[m+g]);this.options.groupOrderSwap(b,_,e),e.update(b),e.update(_);var w=d[m+v];d[m+v]=u[m+g],d[y]=w,m++}}}}},n.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=l.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!l.equalArray(n,e.groupTouchParams.originalOrder))for(var s=e.groupTouchParams.originalOrder,r=Math.min(s.length,n.length),a=0;a=r)break;var h=n.indexOf(s[a]),d=o.get(n[a]),u=o.get(s[a]);e.options.groupOrderSwap(d,u,o),o.update(d),o.update(u);var c=n[a];n[a]=s[a],n[h]=c,a++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},n.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);var o=this.getSelection(),n=this.itemFromTarget(t),s=n?[n.id]:[];this.setSelection(s);var r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}},n.prototype._onMouseOver=function(t){var e=this.itemFromTarget(t);if(e){if(e!==this.itemFromRelatedTarget(t)){var i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new w(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);var o=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-l.getAbsoluteLeft(o)+o.offsetLeft,t.clientY-l.getAbsoluteTop(o)+o.offsetTop),this.popup.show()}else null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}}},n.prototype._onMouseOut=function(t){var e=this.itemFromTarget(t);if(e){e!==this.itemFromRelatedTarget(t)&&(null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}},n.prototype._onMouseMove=function(t){if(this.itemFromTarget(t)&&this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden){var e=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-l.getAbsoluteLeft(e)+e.offsetLeft,t.clientY-l.getAbsoluteTop(e)+e.offsetTop),this.popup.show()}},n.prototype._onMouseWheel=function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)},n.prototype._onUpdateItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this;if(t){var i=e.itemsData.get(t.id);this.options.onUpdate(i,function(t){t&&e.itemsData.getDataSet().update(t)})}}},n.prototype._onDropObjectOnItem=function(t){var e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)},n.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e,i,o=this,n=this.options.snap||null;this.options.rtl?(e=l.getAbsoluteRight(this.dom.frame),i=e-t.center.x):(e=l.getAbsoluteLeft(this.dom.frame),i=t.center.x-e);var s,r,a=this.body.util.toTime(i),h=this.body.util.getScale(),d=this.body.util.getStep();"drop"==t.type?(r=JSON.parse(t.dataTransfer.getData("text")),r.content=r.content?r.content:"new item",r.start=r.start?r.start:n?n(a,h,d):a,r.type=r.type||"box",r[this.itemsData._fieldId]=r.id||l.randomUUID(),"range"!=r.type||r.end||(s=this.body.util.toTime(i+this.props.width/5),r.end=n?n(s,h,d):s)):(r={start:n?n(a,h,d):a,content:"new item"},r[this.itemsData._fieldId]=l.randomUUID(),"range"===this.options.type&&(s=this.body.util.toTime(i+this.props.width/5),r.end=n?n(s,h,d):s));var u=this.groupFromTarget(t);u&&(r.group=u.groupId),r=this._cloneItemData(r),this.options.onAdd(r,function(e){e&&(o.itemsData.getDataSet().add(e),"drop"==t.type&&o.setSelection([e.id]))})}},n.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){ +var i=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1)&&this.options.multiselect){var o=this.itemsData.get(e.id).group,s=void 0;this.options.multiselectPerGroup&&i.length>0&&(s=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=s&&s!=o||i.push(e.id);var r=n._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||s==o){i=[];for(var a in this.items)if(this.items.hasOwnProperty(a)){var h=this.items[a],d=h.data.start,l=void 0!==h.data.end?h.data.end:d;!(d>=r.min&&l<=r.max)||this.options.multiselectPerGroup&&s!=this.itemsData.get(h.id).group||h instanceof _||i.push(h.id)}}}else{var u=i.indexOf(e.id);-1==u?i.push(e.id):i.splice(u,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},n._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},n.prototype.itemFromElement=function(t){for(var e=t;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},n.prototype.itemFromTarget=function(t){return this.itemFromElement(t.target)},n.prototype.itemFromRelatedTarget=function(t){return this.itemFromElement(t.relatedTarget)},n.prototype.groupFromTarget=function(t){var e=t.center?t.center.y:t.clientY,i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(var o=0;oa&&ea)return s}else if(0===o&&es&&(s=r.top+r.height)}while(a)}}o.height=s-o.top+.5*i.item.vertical},e.nostack=function(t,i,o,n){for(var s=0;so[r].index&&e.collisionByTimes(o[n],o[r])){s=o[r];break}null!=s&&(o[n].top=s.top+s.height)}while(s)}for(var a=0;ao[h].index&&(o[r].top+=o[h].height);for(var d=t[r],l=0;le.right&&t.top-i.vertical+.001e.top:t.left-i.horizontal+.001e.left&&t.top-i.vertical+.001e.top},e.collisionByTimes=function(t,e){return t.start<=e.start&&t.end>=e.start&&t.tope.top||e.start<=t.start&&e.end>=t.start&&e.topt.top}},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},this.options=i,t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(38);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=this.options.align,i=this.width*t.getMillisecondsPerPixel();return"right"==e?this.data.start.getTime()>t.start&&this.data.start.getTime()-it.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-i/2t.start&&this.data.startt.start},o.prototype._createDomElement=function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)},o.prototype._appendDomElement=function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0},o.prototype._updateDirtyDomComponents=function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}},o.prototype._getDomComponentsSizes=function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}},o.prototype._updateDomComponentsSizes=function(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1},o.prototype._repaintDomAdditionals=function(){},o.prototype.redraw=function(t){var e,i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes.bind(this)())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];if(t)return i;var o;return i.forEach(function(t){o=t()}),o},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e,i=this.options.orientation.item;if(void 0!==this.data.subgroup){var o=this.data.subgroup;this.dom.box.style.height=this.parent.subgroups[o].height+"px",this.dom.box.style.top="top"==i?this.parent.top+this.parent.subgroups[o].top+"px":this.parent.top+this.parent.height-this.parent.subgroups[o].top-this.parent.subgroups[o].height+"px",this.dom.box.style.bottom=""}else this.parent instanceof s?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom="bottom"==i?"0":"",this.dom.box.style.top="top"==i?"0":""):(e=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=e+"px"},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(e,i){(0,s.default)(this,t),this.container=e,this.overflowMethod=i||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return(0,a.default)(t,[{key:"setPosition",value:function(t,e){this.x=parseInt(t),this.y=parseInt(e)}},{key:"setText",value:function(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=t}},{key:"show",value:function(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,o=this.frame.parentNode.clientHeight,n=this.frame.parentNode.clientWidth,s=0,r=0;if("flip"==this.overflowMethod){var a=!1,h=!0;this.y-en-this.padding&&(a=!0),s=a?this.x-i:this.x,r=h?this.y-e:this.y}else r=this.y-e,r+e+this.padding>o&&(r=o-e-this.padding),rn&&(s=n-i-this.padding),s0){var r={};for(this._getRelevantData(s,r,o,n),this._applySampling(s,r),e=0;e0)switch(t.options.style){case"line":d.hasOwnProperty(s[e])||(d[s[e]]=m.calcPath(r[s[e]],t)),m.draw(d[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||v.draw(r[s[e]],t,this.framework)}}}return a.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,t[a].y=0==o?t[a].orginalY+r.y:t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var n,s,a,h;if(t.length>0)for(s=0;s0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;l0){for(s=0;s0&&(n=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(o):h=h.concat(o):i[t[s]]=n.getYRange(o,t[s]));f.getStackedYRange(a,i,t,"__barStackLeft","left"),f.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;ui?i:a,d=di?i:h,l=l=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),!0===t.master&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var r=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(r=this.props.titleCharHeight);var h=!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-h&&!0===this.options.visible?(this.width=this.maxLabelSize+h,this.options.width=this.width+"px",a.cleanupElements(this.DOMelements.lines),a.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+h),this.options.width=this.width+"px",a.cleanupElements(this.DOMelements.lines),a.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(a.cleanupElements(this.DOMelements.lines),a.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var s=a.getDOMElement("div",this.DOMelements.labels,this.dom.frame);s.className=o,s.innerHTML=e,"left"===i?(s.style.left="-"+this.options.labelOffsetX+"px",s.style.textAlign="right"):(s.style.right="-"+this.options.labelOffsetX+"px",s.style.textAlign="left"),s.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=n,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=o,this.formattingFunction=a,i||o){var h=this,d=function(t){var e=t-t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx]);return t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx])>h.magnitudefactor*h.minorSteps[h.minorStepIdx]*.5?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}o.prototype.setCharHeight=function(t){this.majorCharHeight=t},o.prototype.setHeight=function(t){this.containerHeight=t},o.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;i<0&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(!0===n)break}},o.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0},o.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},o.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},o.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},o.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},o.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&ue.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];r.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),r.mergeOptions(this.options,t,"interpolation"),r.mergeOptions(this.options,t,"drawPoints"),r.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==(0,s.default)(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":h.drawIcon(this,o,n,t,e,i);break;case"points":case"point":d.drawIcon(this,o,n,t,e,i);break;case"bar":a.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=t0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){return 1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var u={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,u,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o,n=e;if(i)for(o=t.length-2;o>0;o--)n+=t[o][0]+","+t[o][1]+" ";else for(o=1;o0&&(f=1/f),m=3*v*(v+g),m>0&&(m=1/m),a={screen_x:(-b*o.screen_x+c*n.screen_x+_*s.screen_x)*f,screen_y:(-b*o.screen_y+c*n.screen_y+_*s.screen_y)*f},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*m,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;i");this.dom.textArea.innerHTML=r,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=(0,s.default)(this.groups);t.sort(function(t,e){return t=0;i--){var a=s[i];a.nodes||(a.nodes=[]),-1===a.nodes.indexOf(n)&&a.nodes.push(n)}e.attr&&(n.attr=h(n.attr,e.attr))}function u(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=h({},t.edge);e.attr=h(i,e.attr)}}function c(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=h({},t.edge)),s.attr=h(s.attr||{},n),s}function p(){for(F=I.NULL,L="";" "===z||"\t"===z||"\n"===z||"\r"===z;)s();do{var t=!1;if("#"===z){for(var e=A-1;" "===R.charAt(e)||"\t"===R.charAt(e);)e--;if("\n"===R.charAt(e)||""===R.charAt(e)){for(;""!=z&&"\n"!=z;)s();t=!0}}if("/"===z&&"/"===r()){for(;""!=z&&"\n"!=z;)s();t=!0}if("/"===z&&"*"===r()){for(;""!=z;){if("*"===z&&"/"===r()){s(),s();break}s()}t=!0}for(;" "===z||"\t"===z||"\n"===z||"\r"===z;)s()}while(t);if(""===z)return void(F=I.DELIMITER);var i=z+r();if(N[i])return F=I.DELIMITER,L=i,s(),void s();if(N[z])return F=I.DELIMITER,L=z,void s();if(a(z)||"-"===z){for(L+=z,s();a(z);)L+=z,s();return"false"===L?L=!1:"true"===L?L=!0:isNaN(Number(L))||(L=Number(L)),void(F=I.IDENTIFIER)}if('"'===z){for(s();""!=z&&('"'!=z||'"'===z&&'"'===r());)'"'===z?(L+=z,s()):"\\"===z&&"n"===r()?(L+="\n",s()):L+=z,s();if('"'!=z)throw x('End of string " expected');return s(),void(F=I.IDENTIFIER)}for(F=I.UNKNOWN;""!=z;)L+=z,s();throw new SyntaxError('Syntax error in part "'+k(L,30)+'"')}function f(){var t={};if(n(),p(),"strict"===L&&(t.strict=!0,p()),"graph"!==L&&"digraph"!==L||(t.type=L,p()),F===I.IDENTIFIER&&(t.id=L,p()),"{"!=L)throw x("Angle bracket { expected");if(p(),m(t),"}"!=L)throw x("Angle bracket } expected");if(p(),""!==L)throw x("End of file expected");return p(),delete t.node,delete t.edge,delete t.graph,t}function m(t){for(;""!==L&&"}"!=L;)v(t),";"===L&&p()}function v(t){var e=g(t);if(e)return void _(t,e);if(!y(t)){if(F!=I.IDENTIFIER)throw x("Identifier expected");var i=L;if(p(),"="===L){if(p(),F!=I.IDENTIFIER)throw x("Identifier expected");t[i]=L,p()}else b(t,i)}}function g(t){var e=null;if("subgraph"===L&&(e={},e.type="subgraph",p(),F===I.IDENTIFIER&&(e.id=L,p())),"{"===L){if(p(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,m(e),"}"!=L)throw x("Angle bracket } expected");p(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function y(t){return"node"===L?(p(),t.node=w(),"node"):"edge"===L?(p(),t.edge=w(),"edge"):"graph"===L?(p(),t.graph=w(),"graph"):null}function b(t,e){var i={id:e},o=w();o&&(i.attr=o),l(t,i),_(t,e)}function _(t,e){for(;"->"===L||"--"===L;){var i,o=L;p();var n=g(t);if(n)i=n;else{if(F!=I.IDENTIFIER)throw x("Identifier or subgraph expected");i=L,l(t,{id:i}),p()}u(t,c(t,e,i,o,w())),e=i}}function w(){for(var t=null,e={dashed:!0,solid:!1,dotted:[1,5]};"["===L;){for(p(),t={};""!==L&&"]"!=L;){if(F!=I.IDENTIFIER)throw x("Attribute name expected");var i=L;if(p(),"="!=L)throw x("Equal sign = expected");if(p(),F!=I.IDENTIFIER)throw x("Attribute value expected");var o=L;"style"===i&&(o=e[o]),d(t,i,o),p(),","==L&&p()}if("]"!=L)throw x("Bracket ] expected");p()}return t}function x(t){return new SyntaxError(t+', got "'+k(L,30)+'" (char '+A+")")}function k(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function S(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function D(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},R="",A=0,z="",L="",F=I.NULL,B=/[a-zA-Z_0-9.:#]/;e.parseDOT=o,e.DOTToGraph=C},function(t,e,i){function o(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;a2&&void 0!==arguments[2]&&arguments[2];(0,d.default)(this,t),this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(i),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=o}return(0,u.default)(t,[{key:"setOptions",value:function(t){if(this.elementOptions=t,this.initFontOptions(t.font),p.isValidLabel(t.label)?this.labelDirty=!0:t.label="",void 0!==t.font&&null!==t.font)if("string"==typeof t.font)this.baseSize=this.fontOptions.size;else if("object"===(0,a.default)(t.font)){var e=t.font.size;void 0!==e&&(this.baseSize=e)}}},{key:"initFontOptions",value:function(e){var i=this;if(c.forEach(m,function(t){i.fontOptions[t]={}}),t.parseFontString(this.fontOptions,e))return void(this.fontOptions.vadjust=0);c.forEach(e,function(t,e){void 0!==t&&null!==t&&"object"!==(void 0===t?"undefined":(0,a.default)(t))&&(i.fontOptions[e]=t)})}},{key:"constrain",value:function(t){var e={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=c.topMost(t,"widthConstraint");if("number"==typeof i)e.maxWdt=Number(i),e.minWdt=Number(i);else if("object"===(void 0===i?"undefined":(0,a.default)(i))){var o=c.topMost(t,["widthConstraint","maximum"]);"number"==typeof o&&(e.maxWdt=Number(o));var n=c.topMost(t,["widthConstraint","minimum"]);"number"==typeof n&&(e.minWdt=Number(n))}var s=c.topMost(t,"heightConstraint");if("number"==typeof s)e.minHgt=Number(s);else if("object"===(void 0===s?"undefined":(0,a.default)(s))){var r=c.topMost(t,["heightConstraint","minimum"]);"number"==typeof r&&(e.minHgt=Number(r));var h=c.topMost(t,["heightConstraint","valign"]);"string"==typeof h&&("top"!==h&&"bottom"!==h||(e.valign=h))}return e}},{key:"update",value:function(t,e){this.setOptions(t,!0),this.propagateFonts(e),c.deepExtend(this.fontOptions,this.constrain(e)),this.fontOptions.chooser=p.choosify("label",e)}},{key:"adjustSizes",value:function(t){var e=t?t.right+t.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=e,this.fontOptions.minWdt-=e);var i=t?t.top+t.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(t,e){for(var i=0;i5&&void 0!==arguments[5]?arguments[5]:"middle";if(void 0!==this.elementOptions.label){var r=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&r=this.elementOptions.scaling.label.maxVisible&&(r=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(t,o,n,e,i,s),this._drawBackground(t),this._drawText(t,e,this.size.yLine,s,r))}}},{key:"_drawBackground",value:function(t){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){t.fillStyle=this.fontOptions.background;var e=this.getSize();t.fillRect(e.left,e.top,e.width,e.height)}}},{key:"_drawText",value:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle",n=arguments[4],r=this._setAlignment(t,e,i,o),a=(0,s.default)(r,2);e=a[0],i=a[1],t.textAlign="left",e-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(i-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(i+=(this.size.height-this.size.labelHeight)/2));for(var h=0;h0&&(t.lineWidth=c.strokeWidth,t.strokeStyle=v,t.lineJoin="round"),t.fillStyle=m,c.strokeWidth>0&&t.strokeText(c.text,e+l,i+c.vadjust),t.fillText(c.text,e+l,i+c.vadjust),l+=c.width}i+=d.height}}}},{key:"_setAlignment",value:function(t,e,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf){e=0,i=0;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=4):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=4):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t,e,i){var o=t||"#000000",n=i||"#ffffff";if(e<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-e)));o=c.overrideOpacity(o,s),n=c.overrideOpacity(n,s)}return[o,n]}},{key:"getTextSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._processLabel(t,e,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var t=this.size.left,e=this.size.top-1;if(this.isEdgeLabel){var i=.5*-this.size.width;switch(this.fontOptions.align){case"middle":t=i,e=.5*-this.size.height;break;case"top":t=i,e=-(this.size.height+2);break;case"bottom":t=i,e=2}}return{left:t,top:e,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(t,e,i),this.size.left=o-.5*this.size.width,this.size.top=n-.5*this.size.height,this.size.yLine=n+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===s&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(t,e,i,o){var n=function(t,e,i){return"normal"===e?"mod"===i?"":t[i]:void 0!==t[e][i]?t[e][i]:t[i]},s={color:n(this.fontOptions,o,"color"),size:n(this.fontOptions,o,"size"),face:n(this.fontOptions,o,"face"),mod:n(this.fontOptions,o,"mod"),vadjust:n(this.fontOptions,o,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(e||i)&&("normal"===o&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?s.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(s,this.elementOptions.id,e,i));var r="";return void 0!==s.mod&&""!==s.mod&&(r+=s.mod+" "),r+=s.size+"px "+s.face,t.font=r.replace(/"/g,""),s.font=t.font,s.height=s.size,s}},{key:"differentState",value:function(t,e){return t!==this.selectedState||e!==this.hoverState}},{key:"_processLabelText",value:function(t,e,i,o){return new f(t,this,e,i).process(o)}},{key:"_processLabel",value:function(t,e,i){if(!1!==this.labelDirty||this.differentState(e,i)){var o=this._processLabelText(t,e,i,this.elementOptions.label);this.fontOptions.minWdt>0&&o.width0&&o.heighto.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=0,d=this.options.selfReferenceSize,l=void 0,u=void 0,c=void 0,p=void 0,f=void 0,m=.5*(s+r);s<=r&&h<10&&(m=.5*(s+r),l=this._pointOnCircle(o,n,d,m),u=Math.atan2(t.y-l.y,t.x-l.x),c=t.distanceToBorder(e,u),p=Math.sqrt(Math.pow(l.x-t.x,2)+Math.pow(l.y-t.y,2)),f=c-p,!(Math.abs(f)<.05));)f>0?a>0?s=m:r=m:a>0?r=m:s=m,h++;return l.t=m,l}},{key:"getLineWidth",value:function(t,e){return!0===t?Math.max(this.selectionWidth,.3/this.body.view.scale):!0===e?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i,o){if(!1!==e.inheritsColor){if("both"===e.inheritsColor&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,r=void 0;return s=this.from.options.color.highlight.border,r=this.to.options.color.highlight.border,!1===this.from.selected&&!1===this.to.selected?(s=l.overrideOpacity(this.from.options.color.border,e.opacity),r=l.overrideOpacity(this.to.options.color.border,e.opacity)):!0===this.from.selected&&!1===this.to.selected?r=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,r),n}return"to"===e.inheritsColor?l.overrideOpacity(this.to.options.color.border,e.opacity):l.overrideOpacity(this.from.options.color.border,e.opacity)}return l.overrideOpacity(e.color,e.opacity)}},{key:"_circle", +value:function(t,e,i,o,n){this.enableShadow(t,e),t.beginPath(),t.arc(i,o,n,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t,e)}},{key:"getDistanceToEdge",value:function(t,e,i,o,n,r,a,h){var d=0;if(this.from!=this.to)d=this._getDistanceToEdge(t,e,i,o,n,r,a);else{var l=this._getCircleData(void 0),u=(0,s.default)(l,3),c=u[0],p=u[1],f=u[2],m=c-n,v=p-r;d=Math.abs(Math.sqrt(m*m+v*v)-f)}return d}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:d<0&&(d=0);var l=t+d*r,u=e+d*a,c=l-n,p=u-s;return Math.sqrt(c*c+p*p)}},{key:"getArrowData",value:function(t,e,i,o,n,r){var a=void 0,h=void 0,d=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=r.width;if("from"===e?(d=this.from,l=this.to,u=.1,c=r.fromArrowScale,p=r.fromArrowType):"to"===e?(d=this.to,l=this.from,u=-.1,c=r.toArrowScale,p=r.toArrowType):(d=this.to,l=this.from,c=r.middleArrowScale,p=r.middleArrowType),d!=l)if("middle"!==e)if(!0===this.options.smooth.enabled){h=this.findBorderPosition(d,t,{via:i});var m=this.getPoint(Math.max(0,Math.min(1,h.t+u)),i);a=Math.atan2(h.y-m.y,h.x-m.x)}else a=Math.atan2(d.y-l.y,d.x-l.x),h=this.findBorderPosition(d,t);else a=Math.atan2(d.y-l.y,d.x-l.x),h=this.getPoint(.5,i);else{var v=this._getCircleData(t),g=(0,s.default)(v,3),y=g[0],b=g[1],_=g[2];"from"===e?(h=this.findBorderPosition(this.from,t,{x:y,y:b,low:.25,high:.6,direction:-1}),a=-2*h.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(h=this.findBorderPosition(this.from,t,{x:y,y:b,low:.6,high:1,direction:1}),a=-2*h.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(h=this._pointOnCircle(y,b,_,.175),a=3.9269908169872414)}"middle"===e&&c<0&&(f*=-1);var w=15*c+3*f;return{point:h,core:{x:h.x-.9*w*Math.cos(a),y:h.y-.9*w*Math.sin(a)},angle:a,length:w,type:p}}},{key:"drawArrowHead",value:function(t,e,i,o,n){t.strokeStyle=this.getColor(t,e,i,o),t.fillStyle=t.strokeStyle,t.lineWidth=e.width,u.draw(t,n),this.enableShadow(t,e),t.fill(),this.disableShadow(t,e)}},{key:"enableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowSize,t.shadowOffsetX=e.shadowX,t.shadowOffsetY=e.shadowY)}},{key:"disableShadow",value:function(t,e){!0===e.shadow&&(t.shadowColor="rgba(0,0,0,0)",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}]),t}();e.default=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(4),a=o(r),h=i(5),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=function(){function t(){(0,u.default)(this,t)}return(0,p.default)(t,null,[{key:"transform",value:function(t,e){t instanceof Array||(t=[t]);for(var i=e.point.x,o=e.point.y,n=e.angle,s=e.length,r=0;r0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;s0&&this._getForceContributions(n.root,t)}}},{key:"_getForceContributions",value:function(t,e){this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?this._getForceContributions(t,e):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&o.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;h0&&(lr&&(r=l),ua&&(a=u))}var c=Math.abs(r-n)-Math.abs(a-s);c>0?(s-=.5*c,a+=.5*c):(n+=.5*c,r-=.5*c);var p=Math.max(1e-5,Math.abs(r-n)),f=.5*p,m=.5*(n+r),v=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-f,maxX:m+f,minY:v-f,maxY:v+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var y=0;y0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.centerOfMass,o=t.mass+e.options.mass,n=1/o;i.x=i.x*t.mass+e.x*e.options.mass,i.x*=n,i.y=i.y*t.mass+e.y*e.options.mass,i.y*=n,t.mass=o;var s=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?o.maxY>e.y?"NW":"SW":o.maxY>e.y?"NE":"SE",this._placeInRegion(t,e,n)}},{key:"_placeInRegion",value:function(t,e,i){var o=t.children[i];switch(o.childrenCount){case 0:o.children.data=e,o.childrenCount=1,this._updateBranchMass(o,e);break;case 1:o.children.data.x===e.x&&o.children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(o),this._placeInTree(o,e));break;case 4:this._placeInTree(o,e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e.default=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(e,i,o){(0,s.default)(this,t),this.body=e,this.physicsBody=i,this.setOptions(o)}return(0,a.default)(t,[{key:"setOptions",value:function(t){this.options=t}},{key:"solve",value:function(){for(var t=void 0,e=void 0,i=void 0,o=void 0,n=this.body.nodes,s=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,a=0;a=t.length?(this._t=void 0,n(1)):"keys"==e?n(0,i):"values"==e?n(0,t[i]):n(0,[i,t[i]])},"values"),s.Arguments=s.Array,o("keys"),o("values"),o("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){var o=i(54),n=i(39),s=i(59),r={};i(26)(r,i(13)("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=o(r,{next:n(1,i)}),s(t,e+" Iterator")}},function(t,e,i){var o=i(20),n=i(27),s=i(33);t.exports=i(21)?Object.defineProperties:function(t,e){n(t);for(var i,r=s(e),a=r.length,h=0;a>h;)o.f(t,i=r[h++],e[i]);return t}},function(t,e,i){var o=i(25),n=i(132),s=i(133);t.exports=function(t){return function(e,i,r){var a,h=o(e),d=n(h.length),l=s(r,d);if(t&&i!=i){for(;d>l;)if((a=h[l++])!=a)return!0}else for(;d>l;l++)if((t||l in h)&&h[l]===i)return t||l||0;return!t&&-1}}},function(t,e,i){var o=i(55),n=Math.min;t.exports=function(t){return t>0?n(o(t),9007199254740991):0}},function(t,e,i){var o=i(55),n=Math.max,s=Math.min;t.exports=function(t,e){return t=o(t),t<0?n(t+e,0):s(t,e)}},function(t,e,i){var o=i(18).document;t.exports=o&&o.documentElement},function(t,e,i){var o=i(55),n=i(51);t.exports=function(t){return function(e,i){var s,r,a=String(n(e)),h=o(i),d=a.length;return h<0||h>=d?t?"":void 0:(s=a.charCodeAt(h),s<55296||s>56319||h+1===d||(r=a.charCodeAt(h+1))<56320||r>57343?t?a.charAt(h):s:t?a.slice(h,h+2):r-56320+(s-55296<<10)+65536)}}},function(t,e,i){var o=i(27),n=i(137);t.exports=i(7).getIterator=function(t){var e=n(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return o(e.call(t))}},function(t,e,i){var o=i(86),n=i(13)("iterator"),s=i(31);t.exports=i(7).getIteratorMethod=function(t){if(void 0!=t)return t[n]||t["@@iterator"]||s[o(t)]}},function(t,e,i){i(139);var o=i(7).Object;t.exports=function(t,e){return o.create(t,e)}},function(t,e,i){var o=i(17);o(o.S,"Object",{create:i(54)})},function(t,e,i){i(141),t.exports=i(7).Object.keys},function(t,e,i){var o=i(41),n=i(33);i(87)("keys",function(){return function(t){return n(o(t))}})},function(t,e,i){t.exports={default:i(143),__esModule:!0}},function(t,e,i){i(60),i(49),t.exports=i(61).f("iterator")},function(t,e,i){t.exports={default:i(145),__esModule:!0}},function(t,e,i){i(146),i(151),i(152),i(153),t.exports=i(7).Symbol},function(t,e,i){var o=i(18),n=i(22),s=i(21),r=i(17),a=i(83),h=i(147).KEY,d=i(28),l=i(57),u=i(59),c=i(40),p=i(13),f=i(61),m=i(62),v=i(148),g=i(149),y=i(27),b=i(25),_=i(53),w=i(39),x=i(54),k=i(150),S=i(89),D=i(20),M=i(33),C=S.f,O=D.f,E=k.f,T=o.Symbol,P=o.JSON,I=P&&P.stringify,N=p("_hidden"),R=p("toPrimitive"),A={}.propertyIsEnumerable,z=l("symbol-registry"),L=l("symbols"),F=l("op-symbols"),B=Object.prototype,j="function"==typeof T,H=o.QObject,W=!H||!H.prototype||!H.prototype.findChild,Y=s&&d(function(){return 7!=x(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a})?function(t,e,i){var o=C(B,e);o&&delete B[e],O(t,e,i),o&&t!==B&&O(B,e,o)}:O,G=function(t){var e=L[t]=x(T.prototype);return e._k=t,e},V=j&&"symbol"==typeof T.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof T},U=function(t,e,i){return t===B&&U(F,e,i),y(t),e=_(e,!0),y(i),n(L,e)?(i.enumerable?(n(t,N)&&t[N][e]&&(t[N][e]=!1),i=x(i,{enumerable:w(0,!1)})):(n(t,N)||O(t,N,w(1,{})),t[N][e]=!0),Y(t,e,i)):O(t,e,i)},q=function(t,e){y(t);for(var i,o=v(e=b(e)),n=0,s=o.length;s>n;)U(t,i=o[n++],e[i]);return t},X=function(t,e){return void 0===e?x(t):q(x(t),e)},Z=function(t){var e=A.call(this,t=_(t,!0));return!(this===B&&n(L,t)&&!n(F,t))&&(!(e||!n(this,t)||!n(L,t)||n(this,N)&&this[N][t])||e)},K=function(t,e){if(t=b(t),e=_(e,!0),t!==B||!n(L,e)||n(F,e)){var i=C(t,e);return!i||!n(L,e)||n(t,N)&&t[N][e]||(i.enumerable=!0),i}},J=function(t){for(var e,i=E(b(t)),o=[],s=0;i.length>s;)n(L,e=i[s++])||e==N||e==h||o.push(e);return o},$=function(t){for(var e,i=t===B,o=E(i?F:b(t)),s=[],r=0;o.length>r;)!n(L,e=o[r++])||i&&!n(B,e)||s.push(L[e]);return s};j||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var t=c(arguments.length>0?arguments[0]:void 0),e=function(i){this===B&&e.call(F,i),n(this,N)&&n(this[N],t)&&(this[N][t]=!1),Y(this,t,w(1,i))};return s&&W&&Y(B,t,{configurable:!0,set:e}),G(t)},a(T.prototype,"toString",function(){return this._k}),S.f=K,D.f=U,i(88).f=k.f=J,i(42).f=Z,i(63).f=$,s&&!i(52)&&a(B,"propertyIsEnumerable",Z,!0),f.f=function(t){return G(p(t))}),r(r.G+r.W+r.F*!j,{Symbol:T});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=M(p.store),it=0;et.length>it;)m(et[it++]);r(r.S+r.F*!j,"Symbol",{for:function(t){return n(z,t+="")?z[t]:z[t]=T(t)},keyFor:function(t){if(!V(t))throw TypeError(t+" is not a symbol!");for(var e in z)if(z[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),r(r.S+r.F*!j,"Object",{create:X,defineProperty:U,defineProperties:q,getOwnPropertyDescriptor:K,getOwnPropertyNames:J,getOwnPropertySymbols:$}),P&&r(r.S+r.F*(!j||d(function(){var t=T();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!V(t)){for(var e,i,o=[t],n=1;arguments.length>n;)o.push(arguments[n++]);return e=o[1],"function"==typeof e&&(i=e),!i&&g(e)||(e=function(t,e){if(i&&(e=i.call(this,t,e)),!V(e))return e}),o[1]=e,I.apply(P,o)}}}),T.prototype[R]||i(26)(T.prototype,R,T.prototype.valueOf),u(T,"Symbol"),u(Math,"Math",!0),u(o.JSON,"JSON",!0)},function(t,e,i){var o=i(40)("meta"),n=i(32),s=i(22),r=i(20).f,a=0,h=Object.isExtensible||function(){return!0},d=!i(28)(function(){return h(Object.preventExtensions({}))}),l=function(t){r(t,o,{value:{i:"O"+ ++a,w:{}}})},u=function(t,e){if(!n(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,o)){if(!h(t))return"F";if(!e)return"E";l(t)}return t[o].i},c=function(t,e){if(!s(t,o)){if(!h(t))return!0;if(!e)return!1;l(t)}return t[o].w},p=function(t){return d&&f.NEED&&h(t)&&!s(t,o)&&l(t),t},f=t.exports={KEY:o,NEED:!1,fastKey:u,getWeak:c,onFreeze:p}},function(t,e,i){var o=i(33),n=i(63),s=i(42);t.exports=function(t){var e=o(t),i=n.f;if(i)for(var r,a=i(t),h=s.f,d=0;a.length>d;)h.call(t,r=a[d++])&&e.push(r);return e}},function(t,e,i){var o=i(50);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,i){var o=i(25),n=i(88).f,s={}.toString,r="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return n(t)}catch(t){return r.slice()}};t.exports.f=function(t){return r&&"[object Window]"==s.call(t)?a(t):n(o(t))}},function(t,e){},function(t,e,i){i(62)("asyncIterator")},function(t,e,i){i(62)("observable")},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(0,function(){function e(){return Co.apply(null,arguments)}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function n(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}function s(t){return void 0===t}function r(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function a(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function h(t,e){var i,o=[];for(i=0;i0)for(i=0;i0?"future":"past"];return D(i)?i(e):i.replace(/%s/i,e)}function A(t,e){var i=t.toLowerCase();Lo[i]=Lo[i+"s"]=Lo[e]=t}function z(t){return"string"==typeof t?Lo[t]||Lo[t.toLowerCase()]:void 0}function L(t){var e,i,o={};for(i in t)d(t,i)&&(e=z(i))&&(o[e]=t[i]);return o}function F(t,e){Fo[t]=e}function B(t){var e=[];for(var i in t)e.push({unit:i,priority:Fo[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function j(t,e,i){var o=""+Math.abs(t),n=e-o.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function H(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(Wo[t]=n),e&&(Wo[e[0]]=function(){return j(n.apply(this,arguments),e[1],e[2])}),i&&(Wo[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function W(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Y(t){var e,i,o=t.match(Bo);for(e=0,i=o.length;e=0&&jo.test(t);)t=t.replace(jo,i),jo.lastIndex=0,o-=1;return t}function U(t,e,i){an[t]=D(e)?e:function(t,o){return t&&i?i:e}}function q(t,e){return d(an,t)?an[t](e._strict,e._locale):new RegExp(X(t))}function X(t){return Z(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function Z(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),r(e)&&(o=function(t,i){i[e]=_(t)}),i=0;i=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function _t(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function wt(t,e,i){var o=7+e-i;return-(7+_t(t,0,o).getUTCDay()-e)%7+o-1}function xt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=wt(t,o,n),d=1+7*(e-1)+a+h;return d<=0?(s=t-1,r=Q(s)+d):d>Q(t)?(s=t+1,r=d-Q(t)):(s=t,r=d),{year:s,dayOfYear:r}}function kt(t,e,i){var o,n,s=wt(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?(n=t.year()-1,o=r+St(n,e,i)):r>St(t.year(),e,i)?(o=r-St(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function St(t,e,i){var o=wt(t,e,i),n=wt(t+1,e,i);return(Q(t)-o+n)/7}function Dt(t){return kt(t,this._week.dow,this._week.doy).week}function Mt(){return this._week.dow}function Ct(){return this._week.doy}function Ot(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Et(t){var e=kt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Tt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Pt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function It(t,e){return t?i(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone}function Nt(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Rt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function At(t,e,i){var o,n,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=u([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?(n=yn.call(this._weekdaysParse,r),-1!==n?n:null):"ddd"===e?(n=yn.call(this._shortWeekdaysParse,r),-1!==n?n:null):(n=yn.call(this._minWeekdaysParse,r),-1!==n?n:null):"dddd"===e?-1!==(n=yn.call(this._weekdaysParse,r))?n:-1!==(n=yn.call(this._shortWeekdaysParse,r))?n:(n=yn.call(this._minWeekdaysParse,r),-1!==n?n:null):"ddd"===e?-1!==(n=yn.call(this._shortWeekdaysParse,r))?n:-1!==(n=yn.call(this._weekdaysParse,r))?n:(n=yn.call(this._minWeekdaysParse,r),-1!==n?n:null):-1!==(n=yn.call(this._minWeekdaysParse,r))?n:-1!==(n=yn.call(this._weekdaysParse,r))?n:(n=yn.call(this._shortWeekdaysParse,r),-1!==n?n:null)}function zt(t,e,i){var o,n,s;if(this._weekdaysParseExact)return At.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(n=u([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function Lt(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Tt(t,this.localeData()),this.add(t-e,"d")):e}function Ft(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Bt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Pt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function jt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=En),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ht(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Tn),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Pn),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Yt(){function t(t,e){return e.length-t.length}var e,i,o,n,s,r=[],a=[],h=[],d=[];for(e=0;e<7;e++)i=u([2e3,1]).day(e),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),h.push(s),d.push(o),d.push(n),d.push(s);for(r.sort(t),a.sort(t),h.sort(t),d.sort(t),e=0;e<7;e++)a[e]=Z(a[e]),h[e]=Z(h[e]),d[e]=Z(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Gt(){return this.hours()%12||12}function Vt(){return this.hours()||24}function Ut(t,e){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qt(t,e){return e._meridiemParse}function Xt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Zt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function Jt(t){for(var e,i,o,n,s=0;s0;){if(o=$t(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&w(n,i,!0)>=e-1)break;e--}s++}return null}function $t(e){var i=null;if(!zn[e]&&void 0!==t&&t&&t.exports)try{i=In._abbr;!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Qt(i)}catch(t){}return zn[e]}function Qt(t,e){var i;return t&&(i=s(e)?ie(t):te(t,e))&&(In=i),In._abbr}function te(t,e){if(null!==e){var i=An;if(e.abbr=t,null!=zn[t])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=zn[t]._config;else if(null!=e.parentLocale){if(null==zn[e.parentLocale])return Ln[e.parentLocale]||(Ln[e.parentLocale]=[]),Ln[e.parentLocale].push({name:t,config:e}),null;i=zn[e.parentLocale]._config}return zn[t]=new O(C(i,e)),Ln[t]&&Ln[t].forEach(function(t){te(t.name,t.config)}),Qt(t),zn[t]}return delete zn[t],null}function ee(t,e){if(null!=e){var i,o=An;null!=zn[t]&&(o=zn[t]._config),e=C(o,e),i=new O(e),i.parentLocale=zn[t],zn[t]=i,Qt(t)}else null!=zn[t]&&(null!=zn[t].parentLocale?zn[t]=zn[t].parentLocale:null!=zn[t]&&delete zn[t]);return zn[t]}function ie(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return In;if(!i(t)){if(e=$t(t))return e;t=[t]}return Jt(t)}function oe(){return Io(zn)}function ne(t){var e,i=t._a;return i&&-2===p(t).overflow&&(e=i[ln]<0||i[ln]>11?ln:i[un]<1||i[un]>ht(i[dn],i[ln])?un:i[cn]<0||i[cn]>24||24===i[cn]&&(0!==i[pn]||0!==i[fn]||0!==i[mn])?cn:i[pn]<0||i[pn]>59?pn:i[fn]<0||i[fn]>59?fn:i[mn]<0||i[mn]>999?mn:-1,p(t)._overflowDayOfYear&&(eun)&&(e=un),p(t)._overflowWeeks&&-1===e&&(e=vn),p(t)._overflowWeekday&&-1===e&&(e=gn),p(t).overflow=e),t}function se(t,e,i){return null!=t?t:null!=e?e:i}function re(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function ae(t){var e,i,o,n,s=[];if(!t._d){for(o=re(t),t._w&&null==t._a[un]&&null==t._a[ln]&&he(t),null!=t._dayOfYear&&(n=se(t._a[dn],o[dn]),(t._dayOfYear>Q(n)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),i=_t(n,0,t._dayOfYear),t._a[ln]=i.getUTCMonth(),t._a[un]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[cn]&&0===t._a[pn]&&0===t._a[fn]&&0===t._a[mn]&&(t._nextDay=!0,t._a[cn]=0),t._d=(t._useUTC?_t:bt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[cn]=24),t._w&&void 0!==t._w.d&&t._w.d!==t._d.getDay()&&(p(t).weekdayMismatch=!0)}}function he(t){var e,i,o,n,s,r,a,h;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)s=1,r=4,i=se(e.GG,t._a[dn],kt(De(),1,4).year),o=se(e.W,1),((n=se(e.E,1))<1||n>7)&&(h=!0);else{s=t._locale._week.dow,r=t._locale._week.doy;var d=kt(De(),s,r);i=se(e.gg,t._a[dn],d.year),o=se(e.w,d.week),null!=e.d?((n=e.d)<0||n>6)&&(h=!0):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s}o<1||o>St(i,s,r)?p(t)._overflowWeeks=!0:null!=h?p(t)._overflowWeekday=!0:(a=xt(i,o,n,s,r),t._a[dn]=a.year,t._dayOfYear=a.dayOfYear)}function de(t){var e,i,o,n,s,r,a=t._i,h=Fn.exec(a)||Bn.exec(a);if(h){for(p(t).iso=!0,e=0,i=Hn.length;e0&&p(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),Wo[s]?(o?p(t).empty=!1:p(t).unusedTokens.push(s),$(s,o,t)):t._strict&&!o&&p(t).unusedTokens.push(s);p(t).charsLeftOver=h-d,a.length>0&&p(t).unusedInput.push(a),t._a[cn]<=12&&!0===p(t).bigHour&&t._a[cn]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[cn]=ye(t._locale,t._a[cn],t._meridiem),ae(t),ne(t)}function ye(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&e<12&&(e+=12),o||12!==e||(e=0),e):e}function be(t){var e,i,o,n,s;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ue(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),t=xe(t),t._a){var e=t._isUTC?u(t._a):De(t._a);this._isDSTShifted=this.isValid()&&w(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qe(){return!!this.isValid()&&!this._isUTC}function Xe(){return!!this.isValid()&&this._isUTC}function Ze(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ke(t,e){var i,o,n,s=t,a=null;return Ne(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:r(t)?(s={},e?s[e]=t:s.milliseconds=t):(a=Jn.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:_(a[un])*i,h:_(a[cn])*i,m:_(a[pn])*i,s:_(a[fn])*i,ms:_(Re(1e3*a[mn]))*i}):(a=$n.exec(t))?(i="-"===a[1]?-1:(a[1],1),s={y:Je(a[2],i),M:Je(a[3],i),w:Je(a[4],i),d:Je(a[5],i),h:Je(a[6],i),m:Je(a[7],i),s:Je(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=Qe(De(s.from),De(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new Ie(s),Ne(t)&&d(t,"_locale")&&(o._locale=t._locale),o}function Je(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function $e(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Qe(t,e){var i;return t.isValid()&&e.isValid()?(e=Le(e,t),t.isBefore(e)?i=$e(t,e):(i=$e(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ti(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(S(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=Ke(i,o),ei(this,n,t),this}}function ei(t,i,o,n){var s=i._milliseconds,r=Re(i._days),a=Re(i._months);t.isValid()&&(n=null==n||n,a&&pt(t,ot(t,"Month")+a*o),r&&nt(t,"Date",ot(t,"Date")+r*o),s&&t._d.setTime(t._d.valueOf()+s*o),n&&e.updateOffset(t,r||a))}function ii(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function oi(t,i){var o=t||De(),n=Le(o,this).startOf("day"),s=e.calendarFormat(this,n)||"sameElse",r=i&&(D(i[s])?i[s].call(this,o):i[s]);return this.format(r||this.localeData().calendar(s,this,De(o)))}function ni(){return new g(this)}function si(t,e){var i=y(t)?t:De(t);return!(!this.isValid()||!i.isValid())&&(e=z(s(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()9999?G(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):D(Date.prototype.toISOString)?this.toDate().toISOString():G(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function mi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=e+'[")]';return this.format(i+o+"-MM-DD[T]HH:mm:ss.SSS"+n)}function vi(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var i=G(this,t);return this.localeData().postformat(i)}function gi(t,e){return this.isValid()&&(y(t)&&t.isValid()||De(t).isValid())?Ke({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function yi(t){return this.from(De(),t)}function bi(t,e){return this.isValid()&&(y(t)&&t.isValid()||De(t).isValid())?Ke({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function _i(t){return this.to(De(),t)}function wi(t){var e;return void 0===t?this._locale._abbr:(e=ie(t),null!=e&&(this._locale=e),this)}function xi(){return this._locale}function ki(t){switch(t=z(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function Si(t){return void 0===(t=z(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function Di(){return this._d.valueOf()-6e4*(this._offset||0)}function Mi(){return Math.floor(this.valueOf()/1e3)}function Ci(){return new Date(this.valueOf())}function Oi(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Ei(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ti(){return this.isValid()?this.toISOString():null}function Pi(){return f(this)}function Ii(){return l({},p(this))}function Ni(){return p(this).overflow}function Ri(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(t,e){H(0,[t,t.length],0,e)}function zi(t){return ji.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Li(t){return ji.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Fi(){return St(this.year(),1,4)}function Bi(){var t=this.localeData()._week;return St(this.year(),t.dow,t.doy)}function ji(t,e,i,o,n){var s;return null==t?kt(this,o,n).year:(s=St(t,o,n),e>s&&(e=s),Hi.call(this,t,e,i,o,n))}function Hi(t,e,i,o,n){var s=xt(t,e,i,o,n),r=_t(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Wi(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Yi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Gi(t,e){e[mn]=_(1e3*("0."+t))}function Vi(){return this._isUTC?"UTC":""}function Ui(){return this._isUTC?"Coordinated Universal Time":""}function qi(t){return De(1e3*t)}function Xi(){return De.apply(null,arguments).parseZone()}function Zi(t){return t}function Ki(t,e,i,o){var n=ie(),s=u().set(o,e);return n[i](s,t)}function Ji(t,e,i){if(r(t)&&(e=t,t=void 0),t=t||"",null!=e)return Ki(t,e,i,"month");var o,n=[];for(o=0;o<12;o++)n[o]=Ki(t,o,i,"month");return n}function $i(t,e,i,o){"boolean"==typeof t?(r(e)&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,r(e)&&(i=e,e=void 0),e=e||"");var n=ie(),s=t?n._week.dow:0;if(null!=i)return Ki(e,(i+s)%7,o,"day");var a,h=[];for(a=0;a<7;a++)h[a]=Ki(e,(a+s)%7,o,"day");return h}function Qi(t,e){return Ji(t,e,"months")}function to(t,e){return Ji(t,e,"monthsShort")}function eo(t,e,i){return $i(t,e,i,"weekdays")}function io(t,e,i){return $i(t,e,i,"weekdaysShort")}function oo(t,e,i){return $i(t,e,i,"weekdaysMin")}function no(){var t=this._data;return this._milliseconds=ds(this._milliseconds),this._days=ds(this._days),this._months=ds(this._months),t.milliseconds=ds(t.milliseconds),t.seconds=ds(t.seconds),t.minutes=ds(t.minutes),t.hours=ds(t.hours),t.months=ds(t.months),t.years=ds(t.years),this}function so(t,e,i,o){var n=Ke(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function ro(t,e){return so(this,t,e,1)}function ao(t,e){return so(this,t,e,-1)}function ho(t){return t<0?Math.floor(t):Math.ceil(t)}function lo(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*ho(co(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=b(s/1e3),h.seconds=t%60,e=b(t/60),h.minutes=e%60,i=b(e/60),h.hours=i%24,r+=b(i/24),n=b(uo(r)),a+=n, +r-=ho(co(n)),o=b(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function uo(t){return 4800*t/146097}function co(t){return 146097*t/4800}function po(t){if(!this.isValid())return NaN;var e,i,o=this._milliseconds;if("month"===(t=z(t))||"year"===t)return e=this._days+o/864e5,i=this._months+uo(e),"month"===t?i:i/12;switch(e=this._days+Math.round(co(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function fo(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12):NaN}function mo(t){return function(){return this.as(t)}}function vo(){return Ke(this)}function go(t){return t=z(t),this.isValid()?this[t+"s"]():NaN}function yo(t){return function(){return this.isValid()?this._data[t]:NaN}}function bo(){return b(this.days()/7)}function _o(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function wo(t,e,i){var o=Ke(t).abs(),n=Ds(o.as("s")),s=Ds(o.as("m")),r=Ds(o.as("h")),a=Ds(o.as("d")),h=Ds(o.as("M")),d=Ds(o.as("y")),l=n<=Ms.ss&&["s",n]||n0,l[4]=i,_o.apply(null,l)}function xo(t){return void 0===t?Ds:"function"==typeof t&&(Ds=t,!0)}function ko(t,e){return void 0!==Ms[t]&&(void 0===e?Ms[t]:(Ms[t]=e,"s"===t&&(Ms.ss=e-1),!0))}function So(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=wo(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Do(t){return(t>0)-(t<0)||+t}function Mo(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,o=Cs(this._milliseconds)/1e3,n=Cs(this._days),s=Cs(this._months);t=b(o/60),e=b(t/60),o%=60,t%=60,i=b(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o?o.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var p=c<0?"-":"",f=Do(this._months)!==Do(c)?"-":"",m=Do(this._days)!==Do(c)?"-":"",v=Do(this._milliseconds)!==Do(c)?"-":"";return p+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(h?m+h+"D":"")+(d||l||u?"T":"")+(d?v+d+"H":"")+(l?v+l+"M":"")+(u?v+u+"S":"")}var Co,Oo;Oo=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,o=0;o68?1900:2e3)};var yn,bn=it("FullYear",!0);yn=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:m()}),Xn=function(){return Date.now?Date.now():+new Date},Zn=["year","quarter","month","week","day","hour","minute","second","millisecond"];Ae("Z",":"),Ae("ZZ",""),U("Z",nn),U("ZZ",nn),K(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=ze(nn,t)});var Kn=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Jn=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,$n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Ke.fn=Ie.prototype,Ke.invalid=Pe;var Qn=ti(1,"add"),ts=ti(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var es=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ai("gggg","weekYear"),Ai("ggggg","weekYear"),Ai("GGGG","isoWeekYear"),Ai("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),U("G",en),U("g",en),U("GG",Xo,Go),U("gg",Xo,Go),U("GGGG",$o,Uo),U("gggg",$o,Uo),U("GGGGG",Qo,qo),U("ggggg",Qo,qo),J(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=_(t)}),J(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),A("quarter","Q"),F("quarter",7),U("Q",Yo),K("Q",function(t,e){e[ln]=3*(_(t)-1)}),H("D",["DD",2],"Do","date"),A("date","D"),F("date",9),U("D",Xo),U("DD",Xo,Go),U("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),K(["D","DD"],un),K("Do",function(t,e){e[un]=_(t.match(Xo)[0],10)});var is=it("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),F("dayOfYear",4),U("DDD",Jo),U("DDDD",Vo),K(["DDD","DDDD"],function(t,e,i){i._dayOfYear=_(t)}),H("m",["mm",2],0,"minute"),A("minute","m"),F("minute",14),U("m",Xo),U("mm",Xo,Go),K(["m","mm"],pn);var os=it("Minutes",!1);H("s",["ss",2],0,"second"),A("second","s"),F("second",15),U("s",Xo),U("ss",Xo,Go),K(["s","ss"],fn);var ns=it("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),F("millisecond",16),U("S",Jo,Yo),U("SS",Jo,Go),U("SSS",Jo,Vo);var ss;for(ss="SSSS";ss.length<=9;ss+="S")U(ss,tn);for(ss="S";ss.length<=9;ss+="S")K(ss,Gi);var rs=it("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var as=g.prototype;as.add=Qn,as.calendar=oi,as.clone=ni,as.diff=ui,as.endOf=Si,as.format=vi,as.from=gi,as.fromNow=yi,as.to=bi,as.toNow=_i,as.get=st,as.invalidAt=Ni,as.isAfter=si,as.isBefore=ri,as.isBetween=ai,as.isSame=hi,as.isSameOrAfter=di,as.isSameOrBefore=li,as.isValid=Pi,as.lang=es,as.locale=wi,as.localeData=xi,as.max=qn,as.min=Un,as.parsingFlags=Ii,as.set=rt,as.startOf=ki,as.subtract=ts,as.toArray=Oi,as.toObject=Ei,as.toDate=Ci,as.toISOString=fi,as.inspect=mi,as.toJSON=Ti,as.toString=pi,as.unix=Mi,as.valueOf=Di,as.creationData=Ri,as.year=bn,as.isLeapYear=et,as.weekYear=zi,as.isoWeekYear=Li,as.quarter=as.quarters=Wi,as.month=ft,as.daysInMonth=mt,as.week=as.weeks=Ot,as.isoWeek=as.isoWeeks=Et,as.weeksInYear=Bi,as.isoWeeksInYear=Fi,as.date=is,as.day=as.days=Lt,as.weekday=Ft,as.isoWeekday=Bt,as.dayOfYear=Yi,as.hour=as.hours=Rn,as.minute=as.minutes=os,as.second=as.seconds=ns,as.millisecond=as.milliseconds=rs,as.utcOffset=Be,as.utc=He,as.local=We,as.parseZone=Ye,as.hasAlignedHourOffset=Ge,as.isDST=Ve,as.isLocal=qe,as.isUtcOffset=Xe,as.isUtc=Ze,as.isUTC=Ze,as.zoneAbbr=Vi,as.zoneName=Ui,as.dates=k("dates accessor is deprecated. Use date instead.",is),as.months=k("months accessor is deprecated. Use month instead",ft),as.years=k("years accessor is deprecated. Use year instead",bn),as.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",je),as.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ue);var hs=O.prototype;hs.calendar=E,hs.longDateFormat=T,hs.invalidDate=P,hs.ordinal=I,hs.preparse=Zi,hs.postformat=Zi,hs.relativeTime=N,hs.pastFuture=R,hs.set=M,hs.months=dt,hs.monthsShort=lt,hs.monthsParse=ct,hs.monthsRegex=gt,hs.monthsShortRegex=vt,hs.week=Dt,hs.firstDayOfYear=Ct,hs.firstDayOfWeek=Mt,hs.weekdays=It,hs.weekdaysMin=Rt,hs.weekdaysShort=Nt,hs.weekdaysParse=zt,hs.weekdaysRegex=jt,hs.weekdaysShortRegex=Ht,hs.weekdaysMinRegex=Wt,hs.isPM=Xt,hs.meridiem=Zt,Qt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=k("moment.lang is deprecated. Use moment.locale instead.",Qt),e.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ie);var ds=Math.abs,ls=mo("ms"),us=mo("s"),cs=mo("m"),ps=mo("h"),fs=mo("d"),ms=mo("w"),vs=mo("M"),gs=mo("y"),ys=yo("milliseconds"),bs=yo("seconds"),_s=yo("minutes"),ws=yo("hours"),xs=yo("days"),ks=yo("months"),Ss=yo("years"),Ds=Math.round,Ms={ss:44,s:45,m:45,h:22,d:26,M:11},Cs=Math.abs,Os=Ie.prototype;return Os.isValid=Te,Os.abs=no,Os.add=ro,Os.subtract=ao,Os.as=po,Os.asMilliseconds=ls,Os.asSeconds=us,Os.asMinutes=cs,Os.asHours=ps,Os.asDays=fs,Os.asWeeks=ms,Os.asMonths=vs,Os.asYears=gs,Os.valueOf=fo,Os._bubble=lo,Os.clone=vo,Os.get=go,Os.milliseconds=ys,Os.seconds=bs,Os.minutes=_s,Os.hours=ws,Os.days=xs,Os.weeks=bo,Os.months=ks,Os.years=Ss,Os.humanize=So,Os.toISOString=Mo,Os.toString=Mo,Os.toJSON=Mo,Os.locale=wi,Os.localeData=xi,Os.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Mo),Os.lang=es,H("X",0,0,"unix"),H("x",0,0,"valueOf"),U("x",en),U("X",sn),K("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),K("x",function(t,e,i){i._d=new Date(_(t))}),e.version="2.19.1",function(t){Co=t}(De),e.fn=as,e.min=Ce,e.max=Oe,e.now=Xn,e.utc=u,e.unix=qi,e.months=Qi,e.isDate=a,e.locale=Qt,e.invalid=m,e.duration=Ke,e.isMoment=y,e.weekdays=eo,e.parseZone=Xi,e.localeData=ie,e.isDuration=Ne,e.monthsShort=to,e.weekdaysMin=oo,e.defineLocale=te,e.updateLocale=ee,e.locales=oe,e.weekdaysShort=io,e.normalizeUnits=z,e.relativeTimeRounding=xo,e.relativeTimeThreshold=ko,e.calendarFormat=ii,e.prototype=as,e})}).call(e,i(155)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=156},function(t,e,i){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){n<16&&(e[o+n++]=u[t])});n<16;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-v+(h-g)/1e4;if(d<0&&void 0===t.clockseq&&(r=r+1&16383),(d<0||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,g=h,m=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var c=t.node||f,p=0;p<6;p++)s[n+p]=c[p];return e||o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:void 0!==e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},c=0;c<256;c++)l[c]=(c+256).toString(16).substr(1),u[l[c]]=c;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),v=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,i(158))},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Graph3d=i(161),e.graph3d={Camera:i(95),Filter:i(96),Point2d:i(91),Point3d:i(34),Slider:i(92),StepNumber:i(93)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){var o=i(7),n=o.JSON||(o.JSON={stringify:JSON.stringify});t.exports=function(t){return n.stringify.apply(n,arguments)}},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.dataGroup=new _,this.dataPoints=null,this.create(),f.setDefaults(o.DEFAULTS,this),this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.setOptions(i),this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r=i(90),a=function(t){return t&&t.__esModule?t:{default:t}}(r),h=i(44),d=i(2),l=i(34),u=i(91),c=i(92),p=i(93),f=i(94),m=i(15).default,v=i(15),g=v.printStyle,y=i(172),b=y.allOptions,_=i(173);o.STYLE=f.STYLE;o.DEFAULTS={width:"400px",height:"400px",filterLabel:"time",legendLabel:"value",xLabel:"x",yLabel:"y",zLabel:"z",xValueLabel:function(t){return t},yValueLabel:function(t){return t},zValueLabel:function(t){return t},showXAxis:!0,showYAxis:!0,showZAxis:!0,showGrid:!0,showPerspective:!0,showShadow:!1,keepAspectRatio:!0,verticalRatio:.5,dotSizeRatio:.02,dotSizeMinFraction:.5,dotSizeMaxFraction:2.5,showAnimationControls:void 0,animationInterval:1e3,animationPreload:!1,animationAutoStart:void 0,axisColor:"#4D4D4D",gridColor:"#D3D3D3",xCenter:"55%",yCenter:"50%",style:o.STYLE.DOT,tooltip:!1,tooltipStyle:{content:{padding:"10px",border:"1px solid #4d4d4d",color:"#1a1a1a",background:"rgba(255,255,255,0.7)",borderRadius:"2px",boxShadow:"5px 5px 10px rgba(128,128,128,0.5)"},line:{height:"40px",width:"0",borderLeft:"1px solid #4d4d4d"},dot:{height:"0",width:"0",border:"5px solid #4d4d4d",borderRadius:"5px"}},dataColor:{fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},cameraPosition:{horizontal:1,vertical:.5,distance:1.7},showLegend:void 0,backgroundColor:void 0,xBarWidth:void 0,yBarWidth:void 0,valueMin:void 0,valueMax:void 0,xMin:void 0,xMax:void 0,xStep:void 0,yMin:void 0,yMax:void 0,yStep:void 0,zMin:void 0,zMax:void 0,zStep:void 0},h(o.prototype),o.prototype._setScale=function(){this.scale=new l(1/this.xRange.range(),1/this.yRange.range(),1/this.zRange.range()),this.keepAspectRatio&&(this.scale.x0&&(r[n-1].pointNext=r[n]);return r},o.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var e=this,i=function(t){e._onMouseDown(t)},o=function(t){e._onTouchStart(t)},n=function(t){e._onWheel(t)},s=function(t){e._onTooltip(t)},r=function(t){e._onClick(t)};d.addEventListener(this.frame.canvas,"mousedown",i),d.addEventListener(this.frame.canvas,"touchstart",o),d.addEventListener(this.frame.canvas,"mousewheel",n),d.addEventListener(this.frame.canvas,"mousemove",s),d.addEventListener(this.frame.canvas,"click",r),this.containerElement.appendChild(this.frame)},o.prototype._setSize=function(t,e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},o.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,this.frame.filter.style.width=this.frame.canvas.clientWidth-20+"px"},o.prototype.animationStart=function(){if(this.animationAutoStart&&this.dataGroup.dataFilter){if(!this.frame.filter||!this.frame.filter.slider)throw new Error("No animation available");this.frame.filter.slider.play()}},o.prototype.animationStop=function(){this.frame.filter&&this.frame.filter.slider&&this.frame.filter.slider.stop()},o.prototype._resizeCenter=function(){"%"===this.xCenter.charAt(this.xCenter.length-1)?this.currentXCenter=parseFloat(this.xCenter)/100*this.frame.canvas.clientWidth:this.currentXCenter=parseFloat(this.xCenter),"%"===this.yCenter.charAt(this.yCenter.length-1)?this.currentYCenter=parseFloat(this.yCenter)/100*(this.frame.canvas.clientHeight-this.frame.filter.clientHeight):this.currentYCenter=parseFloat(this.yCenter)},o.prototype.getCameraPosition=function(){var t=this.camera.getArmRotation();return t.distance=this.camera.getArmLength(),t},o.prototype._readData=function(t){this.dataPoints=this.dataGroup.initializeData(this,t,this.style),this._initializeRanges(),this._redrawFilter()},o.prototype.setData=function(t){void 0!==t&&null!==t&&(this._readData(t),this.redraw(),this.animationStart())},o.prototype.setOptions=function(t){if(void 0!==t){!0===m.validate(t,b)&&console.log("%cErrors have been found in the supplied options object.",g),this.animationStop(),f.setOptions(t,this),this.setPointDrawingMethod(),this._setSize(this.width,this.height),this.setData(this.dataGroup.getDataTable()),this.animationStart()}},o.prototype.setPointDrawingMethod=function(){var t=void 0;switch(this.style){case o.STYLE.BAR:t=o.prototype._redrawBarGraphPoint;break;case o.STYLE.BARCOLOR:t=o.prototype._redrawBarColorGraphPoint;break;case o.STYLE.BARSIZE:t=o.prototype._redrawBarSizeGraphPoint;break;case o.STYLE.DOT:t=o.prototype._redrawDotGraphPoint;break;case o.STYLE.DOTLINE:t=o.prototype._redrawDotLineGraphPoint;break;case o.STYLE.DOTCOLOR:t=o.prototype._redrawDotColorGraphPoint;break;case o.STYLE.DOTSIZE:t=o.prototype._redrawDotSizeGraphPoint;break;case o.STYLE.SURFACE:t=o.prototype._redrawSurfaceGraphPoint;break;case o.STYLE.GRID:t=o.prototype._redrawGridGraphPoint;break;case o.STYLE.LINE:t=o.prototype._redrawLineGraphPoint;break;default:throw new Error("Can not determine point drawing method for graph style '"+this.style+"'")}this._pointDrawingMethod=t},o.prototype.redraw=function(){if(void 0===this.dataPoints)throw new Error("Graph data not initialized");this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this._redrawDataGraph(),this._redrawInfo(),this._redrawLegend()},o.prototype._getContext=function(){var t=this.frame.canvas,e=t.getContext("2d");return e.lineJoin="round",e.lineCap="round",e},o.prototype._redrawClear=function(){var t=this.frame.canvas;t.getContext("2d").clearRect(0,0,t.width,t.height)},o.prototype._dotSize=function(){return this.frame.clientWidth*this.dotSizeRatio},o.prototype._getLegendWidth=function(){var t;if(this.style===o.STYLE.DOTSIZE){t=this._dotSize()*this.dotSizeMaxFraction}else t=this.style===o.STYLE.BARSIZE?this.xBarWidth:20;return t},o.prototype._redrawLegend=function(){if(!0===this.showLegend&&this.style!==o.STYLE.LINE&&this.style!==o.STYLE.BARSIZE){var t=this.style===o.STYLE.BARSIZE||this.style===o.STYLE.DOTSIZE,e=this.style===o.STYLE.DOTSIZE||this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.BARCOLOR,i=Math.max(.25*this.frame.clientHeight,100),n=this.margin,s=this._getLegendWidth(),r=this.frame.clientWidth-this.margin,a=r-s,h=n+i,d=this._getContext();if(d.lineWidth=1,d.font="14px arial",!1===t){var l,c=i;for(l=0;l0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)<0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelY=function(t,e,i,o,n){void 0===n&&(n=0);var s=this._convert3Dto2D(e);Math.cos(2*o)<0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)>0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelZ=function(t,e,i,o){void 0===o&&(o=0);var n=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(i,n.x-o,n.y)},o.prototype._line3d=function(t,e,i,o){var n=this._convert3Dto2D(e),s=this._convert3Dto2D(i);this._line(t,n,s,o)},o.prototype._redrawAxis=function(){var t,e,i,o,n,s,r,a,h,d,c,f=this._getContext();f.font=24/this.camera.getArmLength()+"px arial";var m,v=.025/this.scale.x,g=.025/this.scale.y,y=5/this.camera.getArmLength(),b=this.camera.getArmRotation().horizontal,_=new u(Math.cos(b),Math.sin(b)),w=this.xRange,x=this.yRange,k=this.zRange;for(f.lineWidth=1,o=void 0===this.defaultXStep,i=new p(w.min,w.max,this.xStep,o),i.start(!0);!i.end();){var S=i.getCurrent();if(this.showGrid?(t=new l(S,x.min,k.min),e=new l(S,x.max,k.min),this._line3d(f,t,e,this.gridColor)):this.showXAxis&&(t=new l(S,x.min,k.min),e=new l(S,x.min+v,k.min),this._line3d(f,t,e,this.axisColor),t=new l(S,x.max,k.min),e=new l(S,x.max-v,k.min),this._line3d(f,t,e,this.axisColor)),this.showXAxis){r=_.x>0?x.min:x.max,m=new l(S,r,k.min);var D=" "+this.xValueLabel(S)+" ";this.drawAxisLabelX(f,m,D,b,y)}i.next()}for(f.lineWidth=1,o=void 0===this.defaultYStep,i=new p(x.min,x.max,this.yStep,o),i.start(!0);!i.end();){var M=i.getCurrent();if(this.showGrid?(t=new l(w.min,M,k.min),e=new l(w.max,M,k.min),this._line3d(f,t,e,this.gridColor)):this.showYAxis&&(t=new l(w.min,M,k.min),e=new l(w.min+g,M,k.min),this._line3d(f,t,e,this.axisColor),t=new l(w.max,M,k.min),e=new l(w.max-g,M,k.min),this._line3d(f,t,e,this.axisColor)),this.showYAxis){s=_.y>0?w.min:w.max,m=new l(s,M,k.min);var C=" "+this.yValueLabel(M)+" ";this.drawAxisLabelY(f,m,C,b,y)}i.next()}if(this.showZAxis){for(f.lineWidth=1,o=void 0===this.defaultZStep,i=new p(k.min,k.max,this.zStep,o),i.start(!0),s=_.x>0?w.min:w.max,r=_.y<0?x.min:x.max;!i.end();){var O=i.getCurrent(),E=new l(s,r,O),T=this._convert3Dto2D(E);e=new u(T.x-y,T.y),this._line(f,T,e,this.axisColor);var P=this.zValueLabel(O)+" ";this.drawAxisLabelZ(f,E,P,5),i.next()}f.lineWidth=1,t=new l(s,r,k.min),e=new l(s,r,k.max),this._line3d(f,t,e,this.axisColor)}if(this.showXAxis){var I,N;f.lineWidth=1,I=new l(w.min,x.min,k.min),N=new l(w.max,x.min,k.min),this._line3d(f,I,N,this.axisColor),I=new l(w.min,x.max,k.min),N=new l(w.max,x.max,k.min),this._line3d(f,I,N,this.axisColor)}this.showYAxis&&(f.lineWidth=1,t=new l(w.min,x.min,k.min),e=new l(w.min,x.max,k.min),this._line3d(f,t,e,this.axisColor),t=new l(w.max,x.min,k.min),e=new l(w.max,x.max,k.min),this._line3d(f,t,e,this.axisColor));var R=this.xLabel;R.length>0&&this.showXAxis&&(c=.1/this.scale.y,s=(w.max+3*w.min)/4,r=_.x>0?x.min-c:x.max+c,n=new l(s,r,k.min),this.drawAxisLabelX(f,n,R,b));var A=this.yLabel;A.length>0&&this.showYAxis&&(d=.1/this.scale.x,s=_.y>0?w.min-d:w.max+d,r=(x.max+3*x.min)/4,n=new l(s,r,k.min),this.drawAxisLabelY(f,n,A,b));var z=this.zLabel;z.length>0&&this.showZAxis&&(h=30,s=_.x>0?w.min:w.max,r=_.y<0?x.min:x.max,a=(k.max+3*k.min)/4,n=new l(s,r,a),this.drawAxisLabelZ(f,n,z,h))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._getStrokeWidth=function(t){return void 0!==t?this.showPerspective?1/-t.trans.z*this.dataColor.strokeWidth:-this.eye.z/this.camera.getArmLength()*this.dataColor.strokeWidth:this.dataColor.strokeWidth},o.prototype._redrawBar=function(t,e,i,o,n,s){var r,a=this,h=e.point,d=this.zRange.min,u=[{point:new l(h.x-i,h.y-o,h.z)},{point:new l(h.x+i,h.y-o,h.z)},{point:new l(h.x+i,h.y+o,h.z)},{point:new l(h.x-i,h.y+o,h.z)}],c=[{point:new l(h.x-i,h.y-o,d)},{point:new l(h.x+i,h.y-o,d)},{point:new l(h.x+i,h.y+o,d)},{point:new l(h.x-i,h.y+o,d)}];u.forEach(function(t){t.screen=a._convert3Dto2D(t.point)}),c.forEach(function(t){t.screen=a._convert3Dto2D(t.point)});var p=[{corners:u,center:l.avg(c[0].point,c[2].point)},{corners:[u[0],u[1],c[1],c[0]],center:l.avg(c[1].point,c[0].point)},{corners:[u[1],u[2],c[2],c[1]],center:l.avg(c[2].point,c[1].point)},{corners:[u[2],u[3],c[3],c[2]],center:l.avg(c[3].point,c[2].point)},{corners:[u[3],u[0],c[0],c[3]],center:l.avg(c[0].point,c[3].point)}];e.surfaces=p;for(var f=0;f0}if(a){var p,f=(e.point.z+i.point.z+o.point.z+n.point.z)/4,m=240*(1-(f-this.zRange.min)*this.scale.z/this.verticalRatio);this.showShadow?(p=Math.min(1+u.x/c/2,1),s=this._hsv2rgb(m,1,p),r=s):(p=1,s=this._hsv2rgb(m,1,p),r=this.axisColor)}else s="gray",r=this.axisColor;t.lineWidth=this._getStrokeWidth(e);var v=[e,i,n,o];this._polygon(t,v,s,r)}},o.prototype._drawGridLine=function(t,e,i){if(void 0!==e&&void 0!==i){var o=(e.point.z+i.point.z)/2,n=240*(1-(o-this.zRange.min)*this.scale.z/this.verticalRatio);t.lineWidth=2*this._getStrokeWidth(e),t.strokeStyle=this._hsv2rgb(n,1,1),this._line(t,e.screen,i.screen)}},o.prototype._redrawGridGraphPoint=function(t,e){this._drawGridLine(t,e,e.pointRight),this._drawGridLine(t,e,e.pointTop)},o.prototype._redrawLineGraphPoint=function(t,e){void 0!==e.pointNext&&(t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=this.dataColor.stroke,this._line(t,e.screen,e.pointNext.screen))},o.prototype._redrawDataGraph=function(){var t,e=this._getContext();if(!(void 0===this.dataPoints||this.dataPoints.length<=0))for(this._calcTranslations(this.dataPoints),t=0;t0?1:t<0?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=null,s=null,r=null,a=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){n=this.dataPoints[i];var h=n.surfaces;if(h)for(var d=h.length-1;d>=0;d--){var l=h[d],c=l.corners,p=[c[0].screen,c[1].screen,c[2].screen],f=[c[2].screen,c[3].screen,c[0].screen];if(this._insideTriangle(a,p)||this._insideTriangle(a,f))return n}}else for(i=0;i"+this.xLabel+":"+t.point.x+""+this.yLabel+":"+t.point.y+""+this.zLabel+":"+t.point.z+"",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,h=o.offsetWidth,d=o.offsetHeight,l=t.screen.x-n/2;l=Math.min(Math.max(l,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=l+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-h/2+"px",o.style.top=t.screen.y-d/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},o.prototype.setCameraPosition=function(t){f.setCameraPosition(t,this),this.redraw()},o.prototype.setSize=function(t,e){this._setSize(t,e),this.redraw()},t.exports=o},function(t,e,i){i(163),t.exports=i(7).Object.assign},function(t,e,i){var o=i(17);o(o.S+o.F,"Object",{assign:i(164)})},function(t,e,i){var o=i(33),n=i(63),s=i(42),r=i(41),a=i(78),h=Object.assign;t.exports=!h||i(28)(function(){var t={},e={},i=Symbol(),o="abcdefghijklmnopqrst";return t[i]=7,o.split("").forEach(function(t){e[t]=t}),7!=h({},t)[i]||Object.keys(h({},e)).join("")!=o})?function(t,e){for(var i=r(t),h=arguments.length,d=1,l=n.f,u=s.f;h>d;)for(var c,p=a(arguments[d++]),f=l?o(p).concat(l(p)):o(p),m=f.length,v=0;m>v;)u.call(p,c=f[v++])&&(i[c]=p[c]);return i}:h},function(t,e,i){t.exports={default:i(166),__esModule:!0}},function(t,e,i){i(167),t.exports=i(7).Math.sign},function(t,e,i){var o=i(17);o(o.S,"Math",{sign:i(168)})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,i){t.exports={default:i(170),__esModule:!0}},function(t,e,i){i(171);var o=i(7).Object;t.exports=function(t,e,i){return o.defineProperty(t,e,i)}},function(t,e,i){var o=i(17);o(o.S+o.F*!i(21),"Object",{defineProperty:i(20).f})},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var o="string",n="boolean",s="number",r={fill:{string:o},stroke:{string:o},strokeWidth:{number:s},__type__:{string:o,object:"object",undefined:"undefined"}},a={animationAutoStart:{boolean:n,undefined:"undefined"},animationInterval:{number:s},animationPreload:{boolean:n},axisColor:{string:o},backgroundColor:r,xBarWidth:{number:s,undefined:"undefined"},yBarWidth:{number:s,undefined:"undefined"},cameraPosition:{distance:{number:s},horizontal:{number:s},vertical:{number:s},__type__:{object:"object"}},xCenter:{string:o},yCenter:{string:o},dataColor:r,dotSizeMinFraction:{number:s},dotSizeMaxFraction:{number:s},dotSizeRatio:{number:s},filterLabel:{string:o},gridColor:{string:o},onclick:{function:"function"},keepAspectRatio:{boolean:n},xLabel:{string:o},yLabel:{string:o},zLabel:{string:o},legendLabel:{string:o},xMin:{number:s,undefined:"undefined"},yMin:{number:s,undefined:"undefined"},zMin:{number:s,undefined:"undefined"},xMax:{number:s,undefined:"undefined"},yMax:{number:s,undefined:"undefined"},zMax:{number:s,undefined:"undefined"},showAnimationControls:{boolean:n,undefined:"undefined"},showGrid:{boolean:n},showLegend:{boolean:n,undefined:"undefined"},showPerspective:{boolean:n},showShadow:{boolean:n},showXAxis:{boolean:n},showYAxis:{boolean:n},showZAxis:{boolean:n},xStep:{number:s,undefined:"undefined"},yStep:{number:s,undefined:"undefined"},zStep:{number:s,undefined:"undefined"},style:{number:s,string:["bar","bar-color","bar-size","dot","dot-line","dot-color","dot-size","line","grid","surface"]},tooltip:{boolean:n,function:"function"},tooltipStyle:{content:{color:{string:o},background:{string:o},border:{string:o},borderRadius:{string:o},boxShadow:{string:o},padding:{string:o},__type__:{object:"object"}},line:{borderLeft:{string:o},height:{string:o},width:{string:o},__type__:{object:"object"}},dot:{border:{string:o},borderRadius:{string:o},height:{string:o},width:{string:o},__type__:{object:"object"}},__type__:{object:"object"}},xValueLabel:{function:"function"},yValueLabel:{function:"function"},zValueLabel:{function:"function"},valueMax:{number:s,undefined:"undefined"},valueMin:{number:s,undefined:"undefined"},verticalRatio:{number:s},height:{string:o},width:{string:o},__type__:{object:"object"}};e.allOptions=a},function(t,e,i){function o(){this.dataTable=null}var n=i(11),s=i(12),r=i(174),a=i(96),h=i(94),d=i(34);o.prototype.initializeData=function(t,e,i){if(void 0!==e){Array.isArray(e)&&(e=new n(e));var o;if(!(e instanceof n||e instanceof s))throw new Error("Array, DataSet, or DataView expected");if(o=e.get(),0!=o.length){this.style=i,this.dataSet&&this.dataSet.off("*",this._onChange),this.dataSet=e,this.dataTable=o;var r=this;this._onChange=function(){t.setData(r.dataSet)},this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z";var h=t.hasBars(i);if(h&&(void 0!==t.defaultXBarWidth?this.xBarWidth=t.defaultXBarWidth:this.xBarWidth=this.getSmallestDifference(o,this.colX)||1,void 0!==t.defaultYBarWidth?this.yBarWidth=t.defaultYBarWidth:this.yBarWidth=this.getSmallestDifference(o,this.colY)||1),this._initializeRange(o,this.colX,t,h),this._initializeRange(o,this.colY,t,h),this._initializeRange(o,this.colZ,t,!1),o[0].hasOwnProperty("style")){this.colValue="style";var d=this.getColumnRange(o,this.colValue);this._setRangeDefaults(d,t.defaultValueMin,t.defaultValueMax),this.valueRange=d}this.getDataTable()[0].hasOwnProperty("filter")&&void 0===this.dataFilter&&(this.dataFilter=new a(this,"filter",t),this.dataFilter.setOnLoadCallback(function(){t.redraw()}));return this.dataFilter?this.dataFilter._getDataPoints():this._getDataPoints(this.getDataTable())}}},o.prototype._collectRangeSettings=function(t,e){if(-1==["x","y","z"].indexOf(t))throw new Error("Column '"+t+"' invalid");var i=t.toUpperCase();return{barWidth:this[t+"BarWidth"],min:e["default"+i+"Min"],max:e["default"+i+"Max"],step:e["default"+i+"Step"],range_label:t+"Range",step_label:t+"Step"}},o.prototype._initializeRange=function(t,e,i,o){var n=this._collectRangeSettings(e,i),s=this.getColumnRange(t,e);o&&"z"!=e&&s.expand(n.barWidth/2),this._setRangeDefaults(s,n.min,n.max),this[n.range_label]=s,this[n.step_label]=void 0!==n.step?n.step:s.range()/5},o.prototype.getDistinctValues=function(t,e){void 0===e&&(e=this.dataTable);for(var i=[],o=0;os)&&(o=s)}return o},o.prototype.getColumnRange=function(t,e){for(var i=new r,o=0;o0&&(e[i-1].pointNext=e[i]);return e},o.prototype._checkValueField=function(t){if(this.style===h.STYLE.BARCOLOR||this.style===h.STYLE.BARSIZE||this.style===h.STYLE.DOTCOLOR||this.style===h.STYLE.DOTSIZE){if(void 0===this.colValue)throw new Error("Expected data to have field 'style' for graph style '"+this.style+"'");if(void 0===t[0][this.colValue])throw new Error("Expected data to have field '"+this.colValue+"' for graph style '"+this.style+"'")}},t.exports=o},function(t,e,i){function o(){this.min=void 0,this.max=void 0}o.prototype.adjust=function(t){void 0!==t&&((void 0===this.min||this.min>t)&&(this.min=t),(void 0===this.max||this.maxi)throw new Error("Passed expansion value makes range invalid");this.min=e,this.max=i}},o.prototype.range=function(){return this.max-this.min},o.prototype.center=function(){return(this.min+this.max)/2},t.exports=o},function(t,e,i){var o,n,s;!function(i){n=[],o=i,void 0!==(s="function"==typeof o?o.apply(e,n):o)&&(t.exports=s)}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return!!Array.isArray(t)&&(l(t,i[e],i),!0)}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function c(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ft(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==gt?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function S(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=R(o);e.timeStamp=_t(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=F(a,h),e.distance=L(a,h),P(i,e),e.offsetDirection=z(e.deltaX,e.deltaY);var d=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=bt(d.x)>bt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?B(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==Pt||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=It&&(h>Ot||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,u=A(h,d,l);o=u.x,n=u.y,i=bt(u.x)>bt(u.y)?u.x:u.y,s=z(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;i=bt(e)?t<0?Rt:At:e<0?zt:Lt}function L(t,e,i){i||(i=Ht);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function F(t,e,i){i||(i=Ht);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function B(t,e){return F(e[1],e[0],Wt)+F(t[1],t[0],Wt)}function j(t,e){return L(e[0],e[1],Wt)/L(t[0],t[1],Wt)}function H(){this.evEl=Gt,this.evWin=Vt,this.pressed=!1,C.apply(this,arguments)}function W(){this.evEl=Xt,this.evWin=Zt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Jt,this.evWin=$t,this.started=!1,C.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(Pt|It)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=te,this.targetIds={},C.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Tt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;n-1&&o.splice(t,1)};setTimeout(n,ee)}}function K(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;o=fe&&e(i.options.event+tt(o))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return ot.prototype.attrTest.call(this,t)&&(this.state&ce||!(this.state&ce)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(st,ot,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ce)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(rt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(Pt|It)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=me,this.tryEmit()},e.time,this);else if(t.eventType&Pt)return me;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===me&&(t&&t.eventType&Pt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=_t(),this.manager.emit(this.options.event,this._input)))}}),c(at,ot,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ce)}}),c(ht,ot,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ft|Bt,pointers:1},getTouchAction:function(){return nt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ft|Bt)?e=t.overallVelocity:i&Ft?e=t.overallVelocityX:i&Bt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&Pt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(dt,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distanced+i?s+=h()+u-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,o-i),{shouldScroll:r,scrollOffset:s,itemTop:l}}var a=i(9),h=i(2),d=i(11),l=i(12),u=i(64),c=i(65),p=i(45),f=i(67),m=i(46),v=i(99),g=i(15).printStyle,y=i(105).allOptions,b=i(105).configureOptions,_=i(71).default,w=i(15).default;o.prototype=new c,o.prototype._createConfigurator=function(){return new _(this,this.dom.container,b)},o.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},o.prototype.setOptions=function(t){if(!0===w.validate(t,y)&&console.log("%cErrors have been found in the supplied options object.",g),c.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var e=this.itemsData;if(e){var i=this.getSelection();this.setItems(null),this.setItems(e),this.setSelection(i)}}},o.prototype.setItems=function(t){var e;e=t?t instanceof d||t instanceof l?t:new d(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},o.prototype.setGroups=function(t){var e;if(t){var i=function(t){return!1!==t.visible};e=t instanceof d||t instanceof l?new l(t,{filter:i}):new d(t.filter(i))}else e=null;this.groupsData=e,this.itemSet.setGroups(e)},o.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},o.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},o.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},o.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||es)&&(s=i)}),null!==n&&null!==s){var a=this,h=this.itemSet.items[i[0]],d=-1*this._getScrollTop(),l=null,u=function(t,e,i){var o=r(a,h);if(l||(l=o),l.itemTop!=o.itemTop||l.shouldScroll){l.itemTop!=o.itemTop&&o.shouldScroll&&(l=o,d=-1*a._getScrollTop());var n=d,s=l.scrollOffset,u=i?s:n+(s-n)*t;a._setScrollTop(-u),e||a._redraw()}},c=function(){var t=r(a,h);t.shouldScroll&&t.itemTop!=l.itemTop&&(a._setScrollTop(-t.scrollOffset),a._redraw())},p=function(){c(),setTimeout(c,100)},f=(n+s)/2,m=Math.max(this.range.end-this.range.start,1.1*(s-n)),v=!e||void 0===e.animation||e.animation;v||(l={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(f-m/2,f+m/2,{animation:v},p,u)}}},o.prototype.fit=function(t,e){var i,o=!t||void 0===t.animation||t.animation,n=this.itemsData&&this.itemsData.getDataSet();1===n.length&&void 0===n.get()[0].end?(i=this.getDataRange(),this.moveTo(i.min.valueOf(),{animation:o},e)):(i=this.getItemRange(),this.range.setRange(i.min,i.max,{animation:o},e))},o.prototype.getItemRange=function(){var t=this.getDataRange(),e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,o=null,r=null;if(null!=e&&null!=i){var a=i-e;a<=0&&(a=10);var d=a/this.props.center.width,l={},u=0;h.forEach(this.itemSet.items,function(t,e){if(t.groupShowing){l[e]=t.redraw(!0),u=l[e].length}});if(u>0)for(var c=0;ci&&(i=h,r=t)}.bind(this)),o&&r){var p=o.getWidthLeft()+10,f=r.getWidthRight()+10,m=this.props.center.width-p-f;m>0&&(this.options.rtl?(e=n(o)-f*a/m,i=s(r)+p*a/m):(e=n(o)-p*a/m,i=s(r)+f*a/m))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}},o.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=h.convert(i.start,"Date").valueOf(),n=h.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||oe)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},o.prototype.getEventProperties=function(t){var e,i=t.center?t.center.x:t.clientX,o=t.center?t.center.y:t.clientY;e=this.options.rtl?h.getAbsoluteRight(this.dom.centerContainer)-i:i-h.getAbsoluteLeft(this.dom.centerContainer);var n=o-h.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=m.customTimeFromTarget(t),d=this.itemSet.options.snap||null,l=this.body.util.getScale(),u=this.body.util.getStep(),c=this._toTime(e),p=d?d(c,l,u):c,f=h.getTarget(t),v=null;return null!=s?v="item":null!=a?v="custom-time":h.hasParent(f,this.timeAxis.dom.foreground)?v="axis":this.timeAxis2&&h.hasParent(f,this.timeAxis2.dom.foreground)?v="axis":h.hasParent(f,this.itemSet.dom.labelSet)?v="group-label":h.hasParent(f,this.currentTime.bar)?v="current-time":h.hasParent(f,this.dom.center)&&(v="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:v,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:e,y:n,time:c,snappedTime:p}},o.prototype.toggleRollingMode=function(){this.range.rolling?this.range.stopRolling():(void 0==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())},t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(19),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(10),u=i(37),c=i(2),p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,a.default)(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return(0,d.default)(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){var e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};if("string"==typeof t)return e[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=void 0,o=this._isColorString(t);if(void 0!==o&&(t=o),!0===c.isString(t)){if(!0===c.isValidRGB(t)){var n=t.substr(4).substr(0,t.length-5).split(",");i={r:n[0],g:n[1],b:n[2],a:1}}else if(!0===c.isValidRGBA(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===c.isValidHex(t)){var a=c.hexToRGB(t);i={r:a.r,g:a.g,b:a.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var h=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:h}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+(0,s.default)(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=c.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=c.extend({},t)),this.color=t;var e=c.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,o=this.r*e.s,n=this.centerCoordinates.x+o*Math.sin(i*e.h),s=this.centerCoordinates.y+o*Math.cos(i*e.h);this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=c.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=c.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=c.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d") +;this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new l(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),u.onTouch(this.hammer,function(e){t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,i);var o=void 0,n=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;var a=2*Math.PI/360,h=1/this.r,d=void 0;for(s=0;s<360;s++)for(r=0;rr?r:t,e=null==e?r:e0&&l.push(u.screenToValue(n)),!p.hidden&&this.itemsData.length>0&&l.push(p.screenToValue(n)),{event:t,what:d,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:r,value:l}},o.prototype._createConfigurator=function(){return new g(this,this.dom.container,v)},t.exports=o},function(t,e,i){e.util=i(2),e.DOMutil=i(14),e.DataSet=i(11),e.DataView=i(12),e.Queue=i(43),e.Network=i(182),e.network={Images:i(116),dotparser:i(114),gephiParser:i(115),allOptions:i(122)},e.network.convertDot=function(t){return e.network.dotparser.DOTToGraph(t)},e.network.convertGephi=function(t,i){return e.network.gephiParser.parseGephi(t,i)},e.moment=i(9),e.Hammer=i(10),e.keycharm=i(35)},function(t,e,i){function o(t,e,i){var n=this;if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:d,clickToUse:!1},s.extend(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this),once:this.once.bind(this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=new l(function(){return n.body.emitter.emit("_requestRedraw")}),this.groups=new u,this.canvas=new g(this.body),this.selectionHandler=new _(this.body,this.canvas),this.interactionHandler=new b(this.body,this.canvas,this.selectionHandler),this.view=new y(this.body,this.canvas),this.renderer=new v(this.body,this.canvas),this.physics=new f(this.body),this.layoutEngine=new w(this.body),this.clustering=new m(this.body),this.manipulation=new x(this.body,this.canvas,this.selectionHandler),this.nodesHandler=new c(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new p(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new T(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(e)}i(183);var n=i(44),s=i(2),r=i(114),a=i(115),h=i(97),d=i(184),l=i(116).default,u=i(186).default,c=i(187).default,p=i(214).default,f=i(220).default,m=i(227).default,v=i(229).default,g=i(230).default,y=i(231).default,b=i(232).default,_=i(234).default,w=i(235).default,x=i(237).default,k=i(71).default,S=i(15).default,D=i(15),M=D.printStyle,C=i(122),O=C.allOptions,E=C.configureOptions,T=i(238).default;n(o.prototype),o.prototype.setOptions=function(t){var e=this;if(void 0!==t){!0===S.validate(t,O)&&console.log("%cErrors have been found in the supplied options object.",M);var i=["locale","locales","clickToUse"];if(s.selectiveDeepExtend(i,this.options,t),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),void 0!==t.groups&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new k(this,this.body.container,E,this.canvas.pixelRatio)),this.configurator.setOptions(t.configure)),this.configurator&&!0===this.configurator.options.enabled){var o={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};s.deepExtend(o.nodes,this.nodesHandler.options),s.deepExtend(o.edges,this.edgesHandler.options),s.deepExtend(o.layout,this.layoutEngine.options),s.deepExtend(o.interaction,this.selectionHandler.options),s.deepExtend(o.interaction,this.renderer.options),s.deepExtend(o.interaction,this.interactionHandler.options),s.deepExtend(o.manipulation,this.manipulation.options),s.deepExtend(o.physics,this.physics.options),s.deepExtend(o.global,this.canvas.options),s.deepExtend(o.global,this.options),this.configurator.setModuleOptions(o)}void 0!==t.clickToUse?!0===t.clickToUse?void 0===this.activator&&(this.activator=new h(this.canvas.frame),this.activator.on("change",function(){e.body.emitter.emit("activate")})):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}},o.prototype._updateVisibleIndices=function(){var t=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var i in t)t.hasOwnProperty(i)&&(this.clustering._isClusteredNode(i)||!1!==t[i].options.hidden||this.body.nodeIndices.push(t[i].id));for(var o in e)if(e.hasOwnProperty(o)){var n=e[o],s=t[n.fromId],r=t[n.toId],a=void 0!==s&&void 0!==r,h=!this.clustering._isClusteredEdge(o)&&!1===n.options.hidden&&a&&!1===s.options.hidden&&!1===r.options.hidden;h&&this.body.edgeIndices.push(n.id)}},o.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})},o.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.log("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var e=r.DOTToGraph(t.dot);return void this.setData(e)}if(t&&t.gephi){console.log("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var i=a.parseGephi(t.gephi);return void this.setData(i)}this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},o.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&delete this.body.nodes[t];for(var e in this.body.edges)this.body.edges.hasOwnProperty(e)&&delete this.body.edges[e];s.recursiveDOMDelete(this.body.container)},o.prototype._updateValueRange=function(t){var e,i=void 0,o=void 0,n=0;for(e in t)if(t.hasOwnProperty(e)){var s=t[e].getValue();void 0!==s&&(i=void 0===i?s:Math.min(s,i),o=void 0===o?s:Math.max(s,o),n+=s)}if(void 0!==i&&void 0!==o)for(e in t)t.hasOwnProperty(e)&&t[e].setValueRange(i,o,n)},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},o.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},o.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},o.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},o.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},o.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},o.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},o.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},o.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},o.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},o.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},o.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},o.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},o.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},o.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},o.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},o.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},o.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},o.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},o.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},o.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},o.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},o.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},o.prototype.getConnectedNodes=function(t){return void 0!==this.body.nodes[t]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},o.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},o.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},o.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},o.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},o.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},o.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},o.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},o.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},o.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==t&&void 0!==t.id?t.id:t},o.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},o.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},o.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},o.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},o.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},o.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},o.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},o.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},o.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},o.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},o.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t},t.exports=o},function(t,e,i){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)),this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;o<10;o++){var n=o%2==0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;i-2*n<0&&(n=i/2),o-2*n<0&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse_vis=function(t,e,i,o){var n=i/2*.5522848,s=o/2*.5522848,r=t+i,a=e+o,h=t+i/2,d=e+o/2;this.beginPath(),this.moveTo(t,d),this.bezierCurveTo(t,d-s,h-n,e,h,e),this.bezierCurveTo(h+n,e,r,d-s,r,d),this.bezierCurveTo(r,d+s,h+n,a,h,a),this.bezierCurveTo(h-n,a,t,d+s,t,d),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=i,s=o*(1/3),r=n/2*.5522848,a=s/2*.5522848,h=t+n,d=e+s,l=t+n/2,u=e+s/2,c=e+(o-s/2),p=e+o;this.beginPath(),this.moveTo(h,u),this.bezierCurveTo(h,u+a,l+r,d,l,d),this.bezierCurveTo(l-r,d,t,u+a,t,u),this.bezierCurveTo(t,u-a,l-r,e,l,e),this.bezierCurveTo(l+r,e,h,u-a,h,u),this.lineTo(h,c),this.bezierCurveTo(h,c+a,l+r,p,l,p),this.bezierCurveTo(l-r,p,t,c+a,t,c),this.lineTo(t,u)},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,u=!0,c=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),c=Math.sqrt(p*p/(1+h*h)),c=r<0?-c:c,t+=c,e+=h*c,!0===u?this.lineTo(t,e):this.moveTo(t,e),d-=p,u=!u},CanvasRenderingContext2D.prototype.hexagon=function(t,e,i){this.beginPath();var o=2*Math.PI/6;this.moveTo(t+i,e);for(var n=1;n<6;n++)this.lineTo(t+i*Math.cos(o*n),e+i*Math.sin(o*n));this.closePath()})},function(t,e,i){e.en={edit:"Edit",del:"Delete selected",back:"Back",addNode:"Add Node",addEdge:"Add Edge",editNode:"Edit Node",editEdge:"Edit Edge",addDescription:"Click in an empty space to place a new node.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",createEdgeError:"Cannot link edges to a cluster.",deleteClusterError:"Clusters cannot be deleted.",editClusterError:"Clusters cannot be edited."},e.en_EN=e.en,e.en_US=e.en,e.de={edit:"Editieren",del:"Lösche Auswahl",back:"Zurück",addNode:"Knoten hinzufügen",addEdge:"Kante hinzufügen",editNode:"Knoten editieren",editEdge:"Kante editieren",addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",deleteClusterError:"Cluster können nicht gelöscht werden.",editClusterError:"Cluster können nicht editiert werden."},e.de_DE=e.de,e.es={edit:"Editar",del:"Eliminar selección",back:"Átras",addNode:"Añadir nodo",addEdge:"Añadir arista",editNode:"Editar nodo",editEdge:"Editar arista",addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",createEdgeError:"No se puede conectar una arista a un grupo.",deleteClusterError:"No es posible eliminar grupos.",editClusterError:"No es posible editar grupos."},e.es_ES=e.es,e.it={edit:"Modifica",del:"Cancella la selezione",back:"Indietro",addNode:"Aggiungi un nodo",addEdge:"Aggiungi un vertice",editNode:"Modifica il nodo",editEdge:"Modifica il vertice",addDescription:"Clicca per aggiungere un nuovo nodo",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",createEdgeError:"Non si possono collegare vertici ad un cluster",deleteClusterError:"I cluster non possono essere cancellati",editClusterError:"I clusters non possono essere modificati."},e.it_IT=e.it,e.nl={edit:"Wijzigen",del:"Selectie verwijderen",back:"Terug",addNode:"Node toevoegen",addEdge:"Link toevoegen",editNode:"Node wijzigen",editEdge:"Link wijzigen",addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",createEdgeError:"Kan geen link maken naar een cluster.",deleteClusterError:"Clusters kunnen niet worden verwijderd.",editClusterError:"Clusters kunnen niet worden aangepast."},e.nl_NL=e.nl,e.nl_BE=e.nl,e["pt-br"]={edit:"Editar",del:"Remover selecionado",back:"Voltar",addNode:"Adicionar nó",addEdge:"Adicionar aresta",editNode:"Editar nó",editEdge:"Editar aresta",addDescription:"Clique em um espaço em branco para adicionar um novo nó",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",createEdgeError:"Não foi possível linkar arestas a um cluster.",deleteClusterError:"Clusters não puderam ser removidos.",editClusterError:"Clusters não puderam ser editados."},e["pt-BR"]=e["pt-br"],e.pt_BR=e["pt-br"],e.pt_br=e["pt-br"],e.ru={edit:"Редактировать",del:"Удалить выбранное",back:"Назад",addNode:"Добавить узел",addEdge:"Добавить ребро",editNode:"Редактировать узел",editEdge:"Редактировать ребро",addDescription:"Кликните в свободное место, чтобы добавить новый узел.",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",createEdgeError:"Невозможно соединить ребра в кластер.",deleteClusterError:"Кластеры не могут быть удалены",editClusterError:"Кластеры недоступны для редактирования."},e.ru_RU=e.ru,e.cn={edit:"编辑",del:"删除选定",back:"返回",addNode:"添加节点",addEdge:"添加连接线",editNode:"编辑节点",editEdge:"编辑连接线",addDescription:"单击空白处放置新节点。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",createEdgeError:"无法将连接线连接到群集。",deleteClusterError:"无法删除群集。",editClusterError:"无法编辑群集。"},e.zh_CN=e.cn},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=function(){function t(){(0,s.default)(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return(0,a.default)(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var t=this.image.width,e=this.image.height;this.width=t,this.height=e;var i=Math.floor(e/2),o=Math.floor(e/4),n=Math.floor(e/8),s=Math.floor(e/16),r=Math.floor(t/2),a=Math.floor(t/4),h=Math.floor(t/8),d=Math.floor(t/16);this.canvas.width=3*a,this.canvas.height=i,this.coordinates=[[0,0,r,i],[r,0,a,o],[r,o,h,n],[5*h,o,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var t=this.canvas.getContext("2d"),e=this.coordinates[0];t.drawImage(this.image,e[0],e[1],e[2],e[3]);for(var i=1;i2){e*=.5;for(var r=0;e>2&&r=this.NUM_ITERATIONS&&(r=this.NUM_ITERATIONS-1);var a=this.coordinates[r];t.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,o,n,s)}else t.drawImage(this.image,i,o,n,s)}}]),t}();e.default=h},function(t,e,i){ +function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=function(){function t(){(0,s.default)(this,t),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},h.extend(this.options,this.defaultOptions)}return(0,a.default)(t,[{key:"setOptions",value:function(t){var e=["useDefaultGroups"];if(void 0!==t)for(var i in t)if(t.hasOwnProperty(i)&&-1===e.indexOf(i)){var o=t[i];this.add(i,o)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.groups[t];if(void 0===i&&e)if(!1===this.options.useDefaultGroups&&this.groupsArray.length>0){var o=this.groupIndex%this.groupsArray.length;this.groupIndex++,i={},i.color=this.groups[this.groupsArray[o]],this.groups[t]=i}else{var n=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,i={},i.color=this.defaultGroups[n],this.groups[t]=i}return i}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e.default=d},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(11),l=i(12),u=i(47).default,c=function(){function t(e,i,o,n){var r=this;if((0,s.default)(this,t),this.body=e,this.images=i,this.groups=o,this.layoutEngine=n,this.body.functions.createNode=this.create.bind(this),this.nodesListeners={add:function(t,e){r.add(e.items)},update:function(t,e){r.update(e.items,e.data,e.oldData)},remove:function(t,e){r.remove(e.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:2,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,o){if(e===t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=h.bridgeObject(this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("refreshNodes",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){h.forEach(t.nodesListeners,function(e,i){t.body.data.nodes&&t.body.data.nodes.off(i,e)}),delete t.body.functions.createNode,delete t.nodesListeners.add,delete t.nodesListeners.update,delete t.nodesListeners.remove,delete t.nodesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){if(u.parseOptions(this.options,t),void 0!==t.shape)for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&this.body.nodes[e].updateShape();if(void 0!==t.font)for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&(this.body.nodes[i].updateLabelModule(),this.body.nodes[i].needsRefresh());if(void 0!==t.size)for(var o in this.body.nodes)this.body.nodes.hasOwnProperty(o)&&this.body.nodes[o].needsRefresh();void 0===t.hidden&&void 0===t.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.data.nodes;if(t instanceof d||t instanceof l)this.body.data.nodes=t;else if(Array.isArray(t))this.body.data.nodes=new d,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new d}if(i&&h.forEach(this.nodesListeners,function(t,e){i.off(e,t)}),this.body.nodes={},this.body.data.nodes){var o=this;h.forEach(this.nodesListeners,function(t,e){o.body.data.nodes.on(e,t)});var n=this.body.data.nodes.getIds();this.add(n,!0)}!1===e&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:u)(t,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h.forEach(this.body.nodes,function(i,o){var n=t.body.data.nodes.get(o);void 0!==n&&(!0===e&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(n))})}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(!0===Array.isArray(t)){for(var i=0;i0)for(var r=0;r0)for(var p=0;p0&&void 0!==arguments[0]&&arguments[0];this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},i.add=function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)};i.position/.test(t.substr(i.position,3))?i.mono||i.ital||!//.test(t.substr(i.position,3))?!i.mono&&//.test(t.substr(i.position,6))?(i.emitBlock(),i.mono=!0,i.modStack.unshift("mono"),i.position+=5):!i.mono&&"bold"===i.mod()&&/<\/b>/.test(t.substr(i.position,4))?(i.emitBlock(),i.bold=!1,i.modStack.shift(),i.position+=3):!i.mono&&"ital"===i.mod()&&/<\/i>/.test(t.substr(i.position,4))?(i.emitBlock(),i.ital=!1,i.modStack.shift(),i.position+=3):"mono"===i.mod()&&/<\/code>/.test(t.substr(i.position,7))?(i.emitBlock(),i.mono=!1,i.modStack.shift(),i.position+=6):i.add(o):(i.emitBlock(),i.ital=!0,i.modStack.unshift("ital"),i.position+=2):(i.emitBlock(),i.bold=!0,i.modStack.unshift("bold"),i.position+=2):/&/.test(o)?/</.test(t.substr(i.position,4))?(i.add("<"),i.position+=3):/&/.test(t.substr(i.position,5))?(i.add("&"),i.position+=4):i.add("&"):i.add(o),i.position++}return i.emitBlock(),e}},{key:"splitMarkdownBlocks",value:function(t){var e=[],i={bold:!1,ital:!1,mono:!1,beginable:!0,spacing:!1,position:0,buffer:"",modStack:[]};for(i.mod=function(){return 0===this.modStack.length?"normal":this.modStack[0]},i.modName=function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":i.bold&&i.ital?"boldital":i.bold?"bold":i.ital?"ital":void 0},i.emitBlock=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(e.push({text:this.buffer,mod:this.modName()}),this.buffer="")},i.add=function(t){" "===t&&(i.spacing=!0),i.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=t&&(this.buffer+=t)};i.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(t){for(var e="",i=0;i1&&void 0!==arguments[1]?arguments[1]:"normal",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=t.replace(/^( +)/g,"$1\r"),t=t.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var o=t.split("\r");o.length>0;){var n=this.getLongestFit(o);if(0===n){var s=o[0],r=this.getLongestFitWord(s);this.lines.newLine(s.slice(0,r),e),o[0]=s.slice(r)}else{var a=n;" "===o[n-1]?n--:" "===o[a]&&a++;var h=o.slice(0,n).join("");n==o.length&&i?this.lines.append(h,e):this.lines.newLine(h,e),o=o.slice(a)}}}}]),t}();e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(90),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=function(){function t(e){(0,a.default)(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return(0,d.default)(t,[{key:"_add",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal";void 0===this.lines[t]&&(this.lines[t]={width:0,height:0,blocks:[]});var o=e;void 0!==e&&""!==e||(o=" ");var n=this.measureText(o,i),r=(0,s.default)({},n.values);r.text=e,r.width=n.width,r.mod=i,void 0!==e&&""!==e||(r.width=0),this.lines[t].blocks.push(r),this.lines[t].width+=r.width}},{key:"curWidth",value:function(){var t=this.lines[this.current];return void 0===t?0:t.width}},{key:"append",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e)}},{key:"newLine",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";this._add(this.current,t,e),this.current++}},{key:"determineLineHeights",value:function(){for(var t=0;tt&&(t=o.width),e+=o.height}this.width=t,this.height=e}},{key:"removeEmptyBlocks",value:function(){for(var t=[],e=0;e1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i);this.width=o.width+this.margin.right+this.margin.left,this.height=o.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.roundRect(this.left,this.top,this.width,this.height,s.borderRadius),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n)}},{key:"updateBoundingBox",value:function(t,e,i,o,n){this._updateBoundingBox(t,e,i,o,n);var s=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(s)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(m.default);e.default=v},function(t,e,i){i(195),t.exports=i(7).Object.getPrototypeOf},function(t,e,i){var o=i(41),n=i(85);i(87)("getPrototypeOf",function(){return function(t){return n(o(t))}})},function(t,e,i){t.exports={default:i(197),__esModule:!0}},function(t,e,i){i(198),t.exports=i(7).Object.setPrototypeOf},function(t,e,i){var o=i(17);o(o.S,"Object",{setPrototypeOf:i(199).set})},function(t,e,i){var o=i(32),n=i(27),s=function(t,e){if(n(t),!o(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{o=i(80)(Function.call,i(89).f(Object.prototype,"__proto__").set,2),o(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,i){return s(t,i),e?t.__proto__=i:o(t,i),t}}({},!1):void 0),check:s}},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i),n=Math.max(o.width+this.margin.right+this.margin.left,o.height+this.margin.top+this.margin.bottom);this.options.size=n/2,this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),this.updateBoundingBox(e,i),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,i,o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o,n,r){(0,a.default)(this,e);var h=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return h.setImages(n,r),h}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var o=2*this.options.size;return this.width=o,this.height=o,void(this.radius=.5*this.width)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n,s){this.switchImages(o),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,this._drawRawCircle(t,e,i,s),t.save(),t.clip(),this._drawImageAtPosition(t,s),t.restore(),this._drawImageLabel(t,e,i,o,n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),.5*this.width}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i),n=o.width+this.margin.right+this.margin.left;this.width=n,this.height=n,this.radius=this.width/2}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.initContextForDraw(t,s),t.database(e-this.width/2,i-this.height/2,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"diamond",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"circle",2,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this.resize(t),this.options.size}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(this.needsRefresh(e,i)){var o=this.getDimensionsFromLabel(t,e,i);this.height=2*o.height,this.width=o.width+o.height,this.radius=.5*this.width}}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-.5*this.width,this.top=i-.5*this.height,this.initContextForDraw(t,s),t.ellipse_vis(this.left,this.top,this.width,this.height),this.performFill(t,s),this.updateBoundingBox(e,i,t,o,n),this.labelModule.draw(t,e,i,o,n)}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,n=Math.sin(e)*i,s=Math.cos(e)*o;return i*o/Math.sqrt(n*n+s*s)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,o,n,s){if(this.resize(t,o,n),this.options.icon.size=this.options.icon.size||50,this.left=e-this.width/2,this.top=i-this.height/2,this._icon(t,e,i,o,n,s),void 0!==this.options.label){this.labelModule.draw(t,this.left+this.iconSize.width/2+this.margin.left,i+this.height/2+5,o)}this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){if(this.boundingBox.top=e-.5*this.options.icon.size,this.boundingBox.left=t-.5*this.options.icon.size,this.boundingBox.right=t+.5*this.options.icon.size,this.boundingBox.bottom=e+.5*this.options.icon.size,void 0!==this.options.label&&this.labelModule.size.width>0){this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5)}}},{key:"_icon",value:function(t,e,i,o,n,s){var r=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+r+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t,s),t.fillText(this.options.icon.code,e,i),this.disableShadow(t,s)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(73),m=o(f),v=function(t){function e(t,i,o,n,r){(0,a.default)(this,e);var h=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return h.setImages(n,r),h}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height){var o=2*this.options.size;return this.width=o,void(this.height=o)}this.needsRefresh(e,i)&&this._resizeImage()}},{key:"draw",value:function(t,e,i,o,n,s){if(this.switchImages(o),this.resize(),this.left=e-this.width/2,this.top=i-this.height/2,!0===this.options.shapeProperties.useBorderWithImage){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.beginPath(),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.rect(this.left-.5*t.lineWidth,this.top-.5*t.lineWidth,this.width+t.lineWidth,this.height+t.lineWidth),t.fill(),this.performStroke(t,s),t.closePath()}this._drawImageAtPosition(t,s),this._drawImageLabel(t,e,i,o,n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this._updateBoundingBox(t,e),void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)} +}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"square",2,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"hexagon",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"star",4,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(23),m=o(f),v=function(t){function e(t,i,o){(0,a.default)(this,e);var n=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o));return n._setMargins(o),n}return(0,p.default)(e,t),(0,d.default)(e,[{key:"resize",value:function(t,e,i){this.needsRefresh(e,i)&&(this.textSize=this.labelModule.getTextSize(t,e,i),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(t,e,i,o,n,s){this.resize(t,o,n),this.left=e-this.width/2,this.top=i-this.height/2,this.enableShadow(t,s),this.labelModule.draw(t,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,o,n),this.disableShadow(t,s),this.updateBoundingBox(e,i,t,o,n)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"triangle",3,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(24),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"draw",value:function(t,e,i,o,n,s){this._drawShape(t,"triangleDown",3,e,i,o,n,s)}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(11),l=i(12),u=i(74).default,c=function(){function t(e,i,o){var n=this;(0,s.default)(this,t),this.body=e,this.images=i,this.groups=o,this.body.functions.createEdge=this.create.bind(this),this.edgesListeners={add:function(t,e){n.add(e.items)},update:function(t,e){n.update(e.items)},remove:function(t,e){n.remove(e.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(t,e,i,o){if(e===t)return.5;var n=1/(e-t);return Math.max(0,(o-t)*n)}},selectionWidth:1.5,selfReferenceSize:20,shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},h.deepExtend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("_forceDisableDynamicCurves",function(e){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"dynamic"===e&&(e="continuous");var o=!1;for(var n in t.body.edges)if(t.body.edges.hasOwnProperty(n)){var s=t.body.edges[n],r=t.body.data.edges._data[n];if(void 0!==r){var a=r.smooth;void 0!==a&&!0===a.enabled&&"dynamic"===a.type&&(void 0===e?s.setOptions({smooth:!1}):s.setOptions({smooth:{type:e}}),o=!0)}}!0===i&&!0===o&&t.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){t.reconnectEdges()}),this.body.emitter.on("refreshEdges",this.refresh.bind(this)),this.body.emitter.on("refresh",this.refresh.bind(this)),this.body.emitter.on("destroy",function(){h.forEach(t.edgesListeners,function(e,i){t.body.data.edges&&t.body.data.edges.off(i,e)}),delete t.body.functions.createEdge,delete t.edgesListeners.add,delete t.edgesListeners.update,delete t.edgesListeners.remove,delete t.edgesListeners})}},{key:"setOptions",value:function(t){if(void 0!==t){u.parseOptions(this.options,t,!0,this.defaultOptions,!0);var e=!1;if(void 0!==t.smooth)for(var i in this.body.edges)this.body.edges.hasOwnProperty(i)&&(e=this.body.edges[i].updateEdgeType()||e);if(void 0!==t.font)for(var o in this.body.edges)this.body.edges.hasOwnProperty(o)&&this.body.edges[o].updateLabelModule();void 0===t.hidden&&void 0===t.physics&&!0!==e||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.edges;if(t instanceof d||t instanceof l)this.body.data.edges=t;else if(Array.isArray(t))this.body.data.edges=new d,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new d}if(o&&h.forEach(this.edgesListeners,function(t,e){o.off(e,t)}),this.body.edges={},this.body.data.edges){h.forEach(this.edgesListeners,function(t,i){e.body.data.edges.on(i,t)});var n=this.body.data.edges.getIds();this.add(n,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===i&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,o=this.body.data.edges,n=0;n1&&void 0!==arguments[1])||arguments[1];if(0!==t.length){var i=this.body.edges;h.forEach(t,function(t){var e=i[t];void 0!==e&&e.remove()}),e&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var t=this;h.forEach(this.body.edges,function(e,i){var o=t.body.data.edges._data[i];void 0!==o&&e.setOptions(o)})}},{key:"create",value:function(t){return new u(t,this.body,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var t,e=this.body.nodes,i=this.body.edges;for(t in e)e.hasOwnProperty(t)&&(e[t].edges=[]);for(t in i)if(i.hasOwnProperty(t)){var o=i[t];o.from=null,o.to=null,o.connect()}}},{key:"getConnectedNodes",value:function(t){var e=[];if(void 0!==this.body.edges[t]){var i=this.body.edges[t];void 0!==i.fromId&&e.push(i.fromId),void 0!==i.toId&&e.push(i.toId)}return e}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var t=this,e=[];h.forEach(this.body.edges,function(i,o){var n=t.body.nodes[i.toId],s=t.body.nodes[i.fromId];void 0!==n&&!0===n.isCluster||void 0!==s&&!0===s.isCluster||void 0!==n&&void 0!==s||e.push(o)}),this.remove(e,!1)}},{key:"_addMissingEdges",value:function(){var t=this.body.edges,e=this.body.data.edges,i=[];e.forEach(function(e,o){void 0===t[o]&&i.push(o)}),this.add(i,!0)}}]),t}();e.default=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),s=o(n),r=i(3),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(4),p=o(c),f=i(5),m=o(f),v=i(216),g=o(v),y=function(t){function e(t,i,o){return(0,d.default)(this,e),(0,p.default)(this,(e.__proto__||(0,a.default)(e)).call(this,t,i,o))}return(0,m.default)(e,t),(0,u.default)(e,[{key:"_line",value:function(t,e,i){var o=i[0],n=i[1];this._bezierCurve(t,e,o,n)}},{key:"_getViaCoordinates",value:function(){var t=this.from.x-this.to.x,e=this.from.y-this.to.y,i=void 0,o=void 0,n=void 0,s=void 0,r=this.options.smooth.roundness;return(Math.abs(t)>Math.abs(e)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,r){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),h=(0,s.default)(a,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,r,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=(0,s.default)(e,2),o=i[0],n=i[1],r=t,a=[];return a[0]=Math.pow(1-r,3),a[1]=3*r*Math.pow(1-r,2),a[2]=3*Math.pow(r,2)*(1-r),a[3]=Math.pow(r,3),{x:a[0]*this.fromPoint.x+a[1]*o.x+a[2]*n.x+a[3]*this.toPoint.x,y:a[0]*this.fromPoint.y+a[1]*o.y+a[2]*n.y+a[3]*this.toPoint.y}}}]),e}(g.default);e.default=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(75),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r,a){var h=1e9,d=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=t,m=e,v=[0,0,0,0];for(l=1;l<10;l++)u=.1*l,v[0]=Math.pow(1-u,3),v[1]=3*u*Math.pow(1-u,2),v[2]=3*Math.pow(u,2)*(1-u),v[3]=Math.pow(u,3),c=v[0]*t+v[1]*r.x+v[2]*a.x+v[3]*i,p=v[0]*e+v[1]*r.y+v[2]*a.y+v[3]*o,l>0&&(d=this._getDistanceToLine(f,m,c,p,n,s),h=d1&&void 0!==arguments[1]?arguments[1]:this.via,i=t,o=void 0,n=void 0;if(this.from===this.to){var r=this._getCircleData(this.from),a=(0,s.default)(r,3),h=a[0],d=a[1],l=a[2],u=2*Math.PI*(1-i);o=h+l*Math.sin(u),n=d+l-l*(1-Math.cos(u))}else o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToBezierEdge(t,e,i,o,n,s,this.via)}}]),e}(g.default);e.default=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(75),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_line",value:function(t,e,i){this._bezierCurve(t,e,i)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var t=void 0,e=void 0,i=this.options.smooth.roundness,o=this.options.smooth.type,n=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if("discrete"===o||"diagonalCross"===o){var r=void 0,a=void 0;r=a=n<=s?i*s:i*n,this.from.x>this.to.x&&(r=-r),this.from.y>=this.to.y&&(a=-a),t=this.from.x+r,e=this.from.y+a,"discrete"===o&&(n<=s?t=nthis.to.x&&(_=-_),this.from.y>=this.to.y&&(w=-w),t=this.from.x+_,e=this.from.y+w,n<=s?t=this.from.x<=this.to.x?this.to.xt?this.to.x:t:e=this.from.y>=this.to.y?this.to.y>e?this.to.y:e:this.to.y2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,i.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,i,o,n,s,r)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=t;return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y}}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(118),m=o(f),v=function(t){function e(t,i,o){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o))}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_line",value:function(t,e){t.beginPath(),t.moveTo(this.fromPoint.x,this.fromPoint.y),t.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(t,e),t.stroke(),this.disableShadow(t,e)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(t){return{x:(1-t)*this.fromPoint.x+t*this.toPoint.x,y:(1-t)*this.fromPoint.y+t*this.toPoint.y}}},{key:"_findBorderPosition",value:function(t,e){var i=this.to,o=this.from;t.id===this.from.id&&(i=this.from,o=this.to);var n=Math.atan2(i.y-o.y,i.x-o.x),s=i.x-o.x,r=i.y-o.y,a=Math.sqrt(s*s+r*r),h=t.distanceToBorder(e,n),d=(a-h)/a,l={};return l.x=(1-d)*o.x+d*i.x,l.y=(1-d)*o.y+d*i.y,l}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToLine(t,e,i,o,n,s)}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(120).default,u=i(221).default,c=i(222).default,p=i(223).default,f=i(224).default,m=i(121).default,v=i(225).default,g=i(226).default,y=i(2),b=i(119).default,_=function(){function t(e){(0,a.default)(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0},y.extend(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return(0,d.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("initPhysics",function(){t.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){t.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){t.stopSimulation(),t.ready=!1}),this.body.emitter.on("disablePhysics",function(){t.physicsEnabled=!1,t.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){t.setOptions(t.options),!0===t.ready&&t.startSimulation()}),this.body.emitter.on("startSimulation",function(){!0===t.ready&&t.startSimulation()}),this.body.emitter.on("stopSimulation",function(){t.stopSimulation()}),this.body.emitter.on("destroy",function(){t.stopSimulation(!1),t.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){t.updatePhysicsData()})}},{key:"setOptions",value:function(t){void 0!==t&&(!1===t?(this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation()):!0===t?(this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation()):(this.physicsEnabled=!0,y.selectiveNotDeepExtend(["stabilization"],this.options,t),y.mergeOptions(this.options,t,"stabilization"),void 0===t.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation()),this.timestep=this.options.timestep)),this.init()}},{key:"init",value:function(){var t;"forceAtlas2Based"===this.options.solver?(t=this.options.forceAtlas2Based,this.nodesSolver=new v(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new g(this.body,this.physicsBody,t)):"repulsion"===this.options.solver?(t=this.options.repulsion,this.nodesSolver=new u(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)):"hierarchicalRepulsion"===this.options.solver?(t=this.options.hierarchicalRepulsion,this.nodesSolver=new c(this.body,this.physicsBody,t),this.edgesSolver=new f(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)):(t=this.options.barnesHut,this.nodesSolver=new l(this.body,this.physicsBody,t),this.edgesSolver=new p(this.body,this.physicsBody,t),this.gravitySolver=new m(this.body,this.physicsBody,t)),this.modelOptions=t}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=this.simulationStep.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,!0===t&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,!0===t&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Date.now();this.physicsTick(),(Date.now()-t<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||!0===this.startedStabilization)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2.3))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=0,i=0,o=0;oo&&(t=t>0?o:-o),t}},{key:"_performStep",value:function(t){var e=this.body.nodes[t],i=this.physicsBody.forces[t],o=this.physicsBody.velocities[t];return this.previousStates[t]={x:e.x,y:e.y,vx:o.x,vy:o.y},!1===e.options.fixed.x?(o.x=this.calculateComponentVelocity(o.x,i.x,e.options.mass),e.x+=o.x*this.timestep):(i.x=0,o.x=0),!1===e.options.fixed.y?(o.y=this.calculateComponentVelocity(o.y,i.y,e.options.mass),e.y+=o.y*this.timestep):(i.y=0,o.y=0),Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)if(t.hasOwnProperty(e)&&t[e].x&&t[e].y){var i=t[e].options.fixed;this.freezeCache[e]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;if("number"!=typeof e&&(e=this.options.stabilization.iterations,console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),0===this.physicsBody.physicsNodeIndices.length)return void(this.ready=!0);this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,setTimeout(function(){return t._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var t=this,e=function(){return!1===t.stabilized&&t.stabilizationIterations0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(m.default);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(6),a=o(r),h=i(0),d=o(h),l=i(1),u=o(l),c=i(2),p=i(76).default,f=i(228).default,m=i(74).default,v=i(47).default,g=function(){function t(e){var i=this;(0,d.default)(this,t),this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},c.extend(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){i.clusteredNodes={},i.clusteredEdges={}})}return(0,u.default)(t,[{key:"clusterByHubsize",value:function(t,e){void 0===t?t=this._getHubSize():"object"===(void 0===t?"undefined":(0,a.default)(t))&&(e=this._checkOptions(t),t=this._getHubSize());for(var i=[],o=0;o=t&&i.push(n.id)}for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{},i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===e.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);var o={},n={};c.forEach(this.body.nodes,function(i,s){var r=p.cloneOptions(i);!0===e.joinCondition(r)&&(o[s]=i,c.forEach(i.edges,function(e){void 0===t.clusteredEdges[e.id]&&(n[e.id]=e)}))}),this._cluster(o,n,e,i)}},{key:"clusterByEdgeCount",value:function(t,e){var i=this,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=this._checkOptions(e);for(var n=[],r={},a=void 0,h=void 0,d=void 0,l=0;l0&&(0,s.default)(m).length>0&&!0===b)if(c=function(){for(var t=0;t1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[t];e=this._checkOptions(e,o),void 0===e.clusterNodeProperties.x&&(e.clusterNodeProperties.x=o.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=o.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=o.options.fixed.x,e.clusterNodeProperties.fixed.y=o.options.fixed.y);var n={},r={},a=o.id,h=p.cloneOptions(o);n[a]=o;for(var d=0;d-1&&(r[g.id]=g)}this._cluster(n,r,e,i)}},{key:"_createClusterEdges",value:function(t,e,i,o){for(var n=void 0,r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,u=(0,s.default)(t),c=[],p=0;p0&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=[];for(var r in t)t.hasOwnProperty(r)&&void 0!==this.clusteredNodes[r]&&n.push(r);for(var a=0;ao?a.x:o,n=a.yr?a.y:r;return{x:.5*(i+o),y:.5*(n+r)}}},{key:"openCluster",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");var o=this.body.nodes[t];if(void 0===o)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==o.isCluster||void 0===o.containedNodes||void 0===o.containedEdges)throw new Error("The node:"+t+" is not a valid cluster.");var n=this.findNode(t),s=n.indexOf(t)-1;if(s>=0){var r=n[s];return this.body.nodes[r]._openChildCluster(t),delete this.body.nodes[t],void(!0===i&&this.body.emitter.emit("_dataChanged"))}var a=o.containedNodes,h=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var d={},l={x:o.x,y:o.y};for(var u in a)if(a.hasOwnProperty(u)){var p=this.body.nodes[u];d[u]={x:p.x,y:p.y}}var f=e.releaseFunction(l,d);for(var m in a)if(a.hasOwnProperty(m)){var v=this.body.nodes[m];void 0!==f[m]&&(v.x=void 0===f[m].x?o.x:f[m].x,v.y=void 0===f[m].y?o.y:f[m].y)}}else c.forEach(a,function(t){!1===t.options.fixed.x&&(t.x=o.x),!1===t.options.fixed.y&&(t.y=o.y)});for(var g in a)if(a.hasOwnProperty(g)){var y=this.body.nodes[g];y.vx=o.vx,y.vy=o.vy,y.setOptions({physics:!0}),delete this.clusteredNodes[g]}for(var b=[],_=0;_0&&n<100;){var s=e.pop();if(void 0!==s){var r=this.body.edges[s];if(void 0!==r){n++;var a=r.clusteringEdgeReplacingIds;if(void 0===a)o.push(s);else for(var h=0;ho&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}},{key:"_createClusteredEdge",value:function(t,e,i,o,n){var s=p.cloneOptions(i,"edge");c.deepExtend(s,o),s.from=t,s.to=e,s.id="clusterEdge:"+c.randomUUID(),void 0!==n&&c.deepExtend(s,n);var r=this.body.functions.createEdge(s);return r.clusteringEdgeReplacingIds=[i.id],r.connect(),this.body.edges[r.id]=r,r}},{key:"_clusterEdges",value:function(t,e,i,o){if(e instanceof m){var n=e,s={};s[n.id]=n,e=s}if(t instanceof v){var r=t,a={};a[r.id]=r,t=a}if(void 0===i||null===i)throw new Error("_clusterEdges: parameter clusterNode required");void 0===o&&(o=i.clusterEdgeProperties),this._createClusterEdges(t,e,i,o);for(var h in e)if(e.hasOwnProperty(h)&&void 0!==this.body.edges[h]){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var l in t)t.hasOwnProperty(l)&&(this.clusteredNodes[l]={clusterId:i.id,node:this.body.nodes[l]},this.body.nodes[l].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(t){if(void 0!==t){var e=this.clusteredNodes[t];if(void 0!==e){var i=e.clusterId;if(void 0!==i)return this.body.nodes[i]}}}},{key:"_filter",value:function(t,e){var i=[];return c.forEach(t,function(t){e(t)&&i.push(t)}),i}},{key:"_updateState",value:function(){var t=this,e=void 0,i=[],o=[],n=function(e){c.forEach(t.body.nodes,function(t){!0===t.isCluster&&e(t)})};for(e in this.clusteredNodes)if(this.clusteredNodes.hasOwnProperty(e)){var r=this.body.nodes[e];void 0===r&&i.push(e)}n(function(t){for(var e=0;e0}e.endPointsValid()&&n||o.push(i)}),n(function(e){c.forEach(o,function(i){delete e.containedEdges[i],c.forEach(e.edges,function(n,s){if(n.id===i)return void(e.edges[s]=null);n.clusteringEdgeReplacingIds=t._filter(n.clusteringEdgeReplacingIds,function(t){return-1===o.indexOf(t)})}),e.edges=t._filter(e.edges,function(t){return null!==t})})}),c.forEach(o,function(e){delete t.clusteredEdges[e]}),c.forEach(o,function(e){delete t.body.edges[e]});var h=(0,s.default)(this.body.edges);c.forEach(h,function(e){var i=t.body.edges[e],o=t._isClusteredNode(i.fromId)||t._isClusteredNode(i.toId);if(o!==t._isClusteredEdge(i.id)){if(!o)throw new Error("remove edge from clustering not implemented!");var n=t._getClusterNodeForNode(i.fromId);void 0!==n&&t._clusterEdges(t.body.nodes[i.fromId],i,n);var s=t._getClusterNodeForNode(i.toId);void 0!==s&&t._clusterEdges(t.body.nodes[i.toId],i,s)}});for(var d=!1,l=!0;l;)!function(){var e=[];n(function(t){var i=(0,s.default)(t.containedNodes).length,o=!0===t.options.allowSingleNodeCluster;(o&&i<1||!o&&i<2)&&e.push(t.id)});for(var i=0;i0,d=d||l}();d&&this._updateState()}},{key:"_isClusteredNode",value:function(t){return void 0!==this.clusteredNodes[t]}},{key:"_isClusteredEdge",value:function(t){return void 0!==this.clusteredEdges[t]}}]),t}();e.default=g},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(3),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(4),u=o(l),c=i(5),p=o(c),f=i(2),m=i(47).default,v=function(t){function e(t,i,o,n,r,h){(0,a.default)(this,e);var d=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,i,o,n,r,h));return d.isCluster=!0,d.containedNodes={},d.containedEdges={},d}return(0,p.default)(e,t),(0,d.default)(e,[{key:"_openChildCluster",value:function(t){var e=this,i=this.body.nodes[t];if(void 0===this.containedNodes[t])throw new Error("node with id: "+t+" not in current cluster");if(!i.isCluster)throw new Error("node with id: "+t+" is not a cluster");delete this.containedNodes[t],f.forEach(i.edges,function(t){delete e.containedEdges[t.id]}),f.forEach(i.containedNodes,function(t,i){e.containedNodes[i]=t}),i.containedNodes={},f.forEach(i.containedEdges,function(t,i){e.containedEdges[i]=t}),i.containedEdges={},f.forEach(i.edges,function(t){f.forEach(e.edges,function(i){var o=i.clusteringEdgeReplacingIds.indexOf(t.id);-1!==o&&(f.forEach(t.clusteringEdgeReplacingIds,function(t){i.clusteringEdgeReplacingIds.push(t),e.body.edges[t].edgeReplacedById=i.id}),i.clusteringEdgeReplacingIds.splice(o,1))})}),i.edges=[]}}]),e}(m);e.default=v},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(){var t;void 0!==window&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===t?function(t){t()}:t}Object.defineProperty(e,"__esModule",{value:!0});var s=i(0),r=o(s),a=i(1),h=o(a),d=i(2),l=function(){function t(e,i){(0,r.default)(this,t),n(),this.body=e,this.canvas=i,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideNodesOnDrag:!1},d.extend(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return(0,h.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("dragStart",function(){t.dragging=!0}),this.body.emitter.on("dragEnd",function(){t.dragging=!1}),this.body.emitter.on("_resizeNodes",function(){t._resizeNodes()}),this.body.emitter.on("_redraw",function(){!1===t.renderingActive&&t._redraw()}),this.body.emitter.on("_blockRedraw",function(){t.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){t.allowRedraw=!0,t.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",this._requestRedraw.bind(this)),this.body.emitter.on("_startRendering",function(){t.renderRequests+=1,t.renderingActive=!0,t._startRendering()}),this.body.emitter.on("_stopRendering",function(){t.renderRequests-=1,t.renderingActive=t.renderRequests>0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,!0===t.requiresTimeout?clearTimeout(t.renderTimer):window.cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];d.selectiveDeepExtend(e,this.options,t)}}},{key:"_requestNextFrame",value:function(t,e){if("undefined"!=typeof window){var i=void 0,o=window;return!0===this.requiresTimeout?i=o.setTimeout(t,e):o.requestAnimationFrame&&(i=o.requestAnimationFrame(t)),i}}},{key:"_startRendering",value:function(){!0===this.renderingActive&&void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(this._renderStep.bind(this),this.simulationInterval))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(this.renderTimer=void 0,!0===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame(function(){t._redraw(!1)},0))}},{key:"_redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===this.allowRedraw){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1,0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform();var e=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),!1===t&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&this._drawEdges(e),(!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag)&&this._drawNodes(e,t),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),!0===t&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var t=this.canvas.getContext();t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=this.canvas.DOMtoCanvas({x:-20,y:-20}),a=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),h={top:r.y,left:r.x,bottom:a.y,right:a.x},d=0;d0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new h(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:h.DIRECTION_ALL}),d.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new h(this.frame),d.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e)this._getCameraState(s),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var r=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),a=Math.round(this.frame.canvas.clientHeight*this.pixelRatio) +;this.frame.canvas.width===r&&this.frame.canvas.height===a||this._getCameraState(s),this.frame.canvas.width!==r&&(this.frame.canvas.width=r,i=!0),this.frame.canvas.height!==a&&(this.frame.canvas.height=a,i=!0)}return!0===i&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");var e=1;return"undefined"!=typeof window&&(e=window.devicePixelRatio||1),e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(76).default,l=function(){function t(e,i){var o=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",this.fit.bind(this)),this.body.emitter.on("animationFinished",function(){o.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",this.releaseNode.bind(this))}return(0,a.default)(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=void 0;if(void 0!==t.nodes&&0!==t.nodes.length||(t.nodes=this.body.nodeIndices),!0===e){var n=0;for(var s in this.body.nodes)if(this.body.nodes.hasOwnProperty(s)){var r=this.body.nodes[s];!0===r.predefinedPosition&&(n+=1)}if(n>.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=d.getRange(this.body.nodes,t.nodes);o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;o*=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600)}else{this.body.emitter.emit("_resizeNodes"),i=d.getRange(this.body.nodes,t.nodes);var a=1.1*Math.abs(i.maxX-i.minX),h=1.1*Math.abs(i.maxY-i.minY),l=this.canvas.frame.canvas.clientWidth/a,u=this.canvas.frame.canvas.clientHeight/h;o=l<=u?l:u}o>1?o=1:0===o&&(o=1);var c=d.findCenter(i),p={position:c,scale:o,animation:t.animation};this.moveTo(p)}},{key:"focus",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){if(void 0===t)return void(t={});void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t)}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(2),d=i(233).default,l=i(104).default,u=function(){function t(e,i,o){(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=o,this.navigationHandler=new d(e,i),this.body.eventListeners.onTap=this.onTap.bind(this),this.body.eventListeners.onTouch=this.onTouch.bind(this),this.body.eventListeners.onDoubleTap=this.onDoubleTap.bind(this),this.body.eventListeners.onHold=this.onHold.bind(this),this.body.eventListeners.onDragStart=this.onDragStart.bind(this),this.body.eventListeners.onDrag=this.onDrag.bind(this),this.body.eventListeners.onDragEnd=this.onDragEnd.bind(this),this.body.eventListeners.onMouseWheel=this.onMouseWheel.bind(this),this.body.eventListeners.onPinch=this.onPinch.bind(this),this.body.eventListeners.onMouseMove=this.onMouseMove.bind(this),this.body.eventListeners.onRelease=this.onRelease.bind(this),this.body.eventListeners.onContext=this.onContext.bind(this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=this.getPointer.bind(this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0},h.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("destroy",function(){clearTimeout(t.popupTimer),delete t.body.functions.getPointer})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];h.selectiveNotDeepExtend(e,this.options,t),h.mergeOptions(this.options,t,"keyboard"),t.tooltip&&(h.extend(this.options.tooltip,t.tooltip),t.tooltip.color&&(this.options.tooltip.color=h.parseColor(t.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(t){return{x:t.x-h.getAbsoluteLeft(this.canvas.frame.canvas),y:t.y-h.getAbsoluteTop(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(t){(new Date).valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.selectionHandler.getSelection(),n=!1;n=!0===i?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var s=this.selectionHandler.getSelection(),r=this._determineDifference(o,s),a=this._determineDifference(s,o);r.edges.length>0&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,o),n=!0),r.nodes.length>0&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,o),n=!0),a.nodes.length>0&&(this.selectionHandler._generateClickEvent("selectNode",e,t),n=!0),a.edges.length>0&&(this.selectionHandler._generateClickEvent("selectEdge",e,t),n=!0),!0===n&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineDifference",value:function(t,e){var i=function(t,e){for(var i=[],o=0;o10&&(t=10);var o=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=h[u[u.length-1]],s=!0)}if(void 0===this.popupObj&&!1===s){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,v=[],g=0;g0&&(this.popupObj=f[v[v.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new l(this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var o=this.selectionHandler.getNodeAt(t);i=void 0!==o&&o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===i&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(10),d=i(37),l=i(35),u=function(){function t(e,i){var o=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){o.activated=!0,o.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){o.activated=!1,o.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){void 0!==o.keycharm&&o.keycharm.destroy()}),this.options={}}return(0,a.default)(t,[{key:"setOptions",value:function(t){void 0!==t&&(this.options=t,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var t=0;t700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=e/t,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=e,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=e/t,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=e,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=l({container:window,preventDefault:!0}):this.keycharm=l({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),s=o(n),r=i(1),a=o(r),h=i(47).default,d=i(74).default,l=i(2),u=function(){function t(e,i){var o=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionObj={nodes:[],edges:[]},this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},l.extend(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){o.updateSelection()})}return(0,a.default)(t,[{key:"setOptions",value:function(t){if(void 0!==t){var e=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];l.selectiveDeepExtend(e,this.options,t)}}},{key:"selectOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);this.unselectAll(),void 0!==i&&(e=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return e}},{key:"selectAdditionalOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);void 0!==i&&(e=!0,!0===i.isSelected()?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return e}},{key:"_initBaseEvent",value:function(t,e){var i={};return i.pointer={DOM:{x:e.x,y:e.y},canvas:this.canvas.DOMtoCanvas(e)},i.event=t,i}},{key:"_generateClickEvent",value:function(t,e,i,o){var n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=this._initBaseEvent(e,i);if(!0===n)s.nodes=[],s.edges=[];else{var r=this.getSelection();s.nodes=r.nodes,s.edges=r.edges}void 0!==o&&(s.previousSelection=o),"click"==t&&(s.items=this.getClickedItems(i)),this.body.emitter.emit(t,s)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==t&&(t instanceof h&&!0===e&&this._selectConnectedEdges(t),t.select(),this._addToSelection(t),!0)}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],i=this.body.nodes,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(t),o=this._getAllNodesOverlappingWith(i);return o.length>0?!0===e?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(t),o=10,n=null,s=this.body.edges,r=0;r1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,o=void 0 +;if(!t||!t.nodes&&!t.edges)throw"Selection must be an object with nodes and/or edges properties";if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes)for(i=0;i1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(this.body.nodes.hasOwnProperty(t)||delete this.selectionObj.nodes[t]);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(this.body.edges.hasOwnProperty(e)||delete this.selectionObj.edges[e])}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),i=[],o=this.body.nodeIndices,n=this.body.nodes,s=o.length-1;s>=0;s--){var r=n[o[s]],a=r.getItemsOnPoint(e);i.push.apply(i,a)}for(var h=this.body.edgeIndices,d=this.body.edges,l=h.length-1;l>=0;l--){var u=d[h[l]],c=u.getItemsOnPoint(e);i.push.apply(i,c)}return i}}]),t}();e.default=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),s=o(n),r=i(6),a=o(r),h=i(8),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=i(76).default,v=i(236),g=v.HorizontalStrategy,y=v.VerticalStrategy,b=function(){function t(){(0,u.default)(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return(0,p.default)(t,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(this.parentReference[t].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var e=this,i={};return function t(o){if(void 0!==i[o])return i[o];var n=e.levels[o];if(e.childrenReference[o]){var s=e.childrenReference[o];if(s.length>0)for(var r=0;r0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===o)return this.body.emitter.emit("refresh"),f.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===(0,a.default)(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:i};else{var o=t.edges.smooth;void 0!==o.type&&"dynamic"!==o.type&&(i=o.type),this.optionsBackup.edges={smooth:void 0===o.enabled||o.enabled,type:void 0===o.type?"dynamic":o.type,roundness:void 0===o.roundness?.5:o.roundness,forceDirection:void 0!==o.forceDirection&&o.forceDirection},t.edges.smooth={enabled:void 0===o.enabled||o.enabled,type:i,roundness:void 0===o.roundness?.5:o.roundness,forceDirection:void 0!==o.forceDirection&&o.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this.randomSeed=this.initialRandomSeed;for(var e=t.length+50,i=0;i150){for(var s=t.length;t.length>150&&o<=10;){o+=1;var r=t.length;o%3==0?this.body.modules.clustering.clusterBridges(n):this.body.modules.clustering.clusterOutliers(n);if(r==t.length&&o%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*s)})}o>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var a=0;a0){var t=void 0,e=void 0,i=!1,o=!1;this.lastNodeOnLevel={},this.hierarchical=new b;for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0!==t.options.level?(i=!0,this.hierarchical.levels[e]=t.options.level):o=!0);if(!0===o&&!0===i)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===o){var n=this.options.hierarchical.sortMethod;"hubsize"===n?this._determineLevelsByHubsize():"directed"===n?this._determineLevelsDirected():"custom"===n&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&this.hierarchical.ensureLevel(s);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},o=function(e,i){var o=t.hierarchical.trees;for(var n in o)o.hasOwnProperty(n)&&o[n]===e&&t.direction.shift(n,i)},n=function(){for(var e=[],i=0;i0)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:1e9,o=1e9,n=1e9,r=1e9,a=-1e9;for(var h in e)if(e.hasOwnProperty(h)){var d=t.body.nodes[h],l=t.hierarchical.levels[d.id],u=t.direction.getPosition(d),c=t._getSpaceAroundNode(d,e),p=(0,s.default)(c,2),f=p[0],m=p[1];o=Math.min(f,o),n=Math.min(m,n),l<=i&&(r=Math.min(u,r),a=Math.max(u,a))}return[r,a,o,n]},h=function(e,i){var o=t.hierarchical.getMaxLevel(e.id),n=t.hierarchical.getMaxLevel(i.id);return Math.min(o,n)},d=function(e,i,o){for(var n=t.hierarchical,s=0;s1)for(var h=0;h2&&void 0!==arguments[2]&&arguments[2],s=t.direction.getPosition(i),d=t.direction.getPosition(o),l=Math.abs(d-s),u=t.options.hierarchical.nodeSpacing;if(l>u){var c={},p={};r(i,c),r(o,p);var f=h(i,o),m=a(c,f),v=a(p,f),g=m[1],y=v[0],b=v[2];if(Math.abs(g-y)>u){var _=g-y+u;_<-b+u&&(_=-b+u),_<0&&(t._shiftBlock(o.id,_),e=!0,!0===n&&t._centerParent(o))}}},u=function(o,n){for(var h=n.id,d=n.edges,l=t.hierarchical.levels[n.id],u=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,c={},p=[],f=0;f0?p=Math.min(c,u-t.options.hierarchical.nodeSpacing):c<0&&(p=-Math.min(-c,l-t.options.hierarchical.nodeSpacing)),0!=p&&(t._shiftBlock(n.id,p),e=!0)}(_),_=b(o,d),function(i){var o=t.direction.getPosition(n),r=t._getSpaceAroundNode(n),a=(0,s.default)(r,2),h=a[0],d=a[1],l=i-o,u=o;l>0?u=Math.min(o+(d-t.options.hierarchical.nodeSpacing),i):l<0&&(u=Math.max(o-(h-t.options.hierarchical.nodeSpacing),i)),u!==o&&(t.direction.setPosition(n,u),e=!0)}(_)};!0===this.options.hierarchical.blockShifting&&(function(i){var o=t.hierarchical.getLevels();o=o.reverse();for(var n=0;n0&&Math.abs(p)0&&(a=this.direction.getPosition(i[n-1])+r),this.direction.setPosition(s,a,e),this._validatePositionAndContinue(s,e,a),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){var i=this.hierarchical.childrenReference[t];if(void 0!==i){for(var o=[],n=0;ne&&void 0===this.positionedNodes[r.id]))return;var h=this.options.hierarchical.nodeSpacing,d=void 0;d=0===s?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(o[s-1])+h,this.direction.setPosition(r,d,a),this._validatePositionAndContinue(r,a,d)}var l=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[t],l,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,i){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var o=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(i-ot.hierarchical.levels[e.id]&&t.hierarchical.addRelation(e.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments[1],o={},n=function i(n,s){if(void 0===o[n.id]){t.hierarchical.setTreeIndex(n,s),o[n.id]=!0;for(var r=void 0,a=t._getActiveEdges(n),h=0;h2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,i),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),t}(),m=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,d.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.x||void 0===e.x?0:t.x-e.x})}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),e}(f),v=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,d.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.y||void 0===e.y?0:t.y-e.y})}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),e}(f);e.HorizontalStrategy=v,e.VerticalStrategy=m},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),s=o(n),r=i(19),a=o(r),h=i(6),d=o(h),l=i(0),u=o(l),c=i(1),p=o(c),f=i(2),m=i(10),v=i(37),g=function(){function t(e,i,o){var n=this;(0,u.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=o,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this.manipulationHammers=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},f.extend(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){n._clean()}),this.body.emitter.on("_dataChanged",this._restore.bind(this)),this.body.emitter.on("_resetData",this._restore.bind(this))}return(0,p.default)(t,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(t,e,i){void 0!==e&&(void 0!==e.locale?this.options.locale=e.locale:this.options.locale=i.locale,void 0!==e.locales?this.options.locales=e.locales:this.options.locales=i.locales),void 0!==t&&("boolean"==typeof t?this.options.enabled=t:(this.options.enabled=!0,f.deepExtend(this.options,t)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var t=this.selectionHandler._getSelectedNodeCount(),e=this.selectionHandler._getSelectedEdgeCount(),i=t+e,o=this.options.locales[this.options.locale],n=!1;!1!==this.options.addNode&&(this._createAddNodeButton(o),n=!0),!1!==this.options.addEdge&&(!0===n?this._createSeperator(1):n=!0,this._createAddEdgeButton(o)),1===t&&"function"==typeof this.options.editNode?(!0===n?this._createSeperator(2):n=!0,this._createEditNodeButton(o)):1===e&&0===t&&!1!==this.options.editEdge&&(!0===n?this._createSeperator(3):n=!0,this._createEditEdgeButton(o)),0!==i&&(t>0&&!1!==this.options.deleteNode?(!0===n&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&!1!==this.options.deleteEdge&&(!0===n&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==e.isCluster){var i=f.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",this._dragStartEdge.bind(this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"===(0,d.default)(this.options.editEdge)&&"function"==typeof this.options.editEdge.editWithoutDrag&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId)){var t=this.body.edges[this.edgeBeingEditedId];return void this._performEditEdge(t.from,t.to)}if(!0===this.guiEnabled){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId){var i=this.body.edges[this.edgeBeingEditedId],o=this._getNewTargetNode(i.from.x,i.from.y),n=this._getNewTargetNode(i.to.x,i.to.y);this.temporaryIds.nodes.push(o.id),this.temporaryIds.nodes.push(n.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id),this._temporaryBindUI("onTouch",this._controlNodeTouch.bind(this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",this._controlNodeDragStart.bind(this)),this._temporaryBindUI("onDrag",this._controlNodeDrag.bind(this)),this._temporaryBindUI("onDragEnd",this._controlNodeDragEnd.bind(this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(t){var e=i.edgeType.findBorderPositions(t);!1===o.selected&&(o.x=e.from.x,o.y=e.from.y),!1===n.selected&&(n.x=e.to.x,n.y=e.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=f.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+f.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:t,right:t,top:e,bottom:e},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},f.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,!0===this.guiEnabled&&(f.recursiveDOMDelete(this.editModeDiv),f.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+t]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+t].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+t])}},{key:"_createAddNodeButton",value:function(t){var e=this._createButton("addNode","vis-button vis-add",t.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(t){var e=this._createButton("addEdge","vis-button vis-connect",t.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(t){var e=this._createButton("editNode","vis-button vis-edit",t.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(t){var e=this._createButton("editEdge","vis-button vis-edit",t.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(t){var e;e=this.options.rtl?"vis-button vis-delete-rtl":"vis-button vis-delete";var i=this._createButton("delete",e,t.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindHammerToDiv(i,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(t){var e=this._createButton("back","vis-button vis-back",t.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[t+"Div"]=document.createElement("div"),this.manipulationDOM[t+"Div"].className=e,this.manipulationDOM[t+"Label"]=document.createElement("div"),this.manipulationDOM[t+"Label"].className=o,this.manipulationDOM[t+"Label"].innerHTML=i,this.manipulationDOM[t+"Div"].appendChild(this.manipulationDOM[t+"Label"]),this.manipulationDOM[t+"Div"]}},{key:"_createDescription",value:function(t){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",t))}},{key:"_temporaryBindEvent",value:function(t,e){this.temporaryEventFunctions.push({event:t,boundFunction:e}),this.body.emitter.on(t,e)}},{key:"_temporaryBindUI",value:function(t,e){if(void 0===this.body.eventListeners[t])throw new Error("This UI function does not exist. Typo? You tried: "+t+" possible are: "+(0,a.default)((0,s.default)(this.body.eventListeners)));this.temporaryUIFunctions[t]=this.body.eventListeners[t],this.body.eventListeners[t]=e}},{key:"_unbindTemporaryUIs",value:function(){for(var t in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(t)&&(this.body.eventListeners[t]=this.temporaryUIFunctions[t],delete this.temporaryUIFunctions[t]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(!0===s.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=f.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(!0===i.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+f.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(!0===s.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(t){var e=this.lastTouch;this.selectionHandler._generateClickEvent("dragStart",t,e,void 0,!0)}},{key:"_performAddNode",value:function(t){var e=this,i={id:f.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e,label:this.body.data.edges._data[this.edgeBeingEditedId].label},n=this.options.editEdge;if("object"===(void 0===n?"undefined":(0,d.default)(n))&&(n=n.editWithoutDrag),"function"==typeof n){if(2!==n.length)throw new Error("The function for edit does not support two arguments (data, callback)");n(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e.default=g},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),s=o(n),r=i(0),a=o(r),h=i(1),d=o(h),l=i(239),u=o(l),c=function(){function t(e,i,o){(0,a.default)(this,t),this.body=e,this.springLength=i,this.springConstant=o,this.distanceSolver=new u.default}return(0,d.default)(t,[{key:"setOptions",value:function(t){t&&(t.springLength&&(this.springLength=t.springLength),t.springConstant&&(this.springConstant=t.springConstant))}},{key:"solve",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.distanceSolver.getDistances(this.body,t,e);this._createL_matrix(o),this._createK_matrix(o),this._createE_matrix();for(var n=0,r=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),a=1e9,h=0,d=0,l=0,u=0,c=0;a>.01&&n1&&c<5;){c+=1,this._moveNode(h,d,l);var m=this._getEnergy(h),v=(0,s.default)(m,3);u=v[0],d=v[1],l=v[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=0,n=e[0],r=0,a=0,h=0;h0&&e-1 in t)}function q(t){return a.call(t,function(t){return null!=t})}function H(t){return t.length>0?r.fn.concat.apply([],t):t}function I(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function V(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function _(t,e){return"number"!=typeof e||h[I(t)]?e:e+"px"}function B(t){var e,n;return c[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function U(t){return"children"in t?u.call(t.children):r.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function J(t,r,i){for(n in r)i&&(Z(r[n])||L(r[n]))?(Z(r[n])&&!Z(t[n])&&(t[n]={}),L(r[n])&&!L(t[n])&&(t[n]=[]),J(t[n],r[n],i)):r[n]!==e&&(t[n]=r[n])}function W(t,e){return null==e?r(t):r(t).filter(e)}function Y(t,e,n,r){return F(e)?e.call(t,n,r):e}function G(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function K(t,n){var r=t.className||"",i=r&&r.baseVal!==e;return n===e?i?r.baseVal:r:void(i?r.baseVal=n:t.className=n)}function Q(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?r.parseJSON(t):t):t}catch(e){return t}}function tt(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)tt(t.childNodes[n],e)}var e,n,r,i,O,P,o=[],s=o.concat,a=o.filter,u=o.slice,f=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],x=["after","prepend","before","append"],b=f.createElement("table"),E=f.createElement("tr"),j={tr:f.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:E,th:E,"*":f.createElement("div")},w=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},C=S.toString,N={},A=f.createElement("div"),D={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};return N.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=A).appendChild(t),r=~N.qsa(i,e).indexOf(t),o&&A.removeChild(t),r},O=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return a.call(t,function(e,n){return t.indexOf(e)==n})},N.fragment=function(t,n,i){var o,s,a;return d.test(t)&&(o=r(f.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1>")),n===e&&(n=p.test(t)&&RegExp.$1),n in j||(n="*"),a=j[n],a.innerHTML=""+t,o=r.each(u.call(a.childNodes),function(){a.removeChild(this)})),Z(i)&&(s=r(o),r.each(i,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},N.Z=function(t,e){return new X(t,e)},N.isZ=function(t){return t instanceof N.Z},N.init=function(t,n){var i;if(!t)return N.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))i=N.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}else{if(F(t))return r(f).ready(t);if(N.isZ(t))return t;if(L(t))i=q(t);else if(R(t))i=[t],t=null;else if(p.test(t))i=N.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}}return N.Z(i,t)},r=function(t,e){return N.init(t,e)},r.extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){J(t,n,e)}),t},N.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=$,r.isFunction=F,r.isWindow=k,r.isArray=L,r.isPlainObject=Z,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},r.camelCase=O,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,r=[];if(z(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return F(t)?this.not(this.not(t)):r(a.call(this,function(e){return N.matches(e,t)}))},add:function(t,e){return r(P(this.concat(r(t,e))))},is:function(t){return this.length>0&&N.matches(this[0],t)},not:function(t){var n=[];if(F(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):z(t)&&F(t.item)?u.call(t):r(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return r(n)},has:function(t){return this.filter(function(){return R(t)?r.contains(this,t):r(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!R(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!R(t)?t:r(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?r(t).filter(function(){var t=this;return o.some.call(n,function(e){return r.contains(e,t)})}):1==this.length?r(N.qsa(this[0],t)):this.map(function(){return N.qsa(this,t)}):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each(function(r,o){for(;o&&!(i?i.indexOf(o)>=0:N.matches(o,t));)o=o!==e&&!M(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,function(t){return(t=t.parentNode)&&!M(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return W(e,t)},parent:function(t){return W(P(this.pluck("parentNode")),t)},children:function(t){return W(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||u.call(this.childNodes)})},siblings:function(t){return W(this.map(function(t,e){return a.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return r.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=B(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=F(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each(function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){r(this[0]).before(t=r(t));for(var e;(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=F(t);return this.each(function(n){var i=r(this),o=i.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):i.append(s)})},unwrap:function(){return this.parent().each(function(){r(this).replaceWith(r(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;r(this).empty().append(Y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(R(t))for(n in t)G(this,n,t[n]);else G(this,t,Y(this,r,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){G(this,t)},this)})},prop:function(t,e){return t=D[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=D[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var r="data-"+t.replace(v,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?Q(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=Y(this,t,e,this.value)})):this[0]&&(this[0].multiple?r(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=r(this),i=Y(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[O(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var o={},s=getComputedStyle(i,"");return r.each(t,function(t,e){o[e]=i.style[O(e)]||s.getPropertyValue(e)}),o}}var a="";if("string"==$(t))e||0===e?a=I(t)+":"+_(t,e):this.each(function(){this.style.removeProperty(I(t))});else for(n in t)t[n]||0===t[n]?a+=I(n)+":"+_(n,t[n])+";":this.each(function(){this.style.removeProperty(I(n))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(K(t))},V(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var n=K(this),o=Y(this,t,e,n);o.split(/\s+/g).forEach(function(t){r(this).hasClass(t)||i.push(t)},this),i.length&&K(this,n+(n?" ":"")+i.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return K(this,"");i=K(this),Y(this,t,n,i).split(/\s+/g).forEach(function(t){i=i.replace(V(t)," ")}),K(this,i.trim())}})},toggleClass:function(t,n){return t?this.each(function(i){var o=r(this),s=Y(this,t,i,K(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||f.body;t&&!g.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t})}},r.fn.detach=r.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});r.fn[t]=function(i){var o,s=this[0];return i===e?k(s)?s["inner"+n]:M(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=r(this),s.css(t,Y(this,i,e,s[t]()))})}}),x.forEach(function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,function(t){var i=[];return n=$(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(N.fragment(t)))}),i):"object"==n||null==t?t:N.fragment(t)}),u=this.length>1;return s.length<1?this:this.each(function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var c=r.contains(f.documentElement,a);s.forEach(function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&tt(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}}),N.Z.prototype=X.prototype=r.fn,N.uniq=P,N.deserializeValue=Q,r.zepto=N,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,r){if(e=d(e),e.ns)var i=m(e.ns);return(a[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!r||t.sel==r)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!f&&t.e in c||!!e}function v(t){return l[t]||f&&c[t]||t}function y(t,n,i,o,s,u,f){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(i);var a=d(n);a.fn=i,a.sel=s,a.e in l&&(i=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?a.fn.apply(this,arguments):void 0}),a.del=u;var c=u||i;a.proxy=function(e){if(e=T(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==r?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(v(a.e),a.proxy,g(a,f))})}function x(t,e,n,r,i){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,r).forEach(function(e){delete a[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,i))})})}function T(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(w,function(e,r){var i=n[e];t[e]=function(){return this[r]=b,i&&i.apply(n,arguments)},t[r]=E}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==r?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function S(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===r||(n[e]=t[e]);return T(n,t)}var r,n=1,i=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},a={},u={},f="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:y,remove:x},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var a=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return a._zid=h(t),a}if(s(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,w={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,u,f){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,a,e,f)}),h):(s(n)||o(u)||u===!1||(u=a,a=n,n=r),(u===r||a===!1)&&(u=a,a=r),u===!1&&(u=E),h.each(function(r,o){f&&(c=function(t){return x(o,t.type,u),u.apply(this,arguments)}),n&&(l=function(t){var r,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(r=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||u).apply(s,[r].concat(i.call(arguments,1)))):void 0}),y(o,t,u,a,n,l||c)}))},e.fn.off=function(t,n,i){var a=this;return t&&!s(t)?(e.each(t,function(t,e){a.off(t,n,e)}),a):(s(n)||o(i)||i===!1||(i=n,n=r),i===!1&&(i=E),a.each(function(){x(this,t,i,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):T(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var r,i;return this.each(function(o,a){r=S(s(t)?e.Event(t):t),r._args=n,r.target=a,e.each(p(a,t.type||t),function(t,e){return i=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){function p(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function d(t,e,n,i){return t.global?p(e||r,n,i):void 0}function m(t){t.global&&0===e.active++&&d(t,null,"ajaxStart")}function g(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}function v(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||d(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void d(e,n,"ajaxSend",[t,e])}function y(t,e,n,r){var i=n.context,o="success";n.success.call(i,t,o,e),r&&r.resolveWith(i,[t,o,e]),d(n,i,"ajaxSuccess",[e,n,t]),b(o,e,n)}function x(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),b(e,n,r)}function b(t,e,n){var r=n.context;n.complete.call(r,e,t),d(n,r,"ajaxComplete",[e,n]),g(n)}function E(t,e,n){if(n.dataFilter==j)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function j(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==c?"html":t==f?"json":a.test(t)?"script":u.test(t)&&"xml")||"text"}function T(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function S(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=T(t.url,t.data),t.data=void 0)}function C(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function O(t,n,r,i){var o,s=e.isArray(n),a=e.isPlainObject(n);e.each(n,function(n,u){o=e.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?t.add(u.name,u.value):"array"==o||!r&&"object"==o?O(t,u,r,n):t.add(n,u)})}var i,o,n=+new Date,r=t.document,s=/)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,f="application/json",c="text/html",l=/^\s*$/,h=r.createElement("a");h.href=t.location.href,e.active=0,e.ajaxJSONP=function(i,o){if(!("type"in i))return e.ajax(i);var c,p,s=i.jsonpCallback,a=(e.isFunction(s)?s():s)||"Zepto"+n++,u=r.createElement("script"),f=t[a],l=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:l};return o&&o.promise(h),e(u).on("load error",function(n,r){clearTimeout(p),e(u).off().remove(),"error"!=n.type&&c?y(c[0],h,i,o):x(null,r||"error",h,i,o),t[a]=f,c&&e.isFunction(f)&&f(c[0]),f=c=void 0}),v(h,i)===!1?(l("abort"),h):(t[a]=function(){c=arguments},u.src=i.url.replace(/\?(.+)=\?/,"?$1="+a),r.head.appendChild(u),i.timeout>0&&(p=setTimeout(function(){l("timeout")},i.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:f,xml:"application/xml, text/xml",html:c,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:j},e.ajax=function(n){var u,f,s=e.extend({},n||{}),a=e.Deferred&&e.Deferred();for(i in e.ajaxSettings)void 0===s[i]&&(s[i]=e.ajaxSettings[i]);m(s),s.crossDomain||(u=r.createElement("a"),u.href=s.url,u.href=u.href,s.crossDomain=h.protocol+"//"+h.host!=u.protocol+"//"+u.host),s.url||(s.url=t.location.toString()),(f=s.url.indexOf("#"))>-1&&(s.url=s.url.slice(0,f)),S(s);var c=s.dataType,p=/\?.+=\?/.test(s.url);if(p&&(c="jsonp"),s.cache!==!1&&(n&&n.cache===!0||"script"!=c&&"jsonp"!=c)||(s.url=T(s.url,"_="+Date.now())),"jsonp"==c)return p||(s.url=T(s.url,s.jsonp?s.jsonp+"=?":s.jsonp===!1?"":"callback=?")),e.ajaxJSONP(s,a);var P,d=s.accepts[c],g={},b=function(t,e){g[t.toLowerCase()]=[t,e]},C=/^([\w-]+:)\/\//.test(s.url)?RegExp.$1:t.location.protocol,N=s.xhr(),O=N.setRequestHeader;if(a&&a.promise(N),s.crossDomain||b("X-Requested-With","XMLHttpRequest"),b("Accept",d||"*/*"),(d=s.mimeType||d)&&(d.indexOf(",")>-1&&(d=d.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(d)),(s.contentType||s.contentType!==!1&&s.data&&"GET"!=s.type.toUpperCase())&&b("Content-Type",s.contentType||"application/x-www-form-urlencoded"),s.headers)for(o in s.headers)b(o,s.headers[o]);if(N.setRequestHeader=b,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=j,clearTimeout(P);var t,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==C){if(c=c||w(s.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)t=N.response;else{t=N.responseText;try{t=E(t,c,s),"script"==c?(1,eval)(t):"xml"==c?t=N.responseXML:"json"==c&&(t=l.test(t)?null:e.parseJSON(t))}catch(r){n=r}if(n)return x(n,"parsererror",N,s,a)}y(t,N,s,a)}else x(N.statusText||null,N.status?"error":"abort",N,s,a)}},v(N,s)===!1)return N.abort(),x(null,"abort",N,s,a),N;var A="async"in s?s.async:!0;if(N.open(s.type,s.url,A,s.username,s.password),s.xhrFields)for(o in s.xhrFields)N[o]=s.xhrFields[o];for(o in g)O.apply(N,g[o]);return s.timeout>0&&(P=setTimeout(function(){N.onreadystatechange=j,N.abort(),x(null,"timeout",N,s,a)},s.timeout)),N.send(s.data?s.data:null),N},e.get=function(){return e.ajax(C.apply(null,arguments))},e.post=function(){var t=C.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=C.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var a,i=this,o=t.split(/\s/),u=C(t,n,r),f=u.success;return o.length>1&&(u.url=o[0],a=o[1]),u.success=function(t){i.html(a?e("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ").html(t.replace(s,"")).find(a):t),f&&f.apply(i,arguments)},e.ajax(u),this};var N=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(t)+"="+N(n))},O(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;t.getComputedStyle=function(t,e){try{return n(t,e)}catch(r){return null}}}}(),e}); \ No newline at end of file diff --git a/documentation/js/menu-wc.js b/documentation/js/menu-wc.js new file mode 100644 index 0000000000..0c2f6b30ec --- /dev/null +++ b/documentation/js/menu-wc.js @@ -0,0 +1,2023 @@ +'use strict'; + +customElements.define('compodoc-menu', class extends HTMLElement { + constructor() { + super(); + this.isNormalMode = this.getAttribute('mode') === 'normal'; + } + + connectedCallback() { + this.render(this.isNormalMode); + } + + render(isNormalMode) { + let tp = lithtml.html(` + + `); + this.innerHTML = tp.strings; + } +}); \ No newline at end of file diff --git a/documentation/js/menu-wc_es5.js b/documentation/js/menu-wc_es5.js new file mode 100644 index 0000000000..8cc01d4695 --- /dev/null +++ b/documentation/js/menu-wc_es5.js @@ -0,0 +1,40 @@ +'use strict'; + +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } +function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } +function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } +function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } +function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); } +function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; } +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } +function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } } +function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } +function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } +customElements.define('compodoc-menu', /*#__PURE__*/function (_HTMLElement) { + function _class() { + var _this; + _classCallCheck(this, _class); + _this = _callSuper(this, _class); + _this.isNormalMode = _this.getAttribute('mode') === 'normal'; + return _this; + } + _inherits(_class, _HTMLElement); + return _createClass(_class, [{ + key: "connectedCallback", + value: function connectedCallback() { + this.render(this.isNormalMode); + } + }, { + key: "render", + value: function render(isNormalMode) { + var tp = lithtml.html("\n \n ")); + this.innerHTML = tp.strings; + } + }]); +}( /*#__PURE__*/_wrapNativeSuper(HTMLElement))); \ No newline at end of file diff --git a/documentation/js/menu.js b/documentation/js/menu.js new file mode 100644 index 0000000000..984c65d0c3 --- /dev/null +++ b/documentation/js/menu.js @@ -0,0 +1,270 @@ +document.addEventListener('DOMContentLoaded', function () { + var menuCollapsed = false, + mobileMenu = document.getElementById('mobile-menu'); + + var localContextInUrl = ''; + + if (COMPODOC_CURRENT_PAGE_CONTEXT !== '') { + switch (COMPODOC_CURRENT_PAGE_CONTEXT) { + case 'additional-page': + localContextInUrl = 'additional-documentation'; + break; + case 'class': + localContextInUrl = 'classes'; + break; + case 'miscellaneous-functions': + case 'miscellaneous-variables': + case 'miscellaneous-typealiases': + case 'miscellaneous-enumerations': + localContextInUrl = 'miscellaneous'; + default: + break; + } + } + + function hasClass(el, cls) { + return el.className && new RegExp('(\\s|^)' + cls + '(\\s|$)').test(el.className); + } + + var processLink = function (link, url) { + if (url.charAt(0) !== '.') { + var prefix = ''; + switch (COMPODOC_CURRENT_PAGE_DEPTH) { + case 5: + prefix = '../../../../../'; + break; + case 4: + prefix = '../../../../'; + break; + case 3: + prefix = '../../../'; + break; + case 2: + prefix = '../../'; + break; + case 1: + prefix = '../'; + break; + case 0: + prefix = './'; + break; + } + link.setAttribute('href', prefix + url); + } + }; + + var processMenuLinks = function (links, dontAddClass) { + for (var i = 0; i < links.length; i++) { + var link = links[i]; + var linkHref = link.getAttribute('href'); + if (linkHref) { + var linkHrefFile = linkHref.substr(linkHref.lastIndexOf('/') + 1, linkHref.length); + if ( + linkHrefFile.toLowerCase() === COMPODOC_CURRENT_PAGE_URL.toLowerCase() && + link.innerHTML.indexOf('Getting started') == -1 && + !dontAddClass && + linkHref.toLowerCase().indexOf(localContextInUrl.toLowerCase()) !== -1 + ) { + link.classList.add('active'); + } + processLink(link, linkHref); + } + } + }; + var chapterLinks = document.querySelectorAll('[data-type="chapter-link"]'); + processMenuLinks(chapterLinks); + var entityLinks = document.querySelectorAll('[data-type="entity-link"]'); + processMenuLinks(entityLinks); + var indexLinks = document.querySelectorAll('[data-type="index-link"]'); + processMenuLinks(indexLinks, true); + var compodocLogos = document.querySelectorAll('[data-type="compodoc-logo"]'); + var customLogo = document.querySelectorAll('[data-type="custom-logo"]'); + var processLogos = function (entityLogos) { + for (var i = 0; i < entityLogos.length; i++) { + var entityLogo = entityLogos[i]; + if (entityLogo) { + var url = entityLogo.getAttribute('data-src'); + // Dark mode + logo + let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches; + if (isDarkMode && url.indexOf('compodoc') !== -1) { + url = 'images/compodoc-vectorise-inverted.png'; + } + if (url.charAt(0) !== '.') { + var prefix = ''; + switch (COMPODOC_CURRENT_PAGE_DEPTH) { + case 5: + prefix = '../../../../../'; + break; + case 4: + prefix = '../../../../'; + break; + case 3: + prefix = '../../../'; + break; + case 2: + prefix = '../../'; + break; + case 1: + prefix = '../'; + break; + case 0: + prefix = './'; + break; + } + entityLogo.src = prefix + url; + } + } + } + }; + processLogos(compodocLogos); + processLogos(customLogo); + + setTimeout(function () { + document.getElementById('btn-menu').addEventListener('click', function () { + if (menuCollapsed) { + mobileMenu.style.display = 'none'; + } else { + mobileMenu.style.display = 'block'; + document.getElementsByTagName('body')[0].style['overflow-y'] = 'hidden'; + } + menuCollapsed = !menuCollapsed; + }); + + /** + * Native bootstrap doesn't wait DOMContentLoaded event to start his job, re do it here + */ + var Collapses = document.querySelectorAll('[data-bs-toggle="collapse"]'); + for (var o = 0, cll = Collapses.length; o < cll; o++) { + var collapse = Collapses[o], + options = {}; + options.duration = collapse.getAttribute('data-duration'); + const targetId = collapse.getAttribute('data-bs-target'); + if (targetId !== '') { + options.parent = collapse; + const c = new BSN.Collapse(targetId, options); + } + } + + // collapse menu + var classnameMenuToggler = document.getElementsByClassName('menu-toggler'), + faAngleUpClass = 'ion-ios-arrow-up', + faAngleDownClass = 'ion-ios-arrow-down', + toggleItemMenu = function (e) { + var element = $(e.target), + parent = element[0].parentNode, + parentLink, + elementIconChild; + if (parent) { + if (!$(parent).hasClass('linked')) { + e.preventDefault(); + } else { + parentLink = parent.parentNode; + if (parentLink && element.hasClass('link-name')) { + $(parentLink).trigger('click'); + } + } + elementIconChild = parent.getElementsByClassName(faAngleUpClass)[0]; + if (!elementIconChild) { + elementIconChild = parent.getElementsByClassName(faAngleDownClass)[0]; + } + if (elementIconChild) { + elementIconChild = $(elementIconChild); + if (elementIconChild.hasClass(faAngleUpClass)) { + elementIconChild.addClass(faAngleDownClass); + elementIconChild.removeClass(faAngleUpClass); + } else { + elementIconChild.addClass(faAngleUpClass); + elementIconChild.removeClass(faAngleDownClass); + } + } + } + }; + + for (var i = 0; i < classnameMenuToggler.length; i++) { + classnameMenuToggler[i].addEventListener('click', toggleItemMenu, false); + } + + // Scroll to active link + var menus = document.querySelectorAll('.menu'), + i = 0, + len = menus.length, + activeMenu, + activeMenuClass, + activeLink; + + for (i; i < len; i++) { + if (getComputedStyle(menus[i]).display != 'none') { + activeMenu = menus[i]; + activeMenuClass = activeMenu.getAttribute('class').split(' ')[0]; + } + } + + if (activeMenu) { + activeLink = document.querySelector('.' + activeMenuClass + ' .active'); + if (activeLink) { + var linkType = activeLink.getAttribute('data-type'); + var linkContext = activeLink.getAttribute('data-context'); + if (linkType === 'entity-link') { + var parentLi = activeLink.parentNode, + parentUl, + parentChapterMenu; + if (parentLi) { + parentUl = parentLi.parentNode; + if (parentUl) { + parentChapterMenu = parentUl.parentNode; + if (parentChapterMenu) { + var toggler = parentChapterMenu.querySelector('.menu-toggler'), + elementIconChild = + toggler.getElementsByClassName(faAngleUpClass)[0]; + if (toggler && !elementIconChild) { + toggler.click(); + } + } + } + } + if (linkContext && linkContext === 'sub-entity') { + // Toggle also the master parent menu + var linkContextId = activeLink.getAttribute('data-context-id'); + var toggler = activeMenu.querySelector( + '.chapter.' + linkContextId + ' a .menu-toggler' + ); + if (toggler) { + toggler.click(); + } + if (linkContextId === 'additional') { + var mainToggler = activeMenu.querySelector( + '.chapter.' + linkContextId + ' div.menu-toggler' + ); + if (mainToggler) { + mainToggler.click(); + } + } + } + } else if (linkType === 'chapter-link') { + var linkContextId = activeLink.getAttribute('data-context-id'); + var toggler = activeLink.querySelector('.menu-toggler'); + if (toggler) { + toggler.click(); + } + if (linkContextId === 'additional') { + var mainToggler = activeMenu.querySelector( + '.chapter.' + linkContextId + ' div.menu-toggler' + ); + if (mainToggler) { + mainToggler.click(); + } + } + } + setTimeout(function () { + activeMenu.scrollTop = activeLink.offsetTop; + if ( + activeLink.innerHTML.toLowerCase().indexOf('readme') != -1 || + activeLink.innerHTML.toLowerCase().indexOf('overview') != -1 + ) { + activeMenu.scrollTop = 0; + } + }, 300); + } + } + }, 0); +}); diff --git a/documentation/js/routes.js b/documentation/js/routes.js new file mode 100644 index 0000000000..4169199941 --- /dev/null +++ b/documentation/js/routes.js @@ -0,0 +1,301 @@ +document.addEventListener('DOMContentLoaded', function () { + function htmlEntities(str) { + return String(str) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"'); + } + + function foundLazyModuleWithPath(path) { + //path is like app/customers/customers.module#CustomersModule + var split = path.split('#'), + lazyModulePath = split[0], + lazyModuleName = split[1]; + return lazyModuleName; + } + + function getBB(selection) { + selection.each(function (d) { + d.bbox = this.getBBox(); + }); + } + + var test_cases, test_case, test_case_num, engine; + + var tree = ROUTES_INDEX; + + function cleanStringChildren(obj) { + for (var property in obj) { + if (obj.hasOwnProperty(property)) { + if (property === 'children' && typeof obj[property] === 'object') { + for (var i = obj[property].length - 1; i >= 0; i--) { + if (typeof obj[property][i] === 'string') { + obj[property].splice(i, 1); + } + } + } + if (typeof obj[property] === 'object') { + cleanStringChildren(obj[property]); + } + } + } + } + cleanStringChildren(tree); + + engine = d3.layout.tree().setNodeSizes(true); + + engine.spacing(function (a, b) { + return a.parent == b.parent ? 0 : engine.rootXSize(); + }); + + engine.nodeSize(function (d) { + return [ + document.getElementById(d.id).getBBox()['height'] + 70, + document.getElementById(d.id).getBBox()['width'] + 30 + ]; + }); + + var nodes = d3.layout.hierarchy()(tree), + svg = d3.select('#body-routes').append('svg'), + svg_g = svg.append('g'), + svg_p = svg.append('g'), + last_id = 0, + node = svg_g + .selectAll('.node') + .data(nodes, function (d) { + return d.id || (d.id = ++last_id); + }) + .enter() + .append('g') + .attr('class', 'node'); + + svg.attr('id', 'main'); + + svg_g.attr('transform', 'translate(20,0)').attr('id', 'main-group'); + + svg_p.attr('transform', 'translate(20,0)').attr('id', 'paths'); + + var infos_group = node.append('g').attr({ + id: function (d) { + return d.id; + }, + dx: 0, + dy: 0 + }); + + //Node icon + infos_group + .append('text') + .attr('font-family', 'Ionicons') + .attr('y', 5) + .attr('x', 0) + .attr('class', function (d) { + return d.children || d._children ? 'icon has-children' : 'icon'; + }) + .attr('font-size', function (d) { + return '15px'; + }) + .text(function (d) { + return '\uf183'; + }); + + //node infos + infos_group + .append('svg:text') + .attr('x', function (d) { + return 0; + }) + .attr('y', function (d) { + return 10; + }) + .attr('dy', '.35em') + .attr('class', 'text') + .attr('text-anchor', function (d) { + return 'start'; + }) + .html(function (d) { + // if kind === module name + module + // if kind === component component + path + var _name = ''; + if (d.kind === 'module') { + if (d.module) { + _name += + '' + + d.module + + ''; + if (d.name) { + _name += '' + d.name + ''; + } + } else { + _name += '' + htmlEntities(d.name) + ''; + } + } else if (d.kind === 'component') { + _name += '' + d.path + ''; + _name += + '' + + d.component + + ''; + if (d.outlet) { + _name += '<outlet> : ' + d.outlet + ''; + } + } else { + _name += '/' + d.path + ''; + if (d.component) { + _name += + '' + + d.component + + ''; + } + if (d.loadChildren) { + var moduleName = foundLazyModuleWithPath(d.loadChildren); + _name += + '' + + moduleName + + ''; + } + if (d.canActivate) { + _name += '✓ canActivate'; + } + if (d.canDeactivate) { + _name += '×  canDeactivate'; + } + if (d.canActivateChild) { + _name += '✓ canActivateChild'; + } + if (d.canLoad) { + _name += '→ canLoad'; + } + if (d.redirectTo) { + _name += '→ ' + d.redirectTo + ''; + } + if (d.pathMatch) { + _name += '> ' + d.pathMatch + ''; + } + if (d.outlet) { + _name += '<outlet> : ' + d.outlet + ''; + } + } + return _name; + }) + .call(getBB); + + // + // Node lazy loaded ? + // + infos_group + .append('svg:text') + .attr('y', function (d) { + return 45; + }) + .attr('x', function (d) { + return -18; + }) + .attr('font-family', 'Ionicons') + .attr('class', function (d) { + return 'icon'; + }) + .attr('font-size', function (d) { + return '15px'; + }) + .text(function (d) { + var _text = ''; + if (d.loadChildren || d.loadComponent) { + _text = '\uf4c1'; + } + if (d.guarded) { + _text = '\uf1b0'; + } + return _text; + }); + + //Node text background + infos_group + .insert('rect', 'text') + .attr('width', function (d) { + return d.bbox.width; + }) + .attr('height', function (d) { + return d.bbox.height; + }) + .attr('y', function (d) { + return 15; + }) + .style('fill', 'white') + .style('fill-opacity', 0.75); + + nodes = engine.nodes(tree); + + function node_extents(n) { + return [n.x - n.x_size / 2, n.y, n.x + n.x_size / 2, n.y + n.y_size]; + } + var root_extents = node_extents(nodes[0]); + var xmin = root_extents[0], + ymin = root_extents[1], + xmax = root_extents[2], + ymax = root_extents[3], + area_sum = (xmax - xmin) * (ymax - ymin), + x_size_min = nodes[0].x_size, + y_size_min = nodes[0].y_size; + + nodes.slice(1).forEach(function (n) { + var ne = node_extents(n); + xmin = Math.min(xmin, ne[0]); + ymin = Math.min(ymin, ne[1]); + xmax = Math.max(xmax, ne[2]); + ymax = Math.max(ymax, ne[3]); + area_sum += (ne[2] - ne[0]) * (ne[3] - ne[1]); + x_size_min = Math.min(x_size_min, n.x_size); + y_size_min = Math.min(y_size_min, n.y_size); + }); + + var area_ave = area_sum / nodes.length; + var scale = 80 / Math.sqrt(area_ave); + + function svg_x(node_y) { + return node_y - ymin; + } + + function svg_y(node_x) { + return (node_x - xmin) * scale; + } + + var nodebox_right_margin = Math.min(x_size_min * scale, 10); + var nodebox_vertical_margin = Math.min(y_size_min * scale, 3); + + node.attr('transform', function (d) { + return 'translate(' + svg_x(d.y) + ',' + svg_y(d.x) + ')'; + }); + + var diagonal = d3.svg.diagonal().projection(function (d) { + return [svg_x(d.y), svg_y(d.x)]; + }); + + var links = engine.links(nodes); + var links = svg_p + .selectAll('.link') + .data(links) + .enter() + .append('path') + .attr('class', 'link') + .attr('d', diagonal); + + var _svg = document.getElementById('main'), + main_g = _svg.childNodes[0]; + + _svg.removeChild(main_g); + _svg.appendChild(main_g); + + svg.attr({ + width: document.getElementById('main-group').getBBox()['width'] + 30, + height: document.getElementById('main-group').getBBox()['height'] + 50 + }); +}); diff --git a/documentation/js/search/lunr.min.js b/documentation/js/search/lunr.min.js new file mode 100644 index 0000000000..cdc94cd390 --- /dev/null +++ b/documentation/js/search/lunr.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ +!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.9",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/documentation/js/search/search-lunr.js b/documentation/js/search/search-lunr.js new file mode 100644 index 0000000000..35e7dde1d5 --- /dev/null +++ b/documentation/js/search/search-lunr.js @@ -0,0 +1,67 @@ +(function(compodoc) { + + function LunrSearchEngine() { + this.index = undefined; + this.store = {}; + this.name = 'LunrSearchEngine'; + } + + LunrSearchEngine.prototype.init = function() { + var that = this, + d = new promise.Promise(); + + that.index = lunr.Index.load(COMPODOC_SEARCH_INDEX.index); + that.store = COMPODOC_SEARCH_INDEX.store; + d.done(); + + return d; + }; + + LunrSearchEngine.prototype.search = function(q, offset, length) { + var that = this, + results = [], + d = new promise.Promise(); + + if (this.index) { + results = $.map(this.index.search('*' + q + '*'), function(result) { + var doc = that.store[result.ref]; + + return { + title: doc.title, + url: doc.url, + body: doc.summary || doc.body + }; + }); + } + + d.done({ + query: q, + results: length === 0 ? results : results.slice(0, length), + count: results.length + }); + + return d; + }; + + compodoc.addEventListener(compodoc.EVENTS.READY, function(event) { + var engine = new LunrSearchEngine(), + initialized = false; + + function query(q, offset, length) { + if (!initialized) throw new Error('Search has not been initialized'); + return engine.search(q, offset, length); + } + + compodoc.search = { + query: query + }; + + engine.init() + .then(function() { + initialized = true; + compodoc.dispatchEvent({ + type: compodoc.EVENTS.SEARCH_READY + }); + }); + }); +})(compodoc); diff --git a/documentation/js/search/search.js b/documentation/js/search/search.js new file mode 100644 index 0000000000..be2271cff7 --- /dev/null +++ b/documentation/js/search/search.js @@ -0,0 +1,283 @@ +(function (compodoc) { + var usePushState = typeof history.pushState !== 'undefined', + // DOM Elements + $body = $('body'), + $searchResults, + $searchInput, + $searchList, + $searchTitle, + $searchResultsCount, + $searchQuery, + $mainContainer, + $xsMenu; + + // Throttle search + function throttle(fn, wait) { + var timeout; + + return function () { + var ctx = this, + args = arguments; + if (!timeout) { + timeout = setTimeout(function () { + timeout = undefined; + fn.apply(ctx, args); + }, wait); + } + }; + } + + function displayResults(res) { + var noResults = res.count == 0; + var groups = {}; + $searchResults.toggleClass('no-results', noResults); + + // Clear old results + $searchList.empty(); + + // Display title for research + $searchResultsCount.text(res.count); + $searchQuery.text(res.query); + + // Group result by context + res.results.forEach(function (res) { + var context = res.title.split(' - ')[0]; + if (typeof groups[context] === 'undefined') { + groups[context] = { + results: [res] + }; + } else { + groups[context].results.push(res); + } + }); + + var sortedGroups = Object.keys(groups).sort(); + + for (var i = 0; i < sortedGroups.length; i++) { + var property = sortedGroups[i]; + + var $li = $('
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ', { + class: 'search-results-group' + }); + var finalPropertyLabel = ''; + var propertyLabels = property.split('-'); + + if ( + propertyLabels.length === 2 && + propertyLabels[0] !== 'miscellaneous' && + propertyLabels[0] !== 'additional' + ) { + finalPropertyLabel = + propertyLabels[0].charAt(0).toUpperCase() + + propertyLabels[0].substring(1) + + ' - ' + + propertyLabels[1].charAt(0).toUpperCase() + + propertyLabels[1].substring(1) + + ' (' + + groups[property].results.length + + ')'; + } else if (propertyLabels[0] === 'additional') { + finalPropertyLabel = + 'Additional pages' + ' (' + groups[property].results.length + ')'; + } else { + finalPropertyLabel = + propertyLabels[0].charAt(0).toUpperCase() + + propertyLabels[0].substring(1) + + ' (' + + groups[property].results.length + + ')'; + } + var $groupTitle = $('

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ', { + text: finalPropertyLabel + }); + $groupTitle.appendTo($li); + + var $ulResults = $('